public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/29558] New: [gdb/symtab] Handle gas-generated debug info (DW_TAG_unspecified_type) Date: Thu, 08 Sep 2022 08:38:17 +0000 [thread overview] Message-ID: <bug-29558-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=29558 Bug ID: 29558 Summary: [gdb/symtab] Handle gas-generated debug info (DW_TAG_unspecified_type) Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- I. A recent commit 5578fbf672e ("GAS: Add a return type tag to DWARF DIEs generated for function symbols") fixes a problem with gas-generated dwarf info. So, let's see if we can reproduce the problem and test the fix in gdb. Multi-source test-case: ... $ cat test.c extern int foo (void); int main (void) { int res = foo (); return res; } $ cat test2.c int foo (void) { return 0; } ... Test script: ... $ cat compile.sh #!/bin/sh as=/home/vries/binutils/install/bin/as gcc -c -g test.c gcc -S test2.c $as --64 -gdwarf-5 -o test2.o test2.s gcc test.o test2.o ./gdb.sh -batch a.out -ex start -ex "p foo" -ex "p (int) foo ()" ... II. 2.38 Using $as from 2.38: ... $ ./compile.sh Temporary breakpoint 1 at 0x40049f: file test.c, line 6. Temporary breakpoint 1, main () at test.c:6 6 int res = foo (); $1 = {<text variable, no debug info>} 0x4004ac <foo> $2 = 0 ... Looks as expected. III. 2.39 Using $as from 2.39: ... $ ./compile.sh Temporary breakpoint 1 at 0x40049f: file test.c, line 6. Temporary breakpoint 1, main () at test.c:6 6 int res = foo (); $1 = {void (void)} 0x4004ac <foo> Invalid cast. ... So, this is the bug the commit is trying to fix. III. current trunk Using $as from current trunk: ... $ ./compile.sh Dwarf Error: unexpected tag 'DW_TAG_unspecified_type' at offset 0xf4 Temporary breakpoint 1 at 0x40049f: file test.c, line 6. Temporary breakpoint 1, main () at test.c:6 6 int res = foo (); Dwarf Error: unexpected tag 'DW_TAG_unspecified_type' at offset 0xf4 Dwarf Error: unexpected tag 'DW_TAG_unspecified_type' at offset 0xf4 ... So, either the debug info is invalid, or gdb needs to learn how to handle this. -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2022-09-08 8:38 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-08 8:38 vries at gcc dot gnu.org [this message] 2022-09-08 8:38 ` [Bug gdb/29558] " vries at gcc dot gnu.org 2022-09-08 8:46 ` vries at gcc dot gnu.org 2022-09-08 8:51 ` vries at gcc dot gnu.org 2022-09-08 9:01 ` vries at gcc dot gnu.org 2022-09-08 10:45 ` vries at gcc dot gnu.org 2022-09-08 10:45 ` vries at gcc dot gnu.org 2022-09-08 12:20 ` vries at gcc dot gnu.org 2022-09-08 13:06 ` [Bug symtab/29558] " vries at gcc dot gnu.org 2022-09-11 7:02 ` vries at gcc dot gnu.org 2023-01-26 17:28 ` mark at klomp dot org 2023-01-26 17:29 ` mark at klomp 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-29558-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: linkBe 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).