Re: [hatari-devel] breakpoint on CALL_SUBRETURN condition doesn't work ?

[ Thread Index | Date Index | More Archives ]

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 stoppping.

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).


Mail converted by MHonArc 2.6.19+