gst2ascii - Man Page
Filter and output Atari program symbol table as ASCII
Synopsis
gst2ascii [options] <program>
Description
gst2ascii reads symbol table from the given Atari program, and outputs it in the ASCII format understood by the Hatari debugger and its profiler data post-processor. Symbol tables in the traditional DRI/GST, GNU a.out and new GCC PRGELF formats are supported.
All symbol addresses output by the tool are TEXT relative, so when loading them in Hatari debugger, one needs to give just TEXT as offset for the 'symbols' command.
There are some options for filtering the symbol table content, and the resulting ASCII output is easy to edit also by hand, in case other symbols (e.g. loop labels) need to be removed from it, or missing function symbols need to be added to it.
Options
- -a
Filter absolute (= value, not address) symbols out from the output.
- -b
Filter BSS symbols out from the output.
- -d
Filter DATA symbols out from the output.
- -f
Filter (object) file/path name symbols out from the output.
- -g
Filter GCC internal (object) symbols out from the output.
- -l
Filter local (.L*) symbols out. Normally they are useless because they do not have names, just numbers.
- -n
Sort symbol output by symbol names, not by their addresses.
- -s
Filter out symbols with duplicate addresses from the output.
- -t
Filter TEXT symbols out from the output.
- -w
Filter weak symbols out from the output.
By default, same filter options are enabled as in Hatari debugger. Prefixing option letter with '+' instead of '-', keeps the indicated symbol type, if that type was disabled in the tool defaults (or by an option given earlier on the command line).
Notes
If you have problems, try with 'nm -n <program>' instead (Atari native or cross-compiler version). If nm works, but gst2ascii does not, please report a bug on it.
Examples
Save 'program.prg' symbol table in ASCII format with local symbols filtered out:
gst2ascii -l program.prg > program.sym
Load generated ASCII symbols file in Hatari debugger:
symbols program.sym TEXT DATA BSS
See Also
Author
Written by Eero Tamminen <oak at helsinkinet fi>.
License
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
No Warranty
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.