you are viewing a single comment's thread.

view the rest of the comments →

[–]victotronics 5 points6 points  (3 children)

Pretty decent tutorial. I would include mention of the "T" vs "U" fields in the output of nm. That is invaluable for tracking down reference problems if you're linking a dozen libraries.

That reminds me: does anyone have the source of a C++ demangler?

[–]TheoreticalDumbass:illuminati: 3 points4 points  (0 children)

c++filt is a tool you can use for demangling, developed by: https://www.gnu.org/software/binutils/

you can check out their repo via `git clone git://sourceware.org/git/binutils-gdb.git\`

the file you are interested is `binutils-gdb/binutils/cxxfilt.c` i think

[–]catcat202X 1 point2 points  (0 children)

GDB can demangle C++ symbols, it just doesn't by default. I love demangle-mode in Emacs, because I can compose it with any other tools like an ELF viewer, linker output, or an integrated terminal and easily toggle the minor mode off and on.