public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "ayermolo at fb dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/29562] New: disas command requires single quote around namespace
Date: Fri, 09 Sep 2022 00:57:41 +0000	[thread overview]
Message-ID: <bug-29562-4717@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 29562
           Summary: disas command requires single quote around namespace
           Product: gdb
           Version: 11.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: ayermolo at fb dot com
  Target Milestone: ---

Not sure if this is exactly a bug in gdb, but I am hoping someone here who is
familiar with internal workings of it can point me into the right direction of
where to start loooking.

I have an internal binary that is build with clang 12.
The structure of relevant debug info below, with all other dies and attributes
removed.:
 DW_TAG_compile_unit [141]
...
DW_TAG_namespace [2] * ()
 DW_AT_name [DW_FORM_strp] ( .debug_str[0xa57a80dd] = "namea")
...
DW_TAG_namespace [2] * 
 DW_AT_name [DW_FORM_strp] ( .debug_str[0x7232f811] = "nameb")
..
 DW_TAG_subprogram [188] * 
                    DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
                    DW_AT_ranges [DW_FORM_sec_offset]
..
                    DW_AT_name [DW_FORM_strp] ( .debug_str[0x667d9d2f] =
"functionName")

When I do disas namea::nameb::functionName 
I get 
No type "nameb" within class or namespace "namea".
If I add single quotes
disas 'namea::nameb::functionName'
It works.

I should add this debug info after this binary has been optimized with BOLT.
https://lists.llvm.org/pipermail/llvm-dev/2020-October/145902.html
Pre BOLT disas namea::nameb::functionName works.
Main thing bolt does is convert DW_AT_low_pc/DW_AT_high_pc into
DW_AT_low_pc/DW_AT_ranges.

Looking at debug information for that CU only real difference is one mentioned
above. The type references all point to correct dies. In LLDB it works, but it
might be doing things differently.

I am trying to figure out if BOLT is somehow doing something wrong, or maybe
it's triggering something in GDB.

Thanks.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

                 reply	other threads:[~2022-09-09  0:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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-29562-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).