Re: [hatari-devel] Debugger 'n' command

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On 04/09/2016 07:33 PM, Nicolas Pomarède wrote:
Le 09/04/2016 16:15, Vincent Rivière a écrit :
The debugger 'n' command is nice: it allows to run a subroutine
(bsr/jsr/trap) and break after it has returned.

It would be useful to extend the 'n' command to have the same behaviour
after loop instructions (dbra, maybe also beq/bne/...). That would help
when tracing programs.

IIRC, Devpac MonST did that on Ctrl+A.

monst has ctr+t which handle bsr/jsr/trap/..., but not ctrl+n (according
to devpac3 doc).

This could be possible to add, the logic would be similar to 'n' command
: runs until pc reaches the next instruction after the current "DBcc"
instruction.

So if current instruction is not bsr/jsr/trap/dbcc, run for just 1
instruction, else run until pc points just after the current branch
instruction (so having 'n' handles dbcc like othe bsr/jsr/trap should
not require too much code).

Now, if someone feels like adding this, don't hesitate :)

The reason why it's not currently supported, is that branching
can also be forwards.  Then "n" command breakpoint for the next
instruction might never terminate, which IMHO is worse than
lacking support for skipping loops.

Does somebody feel adding support for determining when instruction
at PC is a branch going backwards?  :-)


	- Eero



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/