GST2ASCII(1)

πŸ“¦
version 2.6.1 Β· 2 versions
, in debian trixie, fedora 43, fedora 44, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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 just TEXT as the offset for the symbols command. 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!! πŸŽ€βœ¨πŸ¦‹