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 testsuite/30158] rustc testsuite fails with 13.1, apparently worked before with trunk 20230114 on i686-linux-gnu and powerpc64le-linux-gnu
Date: Mon, 13 Mar 2023 20:17:24 +0000	[thread overview]
Message-ID: <bug-30158-4717-jL0IKNnAdp@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-30158-4717@http.sourceware.org/bugzilla/>

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

--- Comment #16 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=5f056fcb3dce947447063f5ab225042177a59722

commit 5f056fcb3dce947447063f5ab225042177a59722
Author: Tom Tromey <tromey@adacore.com>
Date:   Fri Feb 24 10:40:16 2023 -0700

    Fix crash in inside_main_func

    gdb 13.1 crashes while running the rust compiler's debugger tests.
    The crash has a number of causes.

    First, the rust compiler still uses the C++-like _Z mangling, but with
    its own twist -- some hex digits added to the end of a symbol.  So,
    while gdb finds the correct name of "main":

    (top-gdb) p name
    $13 = 0x292e0c0 "rustc_gdb_1031745::main"

    It isn't found in the minsyms, because C++ demangling yields:

    [99] t 0x90c0 _ZN17rustc_gdb_10317454main17h5b5be7fe16a97225E section .text
 rustc_gdb_1031745::main::h5b5be7fe16a97225  zko06yobckx336v

    This could perhaps be fixed.  I also filed a new PR to suggest
    preferring the linkage name of the main program.

    Next, the rust compiler emits both a DW_TAG_subprogram and a
    DW_TAG_namespace for "main".  This happens because the file is named
    "main.rs" -- i.e., the bug is specific to the source file name.  The
    crash also seems to require the nested function inside of 'main', at
    least for me.  The namespace always is generated, but perhaps this
    changes the ordering in the DWARF.

    When inside_main_func looks up the main symbol, it finds the namespace
    symbol rather than the function.  (I filed a bug about fixing gdb's
    symbol tables -- long overdue.)

    Meanwhile, as I think it's important to fix this crash sooner rather
    than later, this patch changes inside_main_func to check that the
    symbol that is found is LOC_BLOCK.  This perhaps should have been done
    in the first place, anyway.

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

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

  parent reply	other threads:[~2023-03-13 20:17 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-23 13:57 [Bug testsuite/30158] New: " doko at debian dot org
2023-02-23 13:57 ` [Bug testsuite/30158] " doko at debian dot org
2023-02-23 16:38 ` hector.oron at gmail dot com
2023-02-23 23:03 ` hector.oron at gmail dot com
2023-02-23 23:12 ` hector.oron at gmail dot com
2023-02-23 23:17 ` hector.oron at gmail dot com
2023-02-24  2:22 ` tromey at sourceware dot org
2023-02-24  8:27 ` hector.oron at gmail dot com
2023-02-24 16:57 ` tromey at sourceware dot org
2023-02-24 17:04 ` tromey at sourceware dot org
2023-02-24 17:09 ` tromey at sourceware dot org
2023-02-24 17:14 ` tromey at sourceware dot org
2023-02-24 17:52 ` tromey at sourceware dot org
2023-02-24 23:15 ` hector.oron at gmail dot com
2023-02-27 12:54 ` hector.oron at gmail dot com
2023-02-27 12:57 ` hector.oron at gmail dot com
2023-03-08 15:05 ` tromey at sourceware dot org
2023-03-08 15:07 ` tromey at sourceware dot org
2023-03-13 20:14 ` tromey at sourceware dot org
2023-03-13 20:17 ` cvs-commit at gcc dot gnu.org [this message]
2023-03-13 20:19 ` cvs-commit at gcc dot gnu.org
2023-03-13 20:20 ` tromey at sourceware dot org
2023-03-22 20:30 ` 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-30158-4717-jL0IKNnAdp@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).