Re: [hatari-devel] A question about the debugger |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
On 15 Sep 2015 at 0:08, Eero Tamminen wrote:
> On sunnuntai 13 syyskuu 2015, Roger Burrows wrote:
> > OK, I'm just using the "logfile" command. The symbol trace is going into
> > the file ok. However, although a crash occurs, the debugger is not
> > entered and the music continues to play for a while.
>
> You forgot to enable debugger invocation, see below [1].
>
OK, didn't realise that I needed to.
> > Also, although I added gemdos tracing, the GEMDOS
> > trace goes to the console window rather than the trace file.
>
> Even with the "--trace-file" option?
>
I didn't express myself properly. The reason I enabled GEMDOS tracing was
because I wanted to see when the program started. For that, I needed to have
both the symbol trace and the GEMDOS trace in the same file, but they weren't.
I didn't try --trace-file because I didn't want the GEMDOS trace in a separate
file, and I didn't think that it would work too well if "logfile" and
"--trace-file" pointed to the same file.
>
> Then you need also to tell Hatari to invoke debugger on
> the specified exceptions. Easiest way to do that is to
> add "autostart" option:
> hatari --debug-except bus,autostart ./test.prg
>
> This will enable exception debugging after program
> is autostarted, to avoid TOS bootup exceptions invoking
> the debugger.
>
The program doesn't get autostarted, perhaps because my C drive is an emulated
ACSI drive, not the GEMDOS drive. But I'll see if the debugger still gets
invoked on the crash.
> (Alternatively you can use "setopt -D" command in debugger
> to toggle at run-time whether previously specified exceptions
> invoke the debugger or not.)
>
Will it work if I add "setopt -D" to the debugger initialisation file? I guess
I'll try if all else fails.
>
> After scripting the debugging, you don't need to interact with
> debugger, so you can just start Hatari directly from DOS prompt
> and redirect all Hatari output to a file.
>
Ah, now we're back to my original problem: attempting to redirect debugging
output to a file did not seem to work for me in Windows. But I don't care as
long as I can get a workaround ...
> (File logging options are for case when you do NOT want everything
> to go to a file. And -W option is intended for cases when you start
> Hatari from some Windows GUI shortcut and still want to see console
> output.)
>
OK, thanks for the help!
Roger