Jump to content
Sign in to follow this  
Heaven/TQA

Altirra Debugger - powerful

Recommended Posts

Just debugging my missed Forever 2014 Demo (which might be see the light at Revision 2014)... and now I realised the History function where you can search for labels so I can exactly see what happens around subroutine calls.

 

I have thought that the history function is more like in Atari800win...

 

well... another lesson learned.

  • Like 2

Share this post


Link to post
Share on other sites

yeah and in my case I have seen that accumulator was changed due to NMI plus DLI and confused the main routine at a certain point. I simply stored the registers in the DLI in another place (and not the same variables like the NMI) and voila works. it was obvious but only with BRK and looking at the code around the break point did not give any hint... only that "wtf why is A containing $85 instead of $00". and with the history function enabled plus the possibility to search for the sub routine showed me that the NMI is interrupting the routine... but does not trash the accu but then few cycles later the DLI comes alive... and later after the DLI accu was trashed...

 

so found bug in 10 minutes.

  • Like 1

Share this post


Link to post
Share on other sites

Also here to show my appreciation!

 

(But I still have some wishes, like a better updating disassembly or memory dump window and more 'graphical' interactivity - like setting breakpoints or modifying memory with a click...)

 

Share this post


Link to post
Share on other sites

Xuel... I am using Eclipse plus mads plus Altirra incl. label loading... Now enable in Altirra the history function in settings and open the history window (no command like in atari800win)... In the history window you see the search button with an input field... Simply enter your label there and the window will jump to the label... Now I had scrolled up to see what happen before entering the sub routine...

  • Like 1

Share this post


Link to post
Share on other sites

I could use some advice on how to use it from CA65. As far as I know, it won't load labels from CA65, so that maybe limits it's usefulness? Not sure though, as I said could use some advice. Its sure looks like a powerful debugger.

Share this post


Link to post
Share on other sites

Very cool, thanks for the tip! Works great with VIM + XASM as well.

 

To add to what you said, I found that I could search, then select a line in the history, then clear the search and the line remains selected. Then you can examine instructions in the proximity that didn't match the search. It's also nice that Altirra still displays the call stack even if those calls don't match the search.

Share this post


Link to post
Share on other sites

I could use some advice on how to use it from CA65. As far as I know, it won't load labels from CA65, so that maybe limits it's usefulness? Not sure though, as I said could use some advice. Its sure looks like a powerful debugger.

I found that you can search for addresses too so one option is to look at the ca65 listing to find the address and then search for that.

Share this post


Link to post
Share on other sites

I could use some advice on how to use it from CA65. As far as I know, it won't load labels from CA65, so that maybe limits it's usefulness? Not sure though, as I said could use some advice. Its sure looks like a powerful debugger.

ca65 labels ate supported.

Can give you advice tomorrow if no one else answers in the meantime.

Share this post


Link to post
Share on other sites

I could use some advice on how to use it from CA65. As far as I know, it won't load labels from CA65, so that maybe limits it's usefulness? Not sure though, as I said could use some advice. Its sure looks like a powerful debugger.

 

What I do is this:

 

1.) Adding the linker option

-Ln $(NAME).lbl

2.) Remove the "." infront of the label

sed -i "s/\.//" $(NAME).lbl

And that's that. IIRC the secrete is that Altirra needs the file extension to be "lbl" when reading CA65 label files.

Of course when you use Windows (and I know you do) you have to find a replacement for SED or live with entering a "." infront of every label you type in the debugger.

 

The above works for me so I stopped searching better solutions. If anyone has one, I would be interested in it :)

Edited by Creature XL
  • Like 1

Share this post


Link to post
Share on other sites

Request to Phaeron - could you add a little description how exactly debugger works with label files? Would be great to have it available in the manual.

Share this post


Link to post
Share on other sites

 

What I do is this:

 

1.) Adding the linker option

-Ln $(NAME).lbl

2.) Remove the "." infront of the label

sed -i "s/\.//" $(NAME).lbl

And that's that. IIRC the secrete is that Altirra needs the file extension to be "lbl" when reading CA65 label files.

Of course when you use Windows (and I know you do) you have to find a replacement for SED or live with entering a "." infront of every label you type in the debugger.

 

The above works for me so I stopped searching better solutions. If anyone has one, I would be interested in it :)

 

Ah, beautiful. Thanks! I have a handy linux pack of tools loaded so sed is no problem.

Share this post


Link to post
Share on other sites

Altirra's symbol loading is documented in the help file under Debugger > Source-level debugging, but it looks like I forgot to include the info about CC65 labels.

 

I didn't realize the leading dot was for VICE... I'll add code to auto-strip that.

 

Looks like they've added better debug info to CC65 since I last looked. Line-number info in the dbgfile is unusably broken in 2.13.3-1, but it's been redone and looks usable in the snapshot version, so I might be able to parse it. Sadly, still no type info.

Share this post


Link to post
Share on other sites

Looks like they've added better debug info to CC65 since I last looked. Line-number info in the dbgfile is unusably broken in 2.13.3-1, but it's been redone and looks usable in the snapshot version, so I might be able to parse it. Sadly, still no type info.

 

Propose some format for type info with example and I will try to add it to CC65.

Share this post


Link to post
Share on other sites

Using Altirra 2.50-test27:

1. I'm trying to set memory with 'e' or 'f' commands and sometimes it fails when setting memory around PC (example: f pc L2000 0 DE AD BE EF). What is the reason for this?

2. How to set modify registers/flags manually? I don't see that command in help.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...