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/31725] [gdb/symtab] wrong .debug_str section used in dwarf_decode_macro_bytes
Date: Fri, 10 May 2024 13:46:23 +0000	[thread overview]
Message-ID: <bug-31725-4717-1izZEldzul@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-31725-4717@http.sourceware.org/bugzilla/>

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

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
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_objfile,
                    body = dwz->read_string (objfile, str_offset);
                  }
                else
-                 body = per_objfile->per_bfd->str.read_string (objfile,
-                                                               str_offset,
-                                                              
"DW_FORM_strp");
+                 body = str_section->read_string (objfile, str_offset,
+                                                  "DW_FORM_strp");
              }

            is_define = (macinfo_type == 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]
...

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

  parent reply	other threads:[~2024-05-10 13:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-10 13:40 [Bug symtab/31725] New: [gdb/symtab] vries at gcc dot gnu.org
2024-05-10 13:41 ` [Bug symtab/31725] [gdb/symtab] wrong .debug_str section used in dwarf_decode_macro_bytes vries at gcc dot gnu.org
2024-05-10 13:46 ` vries at gcc dot gnu.org [this message]
2024-05-10 14:36 ` vries at gcc dot gnu.org
2024-05-13 10:32 ` vries at gcc dot gnu.org
2024-05-13 11:58 ` vries at gcc dot gnu.org
2024-05-13 12:05 ` vries at gcc dot gnu.org
2024-05-13 15:58 ` vries at gcc dot gnu.org
2024-05-22  6:12 ` 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-31725-4717-1izZEldzul@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).