|Re: [hatari-devel] breakpoint on CALL_SUBRETURN condition doesn't work ?|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
On lauantai 05 huhtikuu 2014, Nicolas Pomarède wrote:
> Le 04/04/2014 23:45, Eero Tamminen a écrit :
> > On perjantai 04 huhtikuu 2014, Nicolas Pomarède wrote:
> >> when using in the debugger "n subreturn", the program should run until
> >> a RTS is seen for example.
> >> But it never breaks, am I missing something (this is with old cpu
> >> core) ?
> >> Eero, do you have a idea ?
> > Can you provide the disassembly (containing also opcodes)
> > from the instruction where you give the command to
> > the RTS instruction?
> I do it at a random place to do my test : start hatari, and before gem
> desktop appear, press alt+pause.
> Then I type "n subreturn" ; there's obviously a RTS that will appear in
> the TOS, so it should break quite soon, but it doesn't, it runs without
Does it work sometimes or never?
(Sorry, had a busy week so I didn't have time to look at this yet.)
> If I press alt+pause again, and type 'b', I see :
> 1 conditional CPU breakpoints:
> 1: CpuOpcodeType = 16 :once
> > "n subreturn" should create breakpoint:
> > CpuOpcodeType=%d :once :quiet
> > Where %d is code for CALL_SUBRETURN, which maps to:
> > Uint16 opcode = STMemory_ReadWord(M68000_GetPC());
> > if (opcode == 0x4e74 || /* RTD */
> > opcode == 0x4e75 || /* RTS */
> > opcode == 0x4e77) /* RTR */
> > return CALL_SUBRETURN;
> > Could you add some other breakpoint into middle and check
> > whether above breakpoint is set (with 'b' command)?
> > (code for above is in src/debug/debugcpu.c)
> See above, the brakpoint is created it seems it just never triggers.
> By the way, I think it could be useful to have a condition that breaks
> on any return (sub return or exception return).
Additional command to the already existing ones?