* [PATCH][gdb/testsuite] Fix .debug_aranges in dw2-case-insensitive-debug.S
@ 2019-05-06 16:36 Tom de Vries
2019-05-06 17:20 ` Jan Kratochvil
0 siblings, 1 reply; 3+ messages in thread
From: Tom de Vries @ 2019-05-06 16:36 UTC (permalink / raw)
To: gdb-patches; +Cc: Pedro Alves, Jan Kratochvil
Hi,
When running gdb.dwarf2/dw2-case-insensitive.exp with target board
cc-with-debug-names, we run into:
...
FAIL: gdb.dwarf2/dw2-case-insensitive.exp: regexp case-sensitive off \
(GDB internal error)
...
in more detail:
...
(gdb) info functions fUnC_lang
gdb/dwarf2read.c:5293: internal-error: \
compunit_symtab* dw2_find_pc_sect_compunit_symtab(objfile*, \
bound_minimal_symbol, CORE_ADDR, obj_section*, int): \
Assertion `result != NULL' failed.
...
The problem is that the .debug_aranges section in dw2-case-insensitive-debug.S
contains a debug_info_offset which is set to 0:
...
.section .debug_aranges,"",@progbits
.4byte .Laranges_end - .Laranges_start
.Laranges_start:
.2byte 0x2
.4byte 0
...
while the compilation unit at offset 0 in the .debug_section of the executable
is in fact not the compilation unit generated from
dw2-case-insensitive-debug.S.
This happens when linked in object files contain dwarf info and are placed in
the .debug_info section before the compilation unit generated from
dw2-case-insensitive-debug.S.
Fix this by defining the debug_info_offset field using the label .Lcu1_begin
that defines the start of the compilation unit:
...
- .4byte 0
+ .4byte .Lcu1_begin
...
Tested on x86_64-linux with native, cc-with-gdb-index and cc-with-debug-names.
OK for trunk?
Thanks,
- Tom
[gdb/testsuite] Fix .debug_aranges in dw2-case-insensitive-debug.S
gdb/testsuite/ChangeLog:
2019-05-06 Tom de Vries <tdevries@suse.de>
PR testsuite/24522
* gdb.dwarf2/dw2-case-insensitive-debug.S: Fix debug_info_offset in
.debug_aranges section.
---
gdb/testsuite/gdb.dwarf2/dw2-case-insensitive-debug.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive-debug.S b/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive-debug.S
index f12a82112b..7f5e1a5d42 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive-debug.S
+++ b/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive-debug.S
@@ -64,7 +64,7 @@
.4byte .Laranges_end - .Laranges_start // Length of Address Ranges Info
.Laranges_start:
.2byte 0x2 // DWARF Version
- .4byte 0 // .Ldebug_info0 - Offset of Compilation Unit Info
+ .4byte .Lcu1_begin // .Ldebug_info0 - Offset of Compilation Unit Info
.byte PTRBITS / 8 // Size of Address
.byte 0 // Size of Segment Descriptor
.2byte 0 // Pad to 16 byte boundary
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][gdb/testsuite] Fix .debug_aranges in dw2-case-insensitive-debug.S
2019-05-06 16:36 [PATCH][gdb/testsuite] Fix .debug_aranges in dw2-case-insensitive-debug.S Tom de Vries
@ 2019-05-06 17:20 ` Jan Kratochvil
2019-05-07 9:02 ` Tom de Vries
0 siblings, 1 reply; 3+ messages in thread
From: Jan Kratochvil @ 2019-05-06 17:20 UTC (permalink / raw)
To: Tom de Vries; +Cc: gdb-patches, Pedro Alves
On Mon, 06 May 2019 18:36:47 +0200, Tom de Vries wrote:
> OK for trunk?
I do not have it reproducible on Fedora 29 x86_64 but I agree it is correct.
I do not have GDB approval permission.
Jan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][gdb/testsuite] Fix .debug_aranges in dw2-case-insensitive-debug.S
2019-05-06 17:20 ` Jan Kratochvil
@ 2019-05-07 9:02 ` Tom de Vries
0 siblings, 0 replies; 3+ messages in thread
From: Tom de Vries @ 2019-05-07 9:02 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: gdb-patches, Pedro Alves
On 06-05-19 19:20, Jan Kratochvil wrote:
> On Mon, 06 May 2019 18:36:47 +0200, Tom de Vries wrote:
>> OK for trunk?
>
> I do not have it reproducible on Fedora 29 x86_64
FTR, the described failure occurs for me with openSUSE Leap 15.0 x86_64.
> but I agree it is correct.
> I do not have GDB approval permission.
>
Thanks for the review.
With your review done, I consider the patch obvious and I've committed it.
Thanks,
- Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-05-07 9:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-06 16:36 [PATCH][gdb/testsuite] Fix .debug_aranges in dw2-case-insensitive-debug.S Tom de Vries
2019-05-06 17:20 ` Jan Kratochvil
2019-05-07 9:02 ` Tom de Vries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox