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 symtab/29572] New: [gdb/symtab] read.h:298: internal-error: length: Assertion `m_length != 0' failed. Date: Wed, 14 Sep 2022 08:28:23 +0000 [thread overview] Message-ID: <bug-29572-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=29572 Bug ID: 29572 Summary: [gdb/symtab] read.h:298: internal-error: length: Assertion `m_length != 0' failed. Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: symtab Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- When running with target board cc-with-debug-names, I run into: ... FAIL: gdb.dwarf2/dw2-symtab-includes-lookup.exp: ptype myint (GDB internal error) FAIL: gdb.dwarf2/enqueued-cu-base-addr.exp: ptype foo (GDB internal error) FAIL: gdb.dwarf2/enqueued-cu-base-addr.exp: CU addr found FAIL: gdb.dwarf2/opaque-type-lookup.exp: p variable_a (GDB internal error) FAIL: gdb.dwarf2/opaque-type-lookup.exp: p variable_b (GDB internal error) FAIL: gdb.dwarf2/varval.exp: print bad_die_val1 (GDB internal error) ... Command-line reproducer of first fail: ... $ gdb -q -batch ./outputs/gdb.dwarf2/dw2-symtab-includes-lookup/dw2-symtab-includes-lookup -ex "ptype myint" /home/vries/gdb_versions/devel/src/gdb/dwarf2/read.h:298: internal-error: length: Assertion `m_length != 0' failed. ... We're trying to find (in dwarf2_find_containing_comp_unit) the containing CU for DIE 0xa5: ... Compilation Unit @ offset 0x9a: Length: 0x16 (32-bit) Version: 4 Abbrev Offset: 0x5a Pointer Size: 8 <0><a5>: Abbrev Number: 2 (DW_TAG_partial_unit) <a6> DW_AT_stmt_list : 0xe8 <1><aa>: Abbrev Number: 3 (DW_TAG_base_type) <ab> DW_AT_byte_size : 4 <ac> DW_AT_encoding : 5 (signed) <ad> DW_AT_name : myint <1><b3>: Abbrev Number: 0 ... which is 0x9a, but when getting the length of the unit, it turns out to be 0. This is a regression since commit 1c04f72368c ("[gdb/symtab] Fix assert in set_length"), which starting keeping length at 0 when reading the CU list from .debug_names, and relied on a later set_length to fill in the actual length. This happens fine for CUs, but in this case it's a PU. -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2022-09-14 8:28 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-14 8:28 vries at gcc dot gnu.org [this message] 2022-09-14 8:30 ` [Bug symtab/29572] " vries at gcc dot gnu.org 2022-09-14 8:31 ` vries at gcc dot gnu.org 2022-09-14 9:52 ` vries at gcc dot gnu.org 2022-09-14 9:53 ` vries at gcc dot gnu.org 2022-09-14 12:30 ` vries at gcc dot gnu.org 2022-09-14 13:02 ` vries at gcc dot gnu.org 2022-09-14 13:50 ` vries at gcc dot gnu.org 2022-09-14 15:49 ` vries at gcc dot gnu.org 2023-07-20 12:44 ` vries at gcc dot gnu.org 2023-08-10 13:46 ` cvs-commit at gcc dot gnu.org 2023-12-06 9:29 ` cvs-commit at gcc dot gnu.org 2023-12-06 9:35 ` 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-29572-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).