Re: [hatari-devel] Hatari debugger questions

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


Le 25/02/2018 à 22:34, Uwe Seimet a écrit :
Hi,

when trying to use the debugger I stumbled upon some problems. The 'd'
command is supposed to "disassemble from PC, or given address". When I
enter 'd' without any parameters more than once my expectation is
that each time it disassembles starting at the PC location, but it does not:

d
$00023752 : 41e8 0014                          lea       $14(a0),a0
$00023756 : 2148 fffc                          move.l    a0,$fffc(a0)
$0002375a : 2049                               movea.l   a1,a0
$0002375c : 51c9 ffea                          dbra      d1,$23748
$00023760 : 91c0                               suba.l    d0,a0
$00023762 : 4290                               clr.l     (a0)
$00023764 : 205f                               movea.l   (sp)+,a0
$00023766 : 4e75                               rts
d
$00023768 : 207a ba2e                          movea.l   $1f198(pc),a0
$0002376c : 4868 001c                          pea       $1c(a0)
$00023770 : 2f00                               move.l    d0,-(sp)
$00023772 : 4267                               clr.w     -(sp)
$00023774 : 3f3c 004a                          move.w    #$4a,-(sp)
$00023778 : 4e41                               trap      #1
$0002377a : 4fef 000c                          lea       $c(sp),sp
$0002377e : 3f38 0446                          move.w    $0446.w,-(sp)

The second time it disassembles from the next address instead.


hi

this is the intended behaviour as it's often more handy when debugging. the 1st 'd' starts from curent PC, then following 'd' continues from latest addresses. this way, just entering 'd' goes through the code.

this is similar with the 'm' command. After specifying an address with the 1st 'm', next 'm' will automatically continue from the next addresses.

Further, when I change the pc value and then enter 's' my expectation is
that the first command at the new pc location is executed. What happens
instead is that the instruction at the previous (old) pc location is
executed.

Am I doing something wrong? What do I have to do in order to change the
pc value and then to single-step starting at the new pc location?


I will write a small asm test code to check if I can reproduce this.

Nicolas



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