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/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	[thread overview]
Message-ID: <bug-31745-4717-XgEU5zBMDT@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-31745-4717@http.sourceware.org/bugzilla/>

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

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
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 = macro_start_file (builder, 1, 0, nullptr, lh);
+         break;
+       }
+
       /* Do we at least have room for a macinfo type byte?  */
       if (mac_ptr >= 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 = 1.7976931348623157e+308
...

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

  reply	other threads:[~2024-05-16 12:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-16 10:34 [Bug symtab/31745] New: " vries at gcc dot gnu.org
2024-05-16 12:08 ` vries at gcc dot gnu.org [this message]
2024-05-17 11:16 ` [Bug macros/31745] [gdb/macros] " 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-31745-4717-XgEU5zBMDT@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).