Description
I came across the symbolization support page for cpp and the steps documented to add debug information. There are a couple of options in clang and gcc which can be more effective.
-
The
-g
(equivalent to-g2
) flag generates a lot of debug information, most of which is unnecessary for symbolization. You can reduce the amount of debug information to only line tables by using-gmlt
or-g1
. -
The
-gsplit-dwarf
flag can generate debug information in a separate file. This helps reduce memory (and time) when linking large binaries with debug information in them. The debug information for each object file is placed in a.dwo
file which can then be linked together to a single.dwp
file. I believe this will save the objcopy steps.
Have you considered using these options?
Activity
brancz commentedon Oct 13, 2023
Great questions!
Absolutely, line tables are sufficient for our purposes. I'll make sure we adapt the docs here!
At the moment we don't support dwarf packages, but we definitely want to!