This is the mail archive of the gdb@sourceware.org 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: Get versioned minsyms from dynamic symtab (Was: Re: How to call operator<< functions?)


Frederic RISS wrote:
On Linux, versioned ELF symbols are stored in the static symtab with an
(@)@VERSION suffix. We store such symbols with the suffix and thus fail
to find them when looking up the real name.

This causes failures such as the one described here:
http://www.sourceware.org/ml/gdb/2006-08/msg00244.html

In the general case, GDB doesn't use the dynamic symtab because it
contains usually only a subset of the static table information. The
attached patch make GDB store dynamic versioned symbols.


Maybe this is harvests too much symbols, and we should limit it to the
dynamic symbols of the main executable. It's easy enough to do, we just
need to pass the 'mainline' flag to elf_symfile_read from
elf_symtab_read.


I've no idea if this could break something on non-Linux platforms, I've
just tested on x86-linux.

I'm also attaching a little testsuite patch that fails for me on current
GDB and works with the patch.

Opinions?
Great, now std::cout does not cause crashes. Still there is the problem of

   (gdb) p std::cout
   $1 = <incomplete type>

But that's unrelated, right?
The problem with this result is that it sometimes confuses GDB as described at the end of:
http://sources.redhat.com/ml/gdb/2006-08/msg00271.html


Michael


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