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/29694] [gdb, gdb-index] FAIL: gdb.cp/stub-array-size.exp: print sizeof(a)/sizeof(a[0])
Date: Fri, 21 Oct 2022 16:13:27 +0000	[thread overview]
Message-ID: <bug-29694-4717-3wKlcov6Ta@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29694-4717@http.sourceware.org/bugzilla/>

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

--- Comment #7 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <tromey@sourceware.org>:

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

commit 2afd002ac6acb01763d643686345cc0c6ad564bd
Author: Tom Tromey <tromey@adacore.com>
Date:   Mon Oct 17 12:21:10 2022 -0600

    Fix incorrect .gdb_index with new DWARF scanner

    PR symtab/29694 points out a regression caused by the new DWARF
    scanner when the cc-with-gdb-index target board is used.

    What happens here is that an older version of gdb will make an index
    describing the "A" type as:

    [737] A: 1 [global, type]

    whereas the new gdb says:

    [1008] A: 0 [global, type]

    Here the old one is correct because the A in CU 0 is just a
    declaration without a size:

     <1><45>: Abbrev Number: 10 (DW_TAG_structure_type)
        <46>   DW_AT_name        : A
        <48>   DW_AT_declaration : 1
        <48>   DW_AT_sibling     : <0x6d>

    This patch fixes the problem by introducing the idea of a "type
    declaration".  I think gdb still needs to recurse into these types,
    searching for methods, but by marking the type itself as a
    declaration, gdb can skip this type during lookups and when writing
    the index.

    Regression tested on x86-64 using the cc-with-gdb-index board.

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

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

  parent reply	other threads:[~2022-10-21 16:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-16  7:41 [Bug symtab/29694] New: " vries at gcc dot gnu.org
2022-10-16  7:41 ` [Bug symtab/29694] " vries at gcc dot gnu.org
2022-10-16  7:43 ` vries at gcc dot gnu.org
2022-10-16 15:39 ` vries at gcc dot gnu.org
2022-10-16 16:10 ` tromey at sourceware dot org
2022-10-17  3:59 ` vries at gcc dot gnu.org
2022-10-17 15:48 ` tromey at sourceware dot org
2022-10-17 15:56 ` tromey at sourceware dot org
2022-10-17 16:04 ` tromey at sourceware dot org
2022-10-17 19:41 ` tromey at sourceware dot org
2022-10-21 16:13 ` cvs-commit at gcc dot gnu.org [this message]
2022-10-21 16:14 ` 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-29694-4717-3wKlcov6Ta@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).