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/25834] [cc-with-gdb-index,cc-with-debug-names] FAIL: gdb.dwarf2/dup-psym.exp: info sources should contain only one reference to file1.txt (file1.txt seen more than once)
Date: Sat, 17 Jul 2021 17:18:03 +0000	[thread overview]
Message-ID: <bug-25834-4717-gtulZCNq7I@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-25834-4717@http.sourceware.org/bugzilla/>

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

--- Comment #4 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=1fd5fd5817dee816f30d0573b2d0ca1affb62836

commit 1fd5fd5817dee816f30d0573b2d0ca1affb62836
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Jul 4 13:48:33 2021 -0600

    Fix file-name handling regression with DWARF index

    When run with the gdb-index or debug-names target boards, dup-psym.exp
    fails.  This came up for me because my new DWARF scanner reuses this
    part of the existing index code, and so it registers as a regression.
    This is PR symtab/25834.

    Looking into this, I found that the DWARF index code here is fairly
    different from the psymtab code.  I don't think there's a deep reason
    for this, and in fact, it seemed to me that the index code could
    simply mimic what the psymtab code already does.

    That is what this patch implements.  The DW_AT_name and DW_AT_comp_dir
    are now stored in the quick file names table.  This may require
    allocating a quick file names table even when DW_AT_stmt_list does not
    exist.  Then, the functions that work with this data are changed to
    use find_source_or_rewrite, just as the psymbol code does.  Finally,
    line_header::file_full_name is removed, as it is no longer needed.

    Currently, the index maintains a hash table of "quick file names".
    The hash table uses a deletion function to free the "real name"
    components when necessary.  There's also a second such function to
    implement the forget_cached_source_info method.

    This bug fix patch will create a quick file name object even when
    there is no DW_AT_stmt_list, meaning that the object won't be entered
    in the hash table.  So, this patch changes the memory management
    approach so that the entries are cleared when the per-BFD object is
    destroyed.  (A dwarf2_per_cu_data destructor is not introduced,
    because we have been avoiding adding a vtable to that class.)

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

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

  parent reply	other threads:[~2021-07-17 17:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-16  8:26 [Bug symtab/25834] New: [cc-with-gdb-index] " vries at gcc dot gnu.org
2020-04-16  9:52 ` [Bug symtab/25834] " vries at gcc dot gnu.org
2020-04-16 10:42 ` vries at gcc dot gnu.org
2020-04-22  7:42 ` [Bug symtab/25834] [cc-with-gdb-index,cc-with-debug-names] " vries at gcc dot gnu.org
2021-07-07 21:51 ` vries at gcc dot gnu.org
2021-07-08 16:21 ` tromey at sourceware dot org
2021-07-17 17:18 ` cvs-commit at gcc dot gnu.org [this message]
2022-05-07 15:41 ` 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-25834-4717-gtulZCNq7I@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).