[hatari-devel] something not working with breakpoints ?
npomarede at corp.free.fr
npomarede at corp.free.fr
Sat Sep 5 20:53:06 CEST 2009
On Sat, 5 Sep 2009, Eero Tamminen wrote:
> Hi,
>
> On Saturday 05 September 2009, npomarede at corp.free.fr wrote:
>> I'm trying to take two on debug fusion cd 32, but I can't succeed to have
>> a breakpoint triggered.
>>
>> I run hatari --debug, then :
>>> b ( $44c).b = $fc
>>
>> CPU condition breakpoint 1 with 1 condition(s) added.
>>
>>> m $44c
>>
>> 00044C: 00 00 00 1f 80 00 00 00 00 08 00 00 04 ce 00 00
>> .............Î..
>>
>>> c
>>
>> Returning to emulation...
>> Inserted disk '/home/npomarede/Emul/ST/Games/Fuzion CD 032
>> (1991)(Fuzion).st' to drive A:.
>> Detected scancode offset = 8 (key: 'f2' with scancode $44)
>>
>> -> no breakpoint, I press alt + pause
>>
>> CPU=$fcb740, VBL=358, FrameCycles=72, HBL=0, LineCycles=72, DSP=N/A
>>
>>> m $44c
>>
>> 00044C: fc 00 00 1f 80 00 00 01 00 08 00 00 04 ce 00 00
>> ü............Î..
>>
>>> b
>>
>> 1 conditional CPU breakpoints:
>> 1: ( $44c ) . b = $fc
>
> Works fine for me:
> --------------
>> w $44c $fc
>> c
> Returning to emulation...
> (0x44c).b = 0xfc
> 1. breakpoint '( $44c ) . b = $fc' conditions matched.
>> m $44c
> 00044C: fc 00 00 3f 80 00 00 01 00 08 00 00 04 ce 00 00 ...?............
> -------------
>
> Could you try the attached patch and check that you see some output?
>
>
>> The breakpoint seems ok, but it didn't triggered (I have same problem
>> when I use a + addr, no breakpoint happens)
>>
>> Any idea ? A change in some compilation flag/define ?
>
>
> - Eero
>
>
I get a breakpoint if I do like you with w $44c and continue with 'c'.
In fact, I think I found the bug : when I add your printf, I get lots of
lines like :
(0x44c).b = 0x0
Then I insert the disk in drive A and press alt+r for reset, and at this
point, there's no more printf, so it seems resetting the ST is removing
the SPCFLAG_DEBUGGER flag :(
If I press alt+pause and then immediatly 'c', I return to emulation and
the printf are back again -> breakpoints are checked again.
So, I think when Hatari is cold/warm rebooted, it should keep the state of
the SPCFLAG_DEBUGGER, else we have a list of active breakpoints that stay
persistent after the reset, but they're not checked anymore.
Thomas, maybe this should go in 1.3.2 ? (I think it could puzzle some
users, but as it's limited to a few person that will use breakpoints,
maybe it's not worth to do another release)
Nicolas
More information about the hatari-devel
mailing list