Re: GDB not looking up some debug symbols

Paul Smith <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
I didn't get any response to my email (below) but I'm hoping there's
some way to kick-start a conversation here.

I'm seeing more issues where GDB is not able to look up types: it's
becoming a real problem.  My attempts to get GCC to make changes have
generally resulted in push-back saying that GDB needs to enhance the way
it deals with types.  I'm kind of stuck between here; I don't really
want to start an email thread CC'ing both mailing lists but maybe that's
what's needed.

The last comment to my bug below was:

> Xi Ruoyao 2017-09-01 10:29:09 UTC 
> (In reply to Jonathan Wakely from comment #26)
> > The demangled names are not in a canonical/standardized format, or
> > unambiguous, or portable between different compilers, so that isn't a
> > complete solution.
> 
> Yes.  Could GDB search the symbol with linkage name?

I'm assuming by "linkage name" Xi means the mangled name.  I'm sure
there's some reason that GDB doesn't do lookups on mangled names but
instead uses the demangled name.

In addition to that I found this type lookup bug, which happens even
with GCC 6.2:

https://sourceware.org/bugzilla/show_bug.cgi?id=22013

Can we discuss this and try to decide how to move forward?  It seems
like with every release of GCC my ability to debug my code is reduced.


On Fri, 2017-08-25 at 13:20 -0400, Paul Smith wrote:
> Hi all.  When testing GCC 7.2 I discovered that there has been a change
> in the format of symbols, specifically related to unsigned values in
> template arguments.  This is causing GDB to throw tons of "warning: RTTI
> symbol not found" warnings when trying to use the Python GDB interface
> with these types.
> 
> A description, including test case (you need GCC 7.x--I think the
> problem is in 7.1 as well since the change went into GCC last fall but I
> didn't test it), is available in the GCC bug report I filed:
> 
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932
> 
> There is a contention in comments to the bug that this isn't really an
> issue for GCC, but instead that GDB should be solving this.  My gut
> tells me that solving it in GDB would be hard but I'm so unfamiliar with
> how this works that I can't say for sure.
> 
> I filed it against GCC because it's a change in behavior of GCC.  I
> wondered if anyone from the GDB camp wanted to add a comment or two
> about this from their perspective.
> 
> 
> I should add that I'm seeing another RTTI symbol not found warning when
> compiling with GCC 6.2, related to a default value in a template.  I'll
> send more details when I've got them, but I wonder if there is a larger
> issue of debug symbol name matching that needs to be addressed, maybe
> through some GDB / GCC cooperation.  It seems that maybe the DWARF spec
> is not specific enough for all situations (or maybe this one is just a
> bug).
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.