public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "jan.kratochvil at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug corefiles/12823] New: physname: discrepancies between DW_AT_name and demangler
Date: Mon, 30 May 2011 08:54:00 -0000	[thread overview]
Message-ID: <bug-12823-4717@http.sourceware.org/bugzilla/> (raw)

http://sourceware.org/bugzilla/show_bug.cgi?id=12823

           Summary: physname: discrepancies between DW_AT_name and
                    demangler
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: corefiles
        AssignedTo: unassigned@sourceware.org
        ReportedBy: jan.kratochvil@redhat.com
                CC: keiths@redhat.com
            Target: x86_64-fedora14-linux-gnu


DMGL_VERBOSE:  nm -C does not use DMGL_VERBOSE:
libstdc++.so.6.0.16.debug
00000000000a4e50 t bool __gnu_cxx::operator==<char*,
std::string>(__gnu_cxx::__normal_iterator<char*, std::string> const&,
__gnu_cxx::__normal_iterator<char*, std::string> const&)

But the DIE uses "DMGL_VERBOSE":
 <2><1836e2>: Abbrev Number: 29 (DW_TAG_subprogram)
    <1836e4>   DW_AT_name        : (indirect string, offset: 0x2e3f0):
operator==<char*, std::basic_string<char> >
 <1><188ab4>: Abbrev Number: 103 (DW_TAG_subprogram)
    <188ab5>   DW_AT_specification: <0x1836e2>
 <1><193100>: Abbrev Number: 129 (DW_TAG_subprogram)
    <193102>   DW_AT_abstract_origin: <0x188ab4>
    <193106>   DW_AT_low_pc      : 0xa4e50

Therefore physname is then:
__gnu_cxx::operator==<char*, std::basic_string<char>
>(__gnu_cxx::__normal_iterator<char*, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > > const&,
__gnu_cxx::__normal_iterator<char*, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > > const&)

and physname does not match the ELF symbol (as symbol_find_demangled_name
during elfread.c does not use DMGL_VERBOSE like nm -C does not).

I do not say if DMGL_VERBOSE yes or no (and so whether to patch nm.c etc.) but
it needs to be in sync, for a symbol from nm -C:

(gdb) break '__gnu_cxx::operator==<char*,
std::string>(__gnu_cxx::__normal_iterator<char*, std::string> const&,
__gnu_cxx::__normal_iterator<char*, std::string> const&)'
Function "__gnu_cxx::operator==<char*,
std::string>(__gnu_cxx::__normal_iterator<char*, std::string> const&,
__gnu_cxx::__normal_iterator<char*, std::string> const&)" not defined.

GCC DW_AT_name discussed at:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49130#c6

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


             reply	other threads:[~2011-05-30  8:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-30  8:54 jan.kratochvil at redhat dot com [this message]
2011-05-30  8:55 ` [Bug breakpoints/12823] " jan.kratochvil at redhat dot com
2024-03-30 20:18 ` [Bug symtab/12823] " tromey at sourceware dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-12823-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).