From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4B5383858404; Thu, 16 May 2024 12:08:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4B5383858404 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1715861319; bh=zyjdcJyNMJ3oqxwKXPQQdoFeLt6MyN4wA0vRIEoXOZA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ht3KyU+NxvgfEEPjIIG3X4tZ1kkMUg6Fz3wR8JTVD08PJf4Kw+ZjPvmVtlHhlwM+N VXS5aHVyU+9h09Q8rq2yBWYAxMBHBSCn/ohXV/B2UqEiPv6qyQ9o3AauhA9moGuGwD WBqunqXqNjeeFKCpMVI37Dy0rEANorfTcX2CV/+E= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/31745] [gdb/symtab] Can't print pre-defined macros with binaries built with clang -save-temps Date: Thu, 16 May 2024 12:08:38 +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: HEAD 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=3D31745 --- Comment #1 from Tom de Vries --- With this: ... diff --git a/gdb/dwarf2/macro.c b/gdb/dwarf2/macro.c index a511d0a3b44..6686fd84f49 100644 --- a/gdb/dwarf2/macro.c +++ b/gdb/dwarf2/macro.c @@ -838,6 +838,12 @@ dwarf_decode_macros (dwarf2_per_objfile *per_objfile, do { + if (producer_is_clang (cu)) + { + current_file =3D macro_start_file (builder, 1, 0, nullptr, lh); + break; + } + /* Do we at least have room for a macinfo type byte? */ if (mac_ptr >=3D mac_end) { ... we get: ... $ gdb -q -batch a.out -ex start -ex "p __DBL_MAX__" Temporary breakpoint 1 at 0x6af: file /home/vries/data/hello.c, line 6. Temporary breakpoint 1, main () at /home/vries/data/hello.c:6 6 printf ("hello\n"); $1 =3D 1.7976931348623157e+308 ... --=20 You are receiving this mail because: You are on the CC list for the bug.=