aboutsummaryrefslogtreecommitdiff
path: root/gdb/f-lang.c
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2022-09-17 08:22:32 +0200
committerTom de Vries <tdevries@suse.de>2022-09-17 08:22:32 +0200
commit99d679e7b30ea9a0b6ffcd64e9ba35e43166151b (patch)
tree5055a9044da2cdf85d999d3c3d5298bae9af5bd1 /gdb/f-lang.c
parent5e3cecb21acfbdc16f65efc276733efe89f5aa25 (diff)
downloadbinutils-99d679e7b30ea9a0b6ffcd64e9ba35e43166151b.zip
binutils-99d679e7b30ea9a0b6ffcd64e9ba35e43166151b.tar.gz
binutils-99d679e7b30ea9a0b6ffcd64e9ba35e43166151b.tar.bz2
[gdb/symtab] Fix "file index out of range" complaint
With the test-case included in this commit, we run into this FAIL: ... (gdb) p var^M During symbol reading: file index out of range^M $1 = 0^M (gdb) FAIL: gdb.dwarf2/dw2-no-code-cu.exp: p var with no complaints ... This is a regression since commit 6d263fe46e0 ("Avoid bad breakpoints with --gc-sections"), which contains this change in read_file_scope: ... - handle_DW_AT_stmt_list (die, cu, fnd, lowpc); + if (lowpc != highpc) + handle_DW_AT_stmt_list (die, cu, fnd, lowpc); ... The change intends to avoid a problem with a check in lnp_state_machine::check_line_address, but also prevents the file and dir tables from being read, which causes the complaint. Fix the FAIL by reducing the scope of the "lowpc != highpc" condition to the call to dwarf_decode_lines in handle_DW_AT_stmt_list. Tested on x86_64-linux. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29561
Diffstat (limited to 'gdb/f-lang.c')
0 files changed, 0 insertions, 0 deletions