Hatari OSX debug mode

A forum about the Hatari ST/STE/Falcon emulator - the current version is v2.1.0

Moderators: simonsunnyboy, thothy, Moderator Team

goonzy
Atarian
Atarian
Posts: 6
Joined: Mon May 17, 2010 9:45 pm

Hatari OSX debug mode

Postby goonzy » Tue May 18, 2010 5:49 pm

Hi all

Is there a way to run OSX's Hatari port in Debug mode?

distantminds
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 104
Joined: Thu Sep 29, 2005 5:03 pm

Re: Hatari OSX debug mode

Postby distantminds » Tue Aug 10, 2010 3:53 pm

Bump!

i would love to know this as well.. if I can get some kind of debug going on, I can kick my steem+wine to the curb and go full-on Hatari!

jvernet
Atari freak
Atari freak
Posts: 65
Joined: Wed Sep 12, 2007 8:04 am
Location: France, 77
Contact:

Re: Hatari OSX debug mode

Postby jvernet » Mon Aug 23, 2010 9:30 am

Heee.... Yes. Not the MacOsX way... Under Terminal, launch Hatari 'by hand', ./hatari.app/Contents/MacOs/hatari

Then, you will have acces to the text console. You can invoke (I think) the debugger and go back to Terminal.

JV
Atari stuff:
520ST, 520 STF, 520STe, 1040ST, 1040STe, MegaST1, MegaST2, MegaST4, MegaSTe 4Mb+DD 250Mb
Falcon: 14Mb Falcon, SpeedRes 030/40 Card-TT/030: 4MbST+20MbFastRAMTT, DD 1Gb, Hydra NetWork Card
Falcon AB40: AfterBurner 040, Nemesis, dead Blowup Hard II, 32Mb.
--
800XL, 130xe,65xe

User avatar
troed
Atari God
Atari God
Posts: 1427
Joined: Mon Apr 30, 2012 6:20 pm
Location: Sweden

Re: Hatari OSX debug mode

Postby troed » Mon Jul 09, 2012 1:48 am

I had issues entering the debug mode on Hatari. Posting since the solution was easy, but non obvious. There's of course a possibility my config files are messed up due to something I don't know about, but since I've seen others fail to get into debug mode here's what worked for me:

In the menu the greyed out item "Enable Debugger Interface" is listed as being the key combo cmd-D. However, pressing that key combo brought up a built in file selector for drive A. That's easily solved by editing hatari.cfg though:

Code: Select all

$ pico ~/.hatari/hatari.cfg


Find the section [ShortcutsWithModifiers] and then edit the line that says keyDebugger = 19 to instead say keyDebugger = 100. Remove the line keyInsertDiskA = 100 when you're at it.

After that, to actually see the debug mode, you must launch Hatari from the terminal. That's easy:

Code: Select all

$ ./hatari.app/Contents/MacOS/hatari -D


Now, when you press cmd-D the debug mode will become active in the terminal you launched Hatari from.

jvernet
Atari freak
Atari freak
Posts: 65
Joined: Wed Sep 12, 2007 8:04 am
Location: France, 77
Contact:

Re: Hatari OSX debug mode

Postby jvernet » Thu Jul 12, 2012 2:24 pm

That's it ! Thanks.

I would like to made a specific MacOsX command line Debug Windows (where you launch Hatari the MacOsX Way by doublick, then CMD-D will show a popup windows where you can use classical command line command). I had little success but never finished... It's not so easy to use Libreadline functions within a text box in MacOsX.

JV
Atari stuff:
520ST, 520 STF, 520STe, 1040ST, 1040STe, MegaST1, MegaST2, MegaST4, MegaSTe 4Mb+DD 250Mb
Falcon: 14Mb Falcon, SpeedRes 030/40 Card-TT/030: 4MbST+20MbFastRAMTT, DD 1Gb, Hydra NetWork Card
Falcon AB40: AfterBurner 040, Nemesis, dead Blowup Hard II, 32Mb.
--
800XL, 130xe,65xe

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1748
Joined: Sun Jul 31, 2011 1:11 pm

Re: Hatari OSX debug mode

Postby Eero Tamminen » Fri Jul 20, 2012 4:35 pm

troed wrote:

Code: Select all

$ ./hatari.app/Contents/MacOS/hatari -D


Now, when you press cmd-D the debug mode will become active in the terminal you launched Hatari from.


Note that -D option isn't needed for invoking the debugger. It will just make Hatari (with old UAE CPU core) to invoke debugger automatically on certain exceptions.

distantminds
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 104
Joined: Thu Sep 29, 2005 5:03 pm

Re: Hatari OSX debug mode

Postby distantminds » Fri Jul 20, 2012 7:44 pm

Eero Tamminen wrote:Note that -D option isn't needed for invoking the debugger. It will just make Hatari (with old UAE CPU core) to invoke debugger automatically on certain exceptions.


8O all this time Ive been lead to believe you had start hatari with -D

I've been painfully 'c'ing through reset bus errors for months! :D


For some reason the debugger is always shrouded in some kind of mystery IMO :)

distantminds
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 104
Joined: Thu Sep 29, 2005 5:03 pm

Re: Hatari OSX debug mode

Postby distantminds » Sun Jul 22, 2012 12:05 pm

distantminds wrote:For some reason the debugger is always shrouded in some kind of mystery IMO :)


Actually this is unfair. I've just noticed the debugger is heavily documented in the user guide. Apologies Hatari team!

:cheers:

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1748
Joined: Sun Jul 31, 2011 1:11 pm

Re: Hatari OSX debug mode

Postby Eero Tamminen » Wed Aug 22, 2012 9:51 pm

distantminds wrote:
distantminds wrote:I've just noticed the debugger is heavily documented in the user guide.


That's because it's intended to be heavily used, to make sure people can create their new Atari goodies more easily. :-)

While there are really good native Atari debuggers (Hatari debugger is e.g. missing some features that MonST has), I believe Hatari debugger provides the best DSP debugging features, as they're exactly the same as for the CPU side.

If your compiler can provide symbol address information or you can convert it to format understood by Hatari, you can get e.g. function traces of your program run. This was AFAIK used on debugging Linux port to 86000...


Social Media

     

Return to “Hatari”

Who is online

Users browsing this forum: No registered users and 3 guests