Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH][gdb/symtab] Handle DW_FORM_strx in form_requires_reprocessing
Date: Thu, 11 Feb 2021 11:59:11 +0100	[thread overview]
Message-ID: <20210211105909.GA22945@delia> (raw)

Hi,

When running test-case gdb.dwarf2/fission-mix.exp using gcc-11, I run into:
...
(gdb) file fission-mix^M
Reading symbols from fission-mix...^M
src/gdb/dwarf2/attribute.h:258: internal-error: \
  void attribute::set_unsigned_reprocess(ULONGEST): \
  Assertion `form_requires_reprocessing ()' failed.^M
...

This happens when calling set_unsigned_reprocess on an attribute with form
DW_FORM_strx.  The assert triggers because DW_FORM_strx is not listed in
form_requires_reprocessing.

Fix this by adding DW_FORM_strx in form_requires_reprocessing.

Tested on x86_64-linux.

Any comments?

Thanks,
- Tom

[gdb/symtab] Handle DW_FORM_strx in form_requires_reprocessing

gdb/ChangeLog:

2021-02-09  Tom de Vries  <tdevries@suse.de>

	PR symtab/27353
	* dwarf2/attribute.c (attribute::form_requires_reprocessing):
	Return true for DW_FORM_strx.

---
 gdb/dwarf2/attribute.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gdb/dwarf2/attribute.c b/gdb/dwarf2/attribute.c
index b4f188a096e..3205b0f7d29 100644
--- a/gdb/dwarf2/attribute.c
+++ b/gdb/dwarf2/attribute.c
@@ -192,7 +192,8 @@ attribute::form_is_unsigned () const
 bool
 attribute::form_requires_reprocessing () const
 {
-  return (form == DW_FORM_strx1
+  return (form == DW_FORM_strx
+	  || form == DW_FORM_strx1
 	  || form == DW_FORM_strx2
 	  || form == DW_FORM_strx3
 	  || form == DW_FORM_strx4

             reply	other threads:[~2021-02-11 10:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-11 10:59 Tom de Vries [this message]
2021-02-11 19:34 ` Tom Tromey

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=20210211105909.GA22945@delia \
    --to=tdevries@suse.de \
    --cc=gdb-patches@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