Aranym debugger

34 views
Skip to first unread message

Miro Kropáček

unread,
Oct 19, 2023, 4:21:07 PM10/19/23
to ARAnyM-list
Hi,

what was the last time anyone tried to use Aranym's debugger? I have no other option and while it seems quite useful, it doesn't seem to be in a very good condition.

My use case is pretty simple:
- load an application
- let it print a function address I'm interested in (I haven't found a better way how to find out where my code lies, esp. in a multitasking environment)
- left ALT + PAUSE to enter debugger (aranym has been compiled with --disable-sdl2 --enable-fullmmu --enable-debug --enable-disasm but tried also simple --enable-debug)
- "B <address I'm interested in>"
- "g" (continue execution)

(now I have lost the mouse but I could live with that)

- trigger the address

Now I'm back in the debugger, sweet. Seemingly everything works but as soon as I press "t" (for stepping) or even "g" (to continue execution) or some other keys (e.g. "e", dump exception vectors), the debugger looks like it exited (and I can reach Aranym's UI) but in fact nothing really works anymore -- keyboard input is gone, aranym cold start is unable to start EmuTOS again etc.

So either I'm doing something wrong or the debugger is not working well anymore. Can anyone confirm? Or suggest a better way? (I also tried --enable-debug=uae but it seems to lead to the same one = ndebug).

--

Miro Kropáček

unread,
Oct 19, 2023, 4:51:24 PM10/19/23
to ARAnyM-list
To reply to myself and future curious readers: the trick (which made it all way better) seems to be to immediately disable the breakpoint which has been just hit (using the same "B" command). Then I can play around as I'd expect.
--

WongCK

unread,
Oct 24, 2023, 12:59:50 AM10/24/23
to ARAnyM-list, Miro Kropáček
Hi,
I tried to Google "Aranym debugger" and it only found your post here.
Where can I find information about this ?
Any debugger to help me with my dev is helpful....
Thanks.





--

--
You received this message because you are subscribed to the Google Groups "ARAnyM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aranym+un...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/aranym/CAN5rfbTHgqjd%2BtsqOF7LrfZaA4%2B9MBe8E7JQMUSAQfWZXXA1WQ%40mail.gmail.com
.

Paul Wratt

unread,
Oct 24, 2023, 1:54:54 AM10/24/23
to ARAnyM-list
On 10/24/23, 'WongCK' via ARAnyM <ara...@googlegroups.com> wrote:
> Hi,I tried to Google "Aranym debugger" and it only found your post
> here.Where can I find information about this ?Any debugger to help me with
> my dev is helpful....Thanks.
>

I am pretty sure there was a web page on the _old_ Aranym website,
before it brock and got moved, so try Archive.Org circa 2010 - 2012
(which is when I was using it to do AFROS-update for LiveCD)

cheers

Paul


> On Friday, 20 October 2023 at 04:51:27 am SGT, Miro Kropáček
> <miro.k...@gmail.com> wrote:
>
> To reply to myself and future curious readers: the trick (which made it all
> way better) seems to be to immediately disable the breakpoint which has been
> just hit (using the same "B" command). Then I can play around as I'd
> expect.
> On Thu, 19 Oct 2023 at 22:24, Miro Kropáček <miro.k...@gmail.com>
> wrote:
>
> Hi,
> what was the last time anyone tried to use Aranym's debugger? I have no
> other option and while it seems quite useful, it doesn't seem to be in a
> very good condition.
> My use case is pretty simple:- load an application- let it print a function
> address I'm interested in (I haven't found a better way how to find out
> where my code lies, esp. in a multitasking environment)- left ALT + PAUSE to
> enter debugger (aranym has been compiled with --disable-sdl2
> --enable-fullmmu --enable-debug --enable-disasm but tried also simple
> --enable-debug)- "B <address I'm interested in>"- "g" (continue execution)
> https://groups.google.com/d/msgid/aranym/1792272237.894827.1698123583230%40mail.yahoo.com.
>

