This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Support DW_OP_call2 and DW_OP_call4 (PR 10640)

>>>>> "Jan" == Jan Kratochvil <> 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 dwarf_symbol
  struct symbol base;
  int offset;

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  <>
Jan> 	Fix PR 10640.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]