Which debugger do you use?

handy tools that can assist in the development of new software
Post Reply
User avatar
pau1ie
Posts: 720
Joined: Thu May 10, 2012 10:48 pm
Location: Bedford
Contact:

Which debugger do you use?

Post by pau1ie »

I have been using b-em, but I have to keep manually checking the memory address against the dasm file and then against the code. Is there a better debugger? I suppose part of the problem is I am using 64tass which has limited bbc support.

I suppose I am asking - what tools do you use? Also, how much effort do you think it would be to change to use a more bbc focussed assembler?
User avatar
tricky
Posts: 4969
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: Which debugger do you use?

Post by tricky »

I mostly use a customised beebem that loads the labels from beebasm and then displays them while stepping as well as automatically in break points and watches. They are displayed as nearest label +/-offset and auto saved/loaded.

I mainly use b-em for testing and beebem for debugging.

I have only used basic's assembler bitd and beebasm now and never considered changing. I think i would still use beebasm even if I was tempted by another platform.
Last edited by tricky on Sun Jan 27, 2019 10:18 pm, edited 1 time in total.
User avatar
pau1ie
Posts: 720
Joined: Thu May 10, 2012 10:48 pm
Location: Bedford
Contact:

Re: Which debugger do you use?

Post by pau1ie »

How does the n command in b-em work? The help says

Code: Select all

    n          - step, but treat a called subroutine as one step
But when it hit a BNE it didn't return until it hit a breakpoint, so it thinks that is a subroutine? I thought the only way to call a subroutine is JSR.
User avatar
hoglet
Posts: 9804
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: Which debugger do you use?

Post by hoglet »

pau1ie wrote:
Mon Jan 28, 2019 8:36 pm
How does the n command in b-em work? The help says

Code: Select all

    n          - step, but treat a called subroutine as one step
But when it hit a BNE it didn't return until it hit a breakpoint, so it thinks that is a subroutine? I thought the only way to call a subroutine is JSR.
The n command should set a breakpoint on the instruction after the current one, and run until that is hit.

It's useful to quickly skip over a subroutine call (if used on a JSR).

It can also be used to skip past a loop (if used on the backwards branch at the end of a loop).

Dave
Last edited by hoglet on Mon Jan 28, 2019 10:02 pm, edited 2 times in total.
User avatar
pau1ie
Posts: 720
Joined: Thu May 10, 2012 10:48 pm
Location: Bedford
Contact:

Re: Which debugger do you use?

Post by pau1ie »

hoglet wrote:
Mon Jan 28, 2019 8:56 pm
The n command should set a breakpoint on instruction after the current one, and run until that is hit.
Thanks - that makes complete sense now, because it never hit the next instruction - it branched.
dominicbeesley
Posts: 1395
Joined: Tue Apr 30, 2013 12:16 pm
Contact:

Re: Which debugger do you use?

Post by dominicbeesley »

It's not free but I find it very good NoIce from John Hartmann. I bought the full version and find it excellent. If anyone wants a try I can help with porting a 6502 monitor (you need to write a small module to communicate with the remote PC).

For longer running / difficult to track down problems Dave's decode6502 and a fx2lafw can often find stuff quickly that would otherwise take a lot of tracking down....I really need to make a 6809 version!

D
Kweepa
Posts: 31
Joined: Mon Dec 16, 2013 11:45 pm
Contact:

Re: Which debugger do you use?

Post by Kweepa »

I'm trying to debug some assembly I've written using the BASIC assembler in beebem (4.14/4.15), but I don't even know how to display the contents of the registers (PC, A, X, Y, F). It seems that 'code' shows them once after a break but that's it. I'd really like to single step through a loop.
Could someone give me some pointers?
Or is there another (precompiled) emulator that would do the job, that I can paste BASIC code into?

(I'm leaning towards compiling the code for the VIC-20 and debugging in VICE... but that would be a shame).
User avatar
tricky
Posts: 4969
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: Which debugger do you use?

Post by tricky »

type help in the box for a list of command.
Type n [return] to run the next instruction and return again for the next ...
You can also do n 99 to run the next 99 instructions - will list them in the text window along with the register valus.
Kweepa
Posts: 31
Joined: Mon Dec 16, 2013 11:45 pm
Contact:

Re: Which debugger do you use?

Post by Kweepa »

That didn't work when I tried it before, and it didn't work this time either.

I pressed 'break' to stop the 6502 (so it says 'cancel' on the button), then typed 'n' and hit enter. Nothing appeared in the output window. Nothing for 'next' or 'next 1' either. Typing code works, as do peek, watch, etc. I also tried 'n' then pressing 'execute command'. That didn't do anything either.

(BeebEm downloaded from http://www.mkw.me.uk/beebem/BeebEm415.exe)

[EDIT]
Ok, I see what I was doing wrong.
(1) needed to attach debugger to OS and ROM (in case it breaks in the OS code)
(2) needed to uncheck 'Options/Freeze when inactive'

Hopefully this will help someone else.
Post Reply

Return to “development tools”