This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFC: C/C++ preprocessor macro support for GDB
For what it's worth:
Compiling GDB with -gdwarf-2 -g3 yields an executable with a 14Mb
.debug_macinfo section. However, most of that is repetition; there is
actually only 247k of unique text in there.
The Dwarf 2 reader currently wants to pull the entire contents of
every .debug_mumble section it can find into memory. So debugging
that GDB will increase the superior GDB's memory consumption by 14Mb.
However, the format-independent data structures that GDB builds from
that Dwarf 2 data use bcaches to store all the strings. The bcaches
keep only one copy of any given string, and everyone just points at
those copies. So those structures are well-behaved; all of GDB's
macro information would only occupy 247k + overhead in that form.