Chris Jenkins

unread,
Oct 24, 2023, 3:33:12 AM10/24/23
to Paul Wratt, ARAnyM-list
What was the address of the old Aranym website? Having only discovered Aranym in the last couple of years, I missed out on that.

Miro Kropáček

unread,
Oct 24, 2023, 5:05:51 AM10/24/23
to ARAnyM-list
On Tue, 24 Oct 2023 at 06:59, WongCK <wong...@yahoo.com> wrote:
Any debugger to help me with my dev is helpful....
In the end, it's not so hard but the debugger itself is pretty raw. Basically you have to:

- compile aranym with --enable-debugger (about 10 years ago there were also other options available like --enable-fullhistory, --enable-disasm or the debugger could be chosen from "uae" and "ndebug", now it's enough only the one option because others doesn't seem to have any effect anymore)

- invoke the debugger (LEFT ALT + PAUSE -- can be configured in the GUI)

- type "help" for the list of available commands

- find out address of your code (I didn't find a better way than to just get a function pointer to e.g. main, print it into the console and hope that it will get the same address by the next run)

- B <address>

- run your program again

- B <address> to remove that BP otherwise weird stuff happens

- "z" to step over, "t" to step into

For me the biggest annoyance is inability to reliably debug trap calls. I can put a BP into, say, address pointed by 0x88 (trap #2), it will get triggered but no amount of fiddling with "I" and "i" will make it continue on the next instruction within the handler. It either jump god-knows-where or jumps into the keyboard handler.

For most cases you're fine with Hatari but since I wanted to debug a aranym (fvdi+aranym.sys) specific issue... I had to give up. But for normal user-level debugging I can imagine get something done even in such a simple debugger.

--

Thorsten Otto

unread,
Oct 24, 2023, 6:03:20 AM10/24/23
to ara...@googlegroups.com

On Dienstag, 24. Oktober 2023 11:08:54 CEST Miro Kropáček wrote:


> - compile aranym with --enable-debugger


The option is --enable-debug, not --enable-debugger

(as usual, you can run ./configure --help to see the available options)


> about 10 years ago there were also other options available like

> --enable-fullhistory, --enable-disasm


--enable-fullhistory is still available, but IIRC it does not affect the debugger, only when aranym crashes it would print the history of the last instructions


--enable-disasm is also still available, but automatically activated with --enable-debug (a debugger that is not able to disassemble instructions would be rather useless ;) You can still use it separately when you want to use the bfd opcode library for disassembling instead of the builtin one (but that only works if bfd was configured to include the m68k disassembler, which was not always the case)


The old uae interface is indeed gone, but actually it was just duplicate code that redirected debug printfs to stderr.


But other than that: yes, the aranym debugger is pretty dumb.


> since I wanted to debug a aranym (fvdi+aranym.sys)


fVDI (or any other resident program) is difficult to debug anyway. The best option might be to insert some debug printfs that use nf_debugprintf(), and thus print on the host console. Provided you take care of clobbered registers, that even works in interrupt handlers.


In MiNT, you can just use FORCE() to also print to the host console.

WongCK

unread,
Oct 25, 2023, 3:23:57 AM10/25/23
to ara...@googlegroups.com

Arghhh.... you got to recompile it myself ??

--
You received this message because you are subscribed to the Google Groups "ARAnyM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aranym+un...@googlegroups.com.
To view this discussion on the web visit

Thorsten Otto

unread,
Oct 25, 2023, 4:35:53 AM10/25/23
to ara...@googlegroups.com

On Mittwoch, 25. Oktober 2023 09:23:54 CEST 'WongCK' via ARAnyM wrote:

> Arghhh.... you got to recompile it myself ??


If you want to look at the debugger: yes ;)


But its really not difficult, and you don't need many dependencies.


Only on macOS its more complicated (haven't looked yet at Philips new Project files)



Reply all
Reply to author
Forward
0 new messages