public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug symtab/30739] [gdb/symtab] wrong parent for cooked index entry
Date: Thu, 10 Aug 2023 19:16:51 +0000	[thread overview]
Message-ID: <bug-30739-4717-ylggrrhgI8@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-30739-4717@http.sourceware.org/bugzilla/>

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

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8f258a6c979420c33845f60575e7ed025e6dcd9d

commit 8f258a6c979420c33845f60575e7ed025e6dcd9d
Author: Tom de Vries <tdevries@suse.de>
Date:   Thu Aug 10 21:16:30 2023 +0200

    [gdb/symtab] Dump qualified name of cooked_index_entry

    When doing "maint print objfiles" for the exec of test-case
    gdb.dwarf2/pr13961.exp, we get:
    ...
        [25] ((cooked_index_entry *) 0x37b25d0)
        name:       foo
        canonical:  foo
        DWARF tag:  DW_TAG_class_type
        flags:      0x0 []
        DIE offset: 0x2a
        parent:     ((cooked_index_entry *) 0)

        [26] ((cooked_index_entry *) 0x37b2630)
        name:       foo
        canonical:  foo
        DWARF tag:  DW_TAG_class_type
        flags:      0x0 []
        DIE offset: 0x25
        parent:     ((cooked_index_entry *) 0x37b25d0) [foo]
    ...

    By following the parent links in the text, we can conclude that the
qualified
    name of DIE 0x25 is foo::foo (which is incorrect, that's PR symtab/30739).

    But it's not evident, and also hard to verify in a test-case.

    Add dumping of the qualified name, such that we have:
    ...
        [25] ((cooked_index_entry *) 0x333b5d0)
        name:       foo
        canonical:  foo
        qualified:  foo
        DWARF tag:  DW_TAG_class_type
        flags:      0x0 []
        DIE offset: 0x2a
        parent:     ((cooked_index_entry *) 0)

        [26] ((cooked_index_entry *) 0x333b630)
        name:       foo
        canonical:  foo
        qualified:  foo::foo
        DWARF tag:  DW_TAG_class_type
        flags:      0x0 []
        DIE offset: 0x25
        parent:     ((cooked_index_entry *) 0x333b5d0) [foo]
    ...

    Tested on x86_64-linux.

    Approved-By: Tom Tromey <tom@tromey.com>

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

  parent reply	other threads:[~2023-08-10 19:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-09 14:14 [Bug symtab/30739] New: [gdb/symtab] wrong vries at gcc dot gnu.org
2023-08-09 14:15 ` [Bug symtab/30739] [gdb/symtab] wrong parent for cooked index entry vries at gcc dot gnu.org
2023-08-09 15:11 ` vries at gcc dot gnu.org
2023-08-10 19:16 ` cvs-commit at gcc dot gnu.org [this message]
2023-08-10 19:16 ` cvs-commit at gcc dot gnu.org
2023-08-10 19:19 ` vries at gcc dot gnu.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-30739-4717-ylggrrhgI8@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).