[PATCH] gdb: use actual DWARF version in compunit's debugformat field
Tom Tromey
tom@tromey.com
Fri Nov 19 20:41:35 GMT 2021
>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
Simon> - get_builder ()->record_debugformat ("DWARF 2");
Simon> + get_builder ()->record_debugformat
Simon> + (gdb_obstack_printf
Simon> + (&this->per_objfile->objfile->objfile_obstack,
Simon> + "DWARF %u", this->header.version));
Simon> get_builder ()->record_producer (producer);
If you use objfile::intern, you'll end up with just a single copy of
this string on the obstack, instead of one per CU.
Tom
More information about the Gdb-patches
mailing list