GST2ASCII(1)
π GST2ASCII π
okay bestie, welcome to the gst2ascii page from the Hatari utilities manual, section 1. it's a little command-line tool and honestly? it eats. let's get into it π«Ά
β¨ NAME β¨
gst2ascii β filter and output Atari program symbol table as ASCII πΈ
π¦ SYNOPSIS π¦
gst2ascii [options] <program>
π DESCRIPTION π
so here's the vibe: gst2ascii reads the symbol table from the Atari program you hand it, and spits it back out in the ASCII format that the Hatari debugger and its profiler data post-processor understand. it's giving translator but make it symbols β¨
it supports symbol tables in the traditional DRI/GST, GNU a.out and the new GCC PRGELF formats. all three, no cap π
lowkey important: every symbol address this tool outputs is TEXT relative. so when you load them into the Hatari debugger, you only need to give justTEXTas the offset for thesymbolscommand. that's it. that's the whole thing.
there are also some options for filtering what ends up in the symbol table content, and the resulting ASCII output is easy to edit by hand too β like, in case you need to remove other symbols (e.g. loop labels π) from it, or add in missing function symbols. so flexible. so main character.
π OPTIONS π
one bullet per flag, no skips, we're thorough in this house:
-aβ filter absolute symbols out of the output. (absolute = value, not address, fyi.)-bβ filter BSS symbols out of the output.-dβ filter DATA symbols out of the output.-fβ filter (object) file/path name symbols out of the output.-gβ filter GCC internal (object) symbols out of the output.-lβ filter local (.L*) symbols out. normally these are useless because they don't have names, just numbers π-nβ sort the symbol output by symbol names, not by their addresses.-sβ filter out symbols with duplicate addresses from the output.-tβ filter TEXT symbols out of the output.-wβ filter weak symbols out of the output.
by default, the same filter options are enabled as in the Hatari debugger. periodt.
and here's the cute little trick π β if you prefix an option letter with + instead of -, it keeps the indicated symbol type, if that type was disabled in the tool defaults (or got disabled by an option you gave earlier on the command line). so +a = keep the absolutes, bestie. iconic behaviour fr fr.
π NOTES π
if you're having problems, try nm -n <program> instead (either the Atari native version or the cross-compiler version). and if nm works but gst2ascii does not? please report a bug on it π we'd love to know.
π EXAMPLES π
save program.prg's symbol table in ASCII format, with local symbols filtered out:
gst2ascii -l program.prg > program.sym
load the generated ASCII symbols file in the Hatari debugger:
symbols program.sym TEXT DATA BSS
slay. look at you go π₯³
π₯ SEE ALSO π₯
π AUTHOR π
written by Eero Tamminen <oak at helsinkinet fi>. king behaviour honestly π
πΈ 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. go forth and share the love π«Ά
β 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. (read: no promises, bestie, it's free software π)
and that's the whole page!! from the Hatari crew, this version dated 2023-09-03 π go filter some symbols, you've got this. bye bestie!! πβ¨π¦
π¦ where this page comes from
- debian trixie: hatari 2.5.0+dfsg-1+b1 Β· GPL-2.0-or-later
- fedora 43: hatari 2.6.1-1.fc43 Β· GPL-2.0-or-later
- fedora 43: hatari 2.6.1-3.fc43 Β· GPL-2.0-or-later
- fedora 44: hatari 2.6.1-1.fc44 Β· GPL-2.0-or-later
- fedora 44: hatari 2.6.1-3.fc44 Β· GPL-2.0-or-later
- ubuntu questing: hatari 2.5.0+dfsg-2
- ubuntu resolute: hatari 2.6.1+dfsg-2 Β· GPL-2.0-or-later
- ubuntu stonking: hatari 2.6.1+dfsg-3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms