|[hatari-devel] Loading symbol info from program DRI/GST symbol table|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
On keskiviikko 20 helmikuu 2013, Eero Tamminen wrote:
> On keskiviikko 20 helmikuu 2013, Miro Kropáček wrote:
> > > Eero provided a python based symbol converter which processes Devpac
> > > listing files, providing the listing has been configured to append
> > > the symbol table at the end.
> > This is really painful. Isn't possible to do it on runtime?
I've now added support to Hatari for loading symbols from DRI & GST format
symbol tables in binaries.
(DRI format's 8 char limit on symbol names makes it mostly useless, but
happily GST is backwards compatible with DRI symbol table and supports
up to 22 chars in symbol names.)
> > For example, Hatari can surely detect a GEMDOS call.
> GEMDOS calls are hooked only if one is using GEMDOS HD emulation.
> I.e. it doesn't work for things running from floppies, IDE or
> ASCI images, or under MiNT.
If program is loaded through GEMDOS emulation, its symbols can
be loaded with "symbols prg" command. I've changed GEMDOS HD emulation
to remember first program file Fopen()ed after last Pexec() call
(and forget the name on Pterm0/Pterm).
If program is started from a cartridge/floppy/HD image, or under MiNT,
one can still load its symbol table, by explicitly giving the correct file
for "symbols" command, like this:
(You could even have stripped binary on an image as long as you give
"symbols" command a file name for a non-stripped version of the same build.)
> > So if it's Pexec(), take a look at its filename parameter, load it,
> > check its symbol table and use it.
It doesn't load symbols automatically, but "symbols prg"
command hopefully makes this much easier to use.
> Pexec() isn't used for loading DSP code , loading TOS images,
> loading cartridge code, or for code blob loaded from disk that is
> just put to memory into some fixed address, or to dynamically
> allocated memory.
> Then there's the question of whether one should support
> DRI or a.out symbol tables?
a.out symbol information was more complicated so I skipped that:
If somebody wants support for that, I accept patches. :-)