Re: [hatari-devel] Little asm question

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


Hi,

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?

Sure, set up breakpoints for doing the loading and script that.

In the profile case you can also give them just to the post-processing
script unless you want callgraphs (as symbols are used to indicate
for which functions one wants to get a callgraph, for TOS, for
some program, for cartridge code...).


> 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.


> So if it's Pexec(), take a look at its filename parameter, load it,
> check its symbol table and use it.

Pexec() isn't used for loading DSP code [1], 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?


And it of course doesn't work for stripped binaries. If one is e.g.
debugging some binary-only program, one could slowly create a list
of names for subroutines in code to be able to better debug it
(after loading the list with Hatari "symbols" command).

How one would convert such a list to DRI or a.out symbols table
and add it to the binary?


	- Eero

[1] Currently there's no code in symbols.c to differentiate between
    DSP and CPU symbols, except small wrappers to put them into & look
    them from different lookup tables.



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