public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/29561] New: [gdb/symtab] During symbol reading: file index out of range
@ 2022-09-08 12:13 vries at gcc dot gnu.org
2022-09-08 12:17 ` [Bug symtab/29561] " vries at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2022-09-08 12:13 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29561
Bug ID: 29561
Summary: [gdb/symtab] During symbol reading: file index out of
range
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: symtab
Assignee: unassigned at sourceware dot org
Reporter: vries at gcc dot gnu.org
Target Milestone: ---
Fairly simple test-case:
...
$ gcc -g ~/hello.c
...
With gdb build from trunk:
...
$ gdb -q -batch -iex "set complaints 100" ./a.out -ex "maint expand-symtabs"
During symbol reading: file index out of range
$
...
With system gdb (11.1):
...
$ gdb -q -batch -iex "set complaints 100" ./a.out -ex "maint expand-symtabs"
$
...
DIE that is complained about is:
...
<1><4b>: Abbrev Number: 2 (DW_TAG_variable)
<4c> DW_AT_name : _IO_stdin_used
<50> DW_AT_decl_file : 1
<51> DW_AT_decl_line : 23
<52> DW_AT_type : <0x67>
<56> DW_AT_external : 1
<56> DW_AT_location : 9 byte block: 3 70 5 40 0 0 0 0 0
(DW_OP_addr: 400570)
...
Referring to file/dir info:
...
The Directory Table is empty.
The File Name Table (offset 0x78):
Entry Dir Time Size Name
1 0 0 0 init.c
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/29561] [gdb/symtab] During symbol reading: file index out of range
2022-09-08 12:13 [Bug symtab/29561] New: [gdb/symtab] During symbol reading: file index out of range vries at gcc dot gnu.org
@ 2022-09-08 12:17 ` vries at gcc dot gnu.org
2022-09-08 14:51 ` vries at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2022-09-08 12:17 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29561
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at sourceware dot org
--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Taking the maintenance command out of the equation, we still manage to trigger
the same problem:
...
$ gdb -q -batch -iex "set complaints 100" ./a.out -ex "info var _IO_stdin_used"
During symbol reading: file index out of range
All variables matching regular expression "_IO_stdin_used":
File init.c:
23: const int _IO_stdin_used;
...
Note how in the end we do manage to find the correct file for the variable.
Also, same problems occurs with -readnow, so this doesn't seem related to the
new index cooker.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/29561] [gdb/symtab] During symbol reading: file index out of range
2022-09-08 12:13 [Bug symtab/29561] New: [gdb/symtab] During symbol reading: file index out of range vries at gcc dot gnu.org
2022-09-08 12:17 ` [Bug symtab/29561] " vries at gcc dot gnu.org
@ 2022-09-08 14:51 ` vries at gcc dot gnu.org
2022-09-08 15:24 ` vries at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2022-09-08 14:51 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29561
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
With bisect narrowing in on a window of 17 commits, my bet is on:
...
commit 6d263fe46e00afd8af3d609c1afd71d05eaf745e
Author: Tom Tromey <tromey@adacore.com>
Date: Thu Jan 13 09:48:18 2022 -0700
Avoid bad breakpoints with --gc-sections
We found a case where --gc-sections can cause gdb to set an invalid
breakpoint. In the included test case, gdb will set a breakpoint with
two locations, one of which is 0x0.
The code in lnp_state_machine::check_line_address is intended to
filter out this sort of problem, but in this case, the entire CU is
empty, causing unrelocated_lowpc==0x0 -- which circumvents the check.
It seems to me that if a CU is empty like this, then it is ok to
simply ignore the line table, as there won't be any locations anyway.
...
Indeed the line table is empty for the CU, but the file table is not.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/29561] [gdb/symtab] During symbol reading: file index out of range
2022-09-08 12:13 [Bug symtab/29561] New: [gdb/symtab] During symbol reading: file index out of range vries at gcc dot gnu.org
2022-09-08 12:17 ` [Bug symtab/29561] " vries at gcc dot gnu.org
2022-09-08 14:51 ` vries at gcc dot gnu.org
@ 2022-09-08 15:24 ` vries at gcc dot gnu.org
2022-09-08 15:37 ` vries at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2022-09-08 15:24 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29561
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |simark at simark dot ca
--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #2)
> With bisect narrowing in on a window of 17 commits, my bet is on:
> Avoid bad breakpoints with --gc-sections
Confirmed.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/29561] [gdb/symtab] During symbol reading: file index out of range
2022-09-08 12:13 [Bug symtab/29561] New: [gdb/symtab] During symbol reading: file index out of range vries at gcc dot gnu.org
` (2 preceding siblings ...)
2022-09-08 15:24 ` vries at gcc dot gnu.org
@ 2022-09-08 15:37 ` vries at gcc dot gnu.org
2022-09-08 17:33 ` vries at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2022-09-08 15:37 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29561
--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
Created attachment 14328
--> https://sourceware.org/bugzilla/attachment.cgi?id=14328&action=edit
Tentative patch
Fixes the complaint, and doesn't regress gdb.ada/inline-section-gc.exp.
I'll put this through a full test run.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/29561] [gdb/symtab] During symbol reading: file index out of range
2022-09-08 12:13 [Bug symtab/29561] New: [gdb/symtab] During symbol reading: file index out of range vries at gcc dot gnu.org
` (3 preceding siblings ...)
2022-09-08 15:37 ` vries at gcc dot gnu.org
@ 2022-09-08 17:33 ` vries at gcc dot gnu.org
2022-09-09 6:52 ` vries at gcc dot gnu.org
2022-09-17 6:28 ` vries at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2022-09-08 17:33 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29561
--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #4)
> Created attachment 14328 [details]
> Tentative patch
>
> Fixes the complaint, and doesn't regress gdb.ada/inline-section-gc.exp.
>
> I'll put this through a full test run.
That looks good, I'll add a test-case and submit.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/29561] [gdb/symtab] During symbol reading: file index out of range
2022-09-08 12:13 [Bug symtab/29561] New: [gdb/symtab] During symbol reading: file index out of range vries at gcc dot gnu.org
` (4 preceding siblings ...)
2022-09-08 17:33 ` vries at gcc dot gnu.org
@ 2022-09-09 6:52 ` vries at gcc dot gnu.org
2022-09-17 6:28 ` vries at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2022-09-09 6:52 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29561
--- Comment #6 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #5)
> That looks good, I'll add a test-case and submit.
https://sourceware.org/pipermail/gdb-patches/2022-September/191758.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/29561] [gdb/symtab] During symbol reading: file index out of range
2022-09-08 12:13 [Bug symtab/29561] New: [gdb/symtab] During symbol reading: file index out of range vries at gcc dot gnu.org
` (5 preceding siblings ...)
2022-09-09 6:52 ` vries at gcc dot gnu.org
@ 2022-09-17 6:28 ` vries at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2022-09-17 6:28 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29561
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |13.1
--- Comment #7 from Tom de Vries <vries at gcc dot gnu.org> ---
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=99d679e7b30ea9a0b6ffcd64e9ba35e43166151b
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-09-17 6:28 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-08 12:13 [Bug symtab/29561] New: [gdb/symtab] During symbol reading: file index out of range vries at gcc dot gnu.org
2022-09-08 12:17 ` [Bug symtab/29561] " vries at gcc dot gnu.org
2022-09-08 14:51 ` vries at gcc dot gnu.org
2022-09-08 15:24 ` vries at gcc dot gnu.org
2022-09-08 15:37 ` vries at gcc dot gnu.org
2022-09-08 17:33 ` vries at gcc dot gnu.org
2022-09-09 6:52 ` vries at gcc dot gnu.org
2022-09-17 6:28 ` vries at gcc dot gnu.org
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).