From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH][gdb/symtab] Handle DW_TAG_type_unit in process_psymtab_comp_unit
Date: Fri, 5 Feb 2021 13:29:18 +0100 [thread overview]
Message-ID: <20210205122917.GA19309@delia> (raw)
Hi,
When running test-case gdb.cp/cpexprs-debug-types.exp with target board
unix/gdb:debug_flags=-gdwarf-5, I run into:
...
(gdb) file cpexprs-debug-types^M
Reading symbols from cpexprs-debug-types...^M
ERROR: Couldn't load cpexprs-debug-types into GDB (eof).
ERROR: Couldn't send delete breakpoints to GDB.
ERROR: GDB process no longer exists
GDB process exited with wait status 23054 exp9 0 0 CHILDKILLED SIGABRT SIGABRT
...
We're running into this abort in process_psymtab_comp_unit:
...
switch (reader.comp_unit_die->tag)
{
case DW_TAG_compile_unit:
this_cu->unit_type = DW_UT_compile;
break;
case DW_TAG_partial_unit:
this_cu->unit_type = DW_UT_partial;
break;
default:
abort ();
}
...
because reader.comp_unit_die->tag == DW_TAG_type_unit.
Fix this by adding a DW_TAG_type_unit case.
Tested on x86_64-linux.
Any comments?
Thanks,
- Tom
[gdb/symtab] Handle DW_TAG_type_unit in process_psymtab_comp_unit
gdb/ChangeLog:
2021-02-05 Tom de Vries <tdevries@suse.de>
PR symtab/27333
* dwarf2/read.c (process_psymtab_comp_unit): Handle DW_TAG_type_unit.
---
gdb/dwarf2/read.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 424a0da3d6c..dd308ca7ba3 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -7836,6 +7836,9 @@ process_psymtab_comp_unit (dwarf2_per_cu_data *this_cu,
case DW_TAG_partial_unit:
this_cu->unit_type = DW_UT_partial;
break;
+ case DW_TAG_type_unit:
+ this_cu->unit_type = DW_UT_type;
+ break;
default:
abort ();
}
next reply other threads:[~2021-02-05 12:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-05 12:29 Tom de Vries [this message]
2021-02-05 16:31 ` Tom Tromey
2021-02-05 17:17 ` Tom de Vries
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=20210205122917.GA19309@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