Re: [hatari-devel] Demangle option for gst2ascii & internal Symbol_Load() command |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Hi Thorsten,
On 27.2.2023 11.41, Thorsten Otto wrote:
Attached are two patches that add support to demangle c++ style symbol names
directly when loading symbols. For gst2ascii that is only for convenience,
since the output can also be filtered through m68k-atari-mint-c++filt, but
that would be hardly possible when directly loading the symbol table from the
program.
Thanks for the patches, and sorry for not replying to your comment in
Atari forum!
However, I've already added more generic mechanism for being able to
autoload demangled symbols in Hatari:
https://git.tuxfamily.org/hatari/hatari.git/commit/?id=e1e4a5bb503d4736caf3d99a4a638535a307d1f8
So I'm a bit hesitant to add large amount of additional code for another
mechanism to achieve the same.
As to the patch itself, I wonder why '.' "assembly prefix" handling in
"demangle_it()" is necessary, is somebody really using mangled names in
m68k assembly?
Currently the main problem with demangled symbols is that they cannot be
given for debugger commands (e.g. as breakpoints), because debugger uses
white space as argument separator, which does not work with C++ symbols
(as they can contain almost any ASCII characters).
I think that should be fixed before adding any additional demangling
support.
Handling that would require modifying the symbol names during TAB
completion. Either by replacing all spaces temporarily with some other
character (e.g. '@'), which would be ugly, or by auto-quoting the symbol
names.
Latter would be a better, but it's more work because it also requires
debugger parsing quoted content correctly, maybe also changing the '"'
character (currently used to indicate given string needed evaluation
before being given to debugger).
- Eero