Re: [hatari-devel] Hatari Debugger Symbols

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


Am Dienstag, den 10.12.2019, 21:30 +0200 schrieb Eero Tamminen:
> Hi,
> 
> On 12/9/19 7:14 AM, Markus Fröschle wrote:
> > I'm currently struggling with the Hatari debugger trying to find a
> > problem in a resident program (terminating with a Ptermres() call).
> > 
> > Is there a way to retain/reload the program's symbols after
> > Ptermres()?
> 
> Yes to both.
> 
> Hatari config file [Debugger] section [1]
> "bSymbolsResident" option controls whether
> (autoloaded) symbols will be removed when program
> exits.
> 
> You can also load symbols at any point with the "symbols" command, 
> either from separate (ASCII)
> symbols file, or from a program binary that
> includes a symbol table.  Manual gives several
> examples on different ways to do that.

Thank you, Eero. This is what I tried before, but can't get to work. I
probably need to be more specific: if I try to load the symbols from
the executable at any arbitrary point, I get:

Reading symbols from program 'auto/fvdi_gnu.prg' symbol table...
GCC/MiNT executable, a.out symbol table, reloc=0, program flags:
FASTLOAD TTRAMLOAD TTRAMMEM SUPER (0x27)
ERROR: no valid program basepage!

Which is reasonable as Hatari obviously needs a valid basepage to
retrieve decipher relocation info.

When I do this after the resident program loaded but not yet executed
its Ptermres() call, the symbols are there, but vanish after next
Pexec() call:

>  cont
Returning to emulation...Program launch, removing previous program
symbols.

It doesn't seem to make a difference whether I set the bSymbolsResident
or not.

If I try this later (after fvdi did its Ptermres() call), I get this:

symbols auto/fvdi_gnu.prg
WARNING: given program doesn't match last program executed by GEMDOS HD
emulation:
	/home/mfro/Dokumente/Development/atari/fvdi_test/bench/bench.ap
p
Reading symbols from program 'auto/fvdi_gnu.prg' symbol table...
GCC/MiNT executable, a.out symbol table, reloc=0, program flags:
FASTLOAD TTRAMLOAD TTRAMMEM SUPER (0x27)
ERROR: given program TEXT section size differs from one in RAM!
ERROR: reading symbols from 'auto/fvdi_gnu.prg' failed!

Which is reasonable as well, as I loaded another program in between and
Hatari probably registered another basepage address.

The setting of bSymbolsResident (isn't that the same thing as the
'symbols resident' command from within the debugger?) does not change
anything - it appears to make Hatari retain symbols until next program
load only?

It appears I'd need a 'symbols' command that allows me to pass the 
basepage address of my resident program (and probably relaxed sizechecking) to make that work? 





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