Re: [hatari-devel] Symbols visibility in debugger code

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


Hi,

On 18.7.2021 14.17, Thorsten Otto wrote:
On Sonntag, 18. Juli 2021 13:06:18 CEST Troed Sångberg wrote:
(I'm also not sure I understand what you mean, the symbols table has the
addresses - so unless $1000 was a valid symbol it would not be replaced)

Yes, but that was just an example. Replace $10000 by $70000 and you may end up
with a value that might as well be a valid program address, but actually
wasn't used that way.

In an object file, you have relocation entries. That means there is an info
about the 2nd instruction that the symbol "mylabel" was referenced there. But
such relocation information is missing in linked programs. So you can try to
do some heuristic about values being inside the programs text/data/bss
segments, but then you might end up with printing some unrelated symbol name
for the first instruction in my example, and that might be even more
confusing.

Hatari handles relocations in gemdos.c when loading program through GEMDOS HD emulation.

Maybe that information could be cached and
be used for this?


	- Eero



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