This is the mail archive of the
mailing list for the GDB project.
Re: [patch] Support DW_OP_call2 and DW_OP_call4 (PR 10640)
- From: Tom Tromey <tromey at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 12 Oct 2009 14:43:04 -0600
- Subject: Re: [patch] Support DW_OP_call2 and DW_OP_call4 (PR 10640)
- References: <20090920123647.GA30021@host0.dyn.jankratochvil.net>
- Reply-to: tromey at redhat dot com
>>>>> "Jan" == Jan Kratochvil <email@example.com> writes:
Jan> as GCC discusses its use in PR41343 the patch implements it for GDB.
Jan> It has some new overhead due to symbol_hash for all symbol DIEs.
Jan> Did not measure it but I am not aware much how it could be avoided
Jan> as GDB does not parse the DWARF blocks while reading them in.
Yeah, I could not think of a way to avoid it either. I think parsing
the DWARF while reading would be worse than what you have now, because
(IIUC) it would negatively impact performance.
I thought of one way to reduce the overhead a bit, but it is fairly
gross. We could have dwarf2read.c make symbols like:
struct symbol base;
Then, where it matters, "downcast" from symbol to dwarf_symbol and find
the offset. symbol_hash would just directly hold dwarf_symbols, no need
for struct dwarf2_offset_and_symbol.
This would save a pointer per symbol.
That said, I probably would not bother with this until we know that
space is an issue. I know that symtab.h claims that symbol size is a
problem, but I am not sure that this is really true -- I suspect it is
only the case with -readnow, which most people don't use.
The ugliness here is that it assumes that no other part of gdb cares
about the size of a symbol. This is probably true but also a fragile
Jan> 2009-09-20 Jan Kratochvil <firstname.lastname@example.org>
Jan> Fix PR 10640.