From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1728138460B2; Fri, 10 May 2024 13:46:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1728138460B2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1715348784; bh=rhMOP/WjEvOriMMcVrHZ2Dx7KRhbBIyTV3eYhjk6iIU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=XMWsXeKU4gtkazNPZxNeR/uqzYaprF9pSBLnDpKAWNSGvlJP7GSeJb3vtFNdezPZf jbfPv/r30GC9iIgLBq0r/N0MCXXzrJBN/P9W0ypDFGE3gfARKgJVRtUD0QwJkgd4PD OFuaBovCcD5VYn/Tdn8EHM0WFXLHA2dkJZlWYBic= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/31725] [gdb/symtab] wrong .debug_str section used in dwarf_decode_macro_bytes Date: Fri, 10 May 2024 13:46:23 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: symtab X-Bugzilla-Version: 14.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31725 --- Comment #1 from Tom de Vries --- Using: ... diff --git a/gdb/dwarf2/macro.c b/gdb/dwarf2/macro.c index a511d0a3b44..7ecaf8044b9 100644 --- a/gdb/dwarf2/macro.c +++ b/gdb/dwarf2/macro.c @@ -529,9 +529,8 @@ dwarf_decode_macro_bytes (dwarf2_per_objfile *per_objfi= le, body =3D dwz->read_string (objfile, str_offset); } else - body =3D per_objfile->per_bfd->str.read_string (objfile, - str_offset, -=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 "DW_FORM_strp"); + body =3D str_section->read_string (objfile, str_offset, + "DW_FORM_strp"); } is_define =3D (macinfo_type =3D=3D DW_MACRO_define ... I get instead: ... $ gdb -q -batch a.out -ex "p main" DW_FORM_strp pointing outside of .debug_str.dwo section [in module /home/vries/gdb/a-hello.dwo] ... --=20 You are receiving this mail because: You are on the CC list for the bug.=