Re: [hatari-devel] Bcc target address in debugger

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


Eero Tamminen schrieb:
Hi,

On 29.8.2021 23.39, Miro Kropáček wrote:
I've been playing with Hatari's debugger for the past few days and I don't
get one thing. Why does it always show $0000000 as the target address? Like
this:

CPU=$1889a, VBL=972, FrameCycles=565296, HBL=276, LineCycles=48, DSP=N/A
0001889A 66fa                     BNE.B #$fa == $00000000 (T)

There wasn't a single case where I'd see something else. The T/F indicator
works, the jump itself works, I just don't understand that that zero is
supposed to mean. Latest Hatari, nothing strange, just stepping the code.

I think either Toni or Nicolas need to answer this...

Well.... It seems that the UAE disassembler uses 0xFFFFFFFF as a special
value to indicate whether a source or destination address is valid:
https://github.com/tonioni/WinUAE/blob/1e81c84ed109b945dce6bdbba10eda9da3e35d64/disasm.cpp#L1743
Hatari, however, for reasons unknown to me, initializes these variables
to 0 instead:
https://git.tuxfamily.org/hatari/hatari.git/tree/src/cpu/disasm.c#n1754
Unfortunately, when printing the target address, it checks for the
special value to decide which address to use and ends up using deaddr2
instead of seaddr2:
https://git.tuxfamily.org/hatari/hatari.git/tree/src/cpu/disasm.c#n2190

Regards
Christian
--
Christian Zietz  -  CHZ-Soft  -  czietz@xxxxxxx
WWW: https://www.chzsoft.de/
PGP/GnuPG-Key-ID: 0x52CB97F66DA025CA / 0x6DA025CA



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