binutils-gdb/gdb/testsuite/gdb.dwarf2
Tom Tromey 834eaf9201 Fix crash in new DWARF indexer
PR gdb/29128 points out a crash in the new DWARF index code.  This
happens if the aranges for a CU claims a PC, but the symtab that is
created during CU expansion does not actually contain the PC.  This
can only occur due to bad debuginfo, but at the same time, gdb should
not crash.

This patch fixes the bug and further merges some code into
dwarf2_base_index_functions.  This merger helps prevent the same issue
from arising from the other index implementations.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29128
2022-05-26 11:37:06 -06:00
..
ada-cold-name.exp
ada-linkage-name.c
ada-linkage-name.exp
ada-thick-pointer.exp
ada-valprint-error.c
ada-valprint-error.exp
arr-stride.exp
arr-subrange.exp
atomic-type.c
atomic-type.exp
bad-regnum.exp
bitfield-parent-optimized-out.exp
break-inline-psymtab-2.c
break-inline-psymtab.c
break-inline-psymtab.exp
callframecfa.exp
callframecfa.S
calling-convention.c
calling-convention.exp gdb/testsuite: prefer gdb_test in gdb.dwarf2/calling-convention 2022-05-26 09:37:11 +01:00
clang-debug-names-2-foo.c
clang-debug-names-2.c
clang-debug-names-2.exp
clang-debug-names.c
clang-debug-names.exp
clang-debug-names.exp.tcl
clztest.c
clztest.exp
clztest.S
comp-unit-lang.c
comp-unit-lang.exp
corrupt.exp
count.exp
cpp-linkage-name.c
cpp-linkage-name.exp
cu-no-addrs.exp Fix crash in new DWARF indexer 2022-05-26 11:37:06 -06:00
data-loc.c
data-loc.exp
dup-psym.exp
dup-psym.S
dw2-abs-hi-pc-hello-dbg.S
dw2-abs-hi-pc-hello.c
dw2-abs-hi-pc-world-dbg.S
dw2-abs-hi-pc-world.c
dw2-abs-hi-pc.c
dw2-abs-hi-pc.exp
dw2-ada-ffffffff.exp
dw2-ada-ffffffff.S
dw2-align.exp
dw2-anon-mptr.exp
dw2-anon-mptr.S
dw2-anonymous-func.exp
dw2-anonymous-func.S
dw2-bad-elf-other.S
dw2-bad-elf.exp
dw2-bad-mips-linkage-name.c
dw2-bad-mips-linkage-name.exp
dw2-bad-parameter-type.exp
dw2-bad-parameter-type.S
dw2-bad-unresolved.c
dw2-bad-unresolved.exp
dw2-basic.exp
dw2-basic.S
dw2-bfloat16.exp
dw2-canonicalize-type.exp
dw2-canonicalize-type.S
dw2-case-insensitive-debug.S
dw2-case-insensitive.c
dw2-case-insensitive.exp
dw2-common-block.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
dw2-common-block.S
dw2-compdir-oldgcc.exp
dw2-compdir-oldgcc.S
dw2-compressed.exp
dw2-compressed.S
dw2-const.exp
dw2-const.S
dw2-cp-infcall-ref-static-main.c
dw2-cp-infcall-ref-static.exp
dw2-cp-infcall-ref-static.S
dw2-cu-size.exp
dw2-cu-size.S
dw2-dir-file-name.c
dw2-dir-file-name.exp
dw2-disasm-over-non-stmt.exp
dw2-dos-drive.exp
dw2-dos-drive.S
dw2-double-set-die-type.exp
dw2-double-set-die-type.S
dw2-dummy-cu.exp
dw2-dummy-cu.S
dw2-dup-frame.c
dw2-dup-frame.exp
dw2-dup-frame.S
dw2-empty-namespace.exp
dw2-empty-namespace.S
dw2-empty-pc-range.exp
dw2-empty-pc-range.S
dw2-entry-value-main.c
dw2-entry-value.exp
dw2-entry-value.S
dw2-error.c
dw2-error.exp
dw2-error.S
dw2-filename.exp
dw2-filename.S
dw2-fixed-point.c
dw2-fixed-point.exp
dw2-icc-opaque.exp
dw2-icc-opaque.S
dw2-icycle.exp
dw2-icycle.S
dw2-ifort-parameter.c
dw2-ifort-parameter.exp
dw2-inheritance.exp
dw2-inheritance.S
dw2-inline-break.exp
dw2-inline-break.S
dw2-inline-header-1.exp
dw2-inline-header-2.exp
dw2-inline-header-3.exp
dw2-inline-header-lbls.c
dw2-inline-header.c
dw2-inline-header.h
dw2-inline-many-frames.c
dw2-inline-many-frames.exp
dw2-inline-param-main.c
dw2-inline-param.exp
dw2-inline-param.S
dw2-inline-small-func-lbls.c
dw2-inline-small-func.c
dw2-inline-small-func.exp
dw2-inline-small-func.h
dw2-inline-stepping.c
dw2-inline-stepping.exp
dw2-inline-with-lexical-scope.c
dw2-inline-with-lexical-scope.exp
dw2-intercu.exp
dw2-intercu.S
dw2-intermix.exp
dw2-intermix.S
dw2-is-stmt-2.c
dw2-is-stmt-2.exp
dw2-is-stmt.c
dw2-is-stmt.exp
dw2-lexical-block-bare.exp
dw2-line-number-zero.c
dw2-line-number-zero.exp
dw2-lines.c
dw2-lines.exp
dw2-linkage-name-trust-main.cc
dw2-linkage-name-trust.exp
dw2-linkage-name-trust.S
dw2-main-no-line-number.exp
dw2-minsym-in-cu.exp
dw2-minsym-in-cu.S
dw2-missing-cu-tag.c
dw2-missing-cu-tag.exp
dw2-modula2-self-type.exp
dw2-modula2-self-type.S
dw2-namespaceless-anonymous.c
dw2-namespaceless-anonymous.exp
dw2-noloc-main.c
dw2-noloc.exp
dw2-noloc.S
dw2-objfile-overlap-inner.S
dw2-objfile-overlap-outer.S
dw2-objfile-overlap.exp
dw2-op-call.exp
dw2-op-call.S
dw2-op-out-param.exp
dw2-op-out-param.S
dw2-op-stack-value.exp
dw2-op-stack-value.S
dw2-opt-structptr.c
dw2-opt-structptr.exp
dw2-out-of-range-end-of-seq.exp
dw2-param-error-main.c
dw2-param-error.exp
dw2-param-error.S
dw2-producer.exp
dw2-producer.S
dw2-prologue-end.c
dw2-prologue-end.exp
dw2-ranges-2.c
dw2-ranges-3.c
dw2-ranges-base.c
dw2-ranges-base.exp
dw2-ranges-func-hi-cold.c
dw2-ranges-func-lo-cold.c
dw2-ranges-func.exp
dw2-ranges-overlap.c
dw2-ranges-overlap.exp
dw2-ranges-psym-warning-main.c
dw2-ranges-psym-warning.c
dw2-ranges-psym-warning.exp
dw2-ranges-psym.c
dw2-ranges-psym.exp
dw2-ranges.c
dw2-ranges.exp
dw2-ref-missing-frame-func.c
dw2-ref-missing-frame-main.c
dw2-ref-missing-frame.exp
dw2-ref-missing-frame.S
dw2-reg-undefined.c
dw2-reg-undefined.exp
dw2-reg-undefined.S
dw2-regno-invalid.exp
dw2-restore.exp
dw2-restore.S
dw2-restrict.c
dw2-restrict.exp
dw2-restrict.S
dw2-simple-locdesc.exp
dw2-simple-locdesc.S
dw2-single-line-discriminators.c
dw2-single-line-discriminators.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
dw2-single-line-discriminators.S
dw2-skip-prologue.c
dw2-skip-prologue.exp
dw2-skip-prologue.S
dw2-stack-boundary.exp
dw2-stack-boundary.S
dw2-step-out-of-function-no-stmt.c
dw2-step-out-of-function-no-stmt.exp
dw2-strp.exp
dw2-strp.S
dw2-symtab-includes-lookup.exp
dw2-symtab-includes.exp
dw2-undefined-ret-addr.c
dw2-undefined-ret-addr.exp
dw2-undefined-ret-addr.S
dw2-unresolved-main.c
dw2-unresolved.exp
dw2-unresolved.S
dw2-unusual-field-names.c
dw2-unusual-field-names.exp
dw2-using-debug-str.c
dw2-using-debug-str.exp
dw2-var-zero-addr.exp
dw2-var-zero-addr.S
dw2-vendor-extended-opcode.c
dw2-vendor-extended-opcode.exp
dw2-weird-type-len.c
dw2-weird-type-len.exp
dw2-zero-range-shlib.c
dw2-zero-range.c
dw2-zero-range.exp
dw4-sig-type-unused.exp
dw4-sig-type-unused.S
dw4-sig-types-b.cc
dw4-sig-types.cc
dw4-sig-types.exp
dw4-sig-types.h
dw4-toplevel-types.cc
dw4-toplevel-types.exp
dw5-rnglist-test.cc
dw5-rnglist-test.exp
dwp-sepdebug.c
dwp-sepdebug.exp
dwp-symlink.c
dwp-symlink.exp
dwz.exp
dwzbuildid.exp
dwznolink.exp
dyn-type-unallocated.c
dyn-type-unallocated.exp
dynarr-ptr.c
dynarr-ptr.exp
enqueued-cu-base-addr.exp
enum-type.exp
file1.txt
fission-absolute-dwo.c
fission-absolute-dwo.exp
fission-base.c
fission-base.exp
fission-base.S
fission-loclists-pie.exp
fission-loclists-pie.S
fission-loclists.exp
fission-loclists.S
fission-mix-2.c
fission-mix.c
fission-mix.exp
fission-mix.h
fission-multi-cu.c
fission-multi-cu.exp
fission-relative-dwo.c
fission-relative-dwo.exp
fission-reread.exp
fission-reread.S
formdata16.exp
fortran-var-string.c
fortran-var-string.exp
frame-inlined-in-outer-frame.exp
frame-inlined-in-outer-frame.S
gdb-add-index-symlink.exp
gdb-add-index.exp
gdb-index-cxx.exp
gdb-index-nodebug.exp
gdb-index.exp
implptr-64bit.exp
implptr-optimized-out.exp
implptr.c
implptr.exp
implptr.S
implptrconst.exp
implptrpiece.exp
implref-array.c
implref-array.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
implref-const.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
implref-global.c
implref-global.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
implref-struct.c
implref-struct.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
imported-unit-abstract-const-value.exp
imported-unit-bp-alt.c
imported-unit-bp-c.exp
imported-unit-bp-c++.exp
imported-unit-bp-main.c
imported-unit-bp.exp.tcl
imported-unit-c.exp
imported-unit-runto-main.exp
imported-unit.c
imported-unit.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00
index.cc
info-locals-optimized-out.exp
inlined_subroutine-inheritance.exp
intbits.c
intbits.exp
loc-sec-offset.c
loc-sec-offset.exp
locexpr-data-member-location-lib.c
locexpr-data-member-location-main.c
locexpr-data-member-location.exp
locexpr-data-member-location.h
loclists-multiple-cus.c
loclists-multiple-cus.exp
loclists-sec-offset.c
loclists-sec-offset.exp
loclists-start-end.c
loclists-start-end.exp
mac-fileno.exp
mac-fileno.S
main-foo.c
main-subprogram.c
main-subprogram.exp
main.c
member-ptr-forwardref.exp
member-ptr-forwardref.S
method-ptr.cc
method-ptr.exp
missing-sig-type.exp
missing-type-name.exp
multidictionary.exp
negative-data-member-location.c
negative-data-member-location.exp
nonvar-access.exp
nostaticblock.exp
opaque-type-lookup-2.c
opaque-type-lookup.exp
per-bfd-sharing.c
per-bfd-sharing.exp
pieces-optimized-out.c
pieces-optimized-out.exp
pieces-optimized-out.S
pieces.c
pieces.exp
pieces.S
pr10770.c
pr10770.exp
pr11465.exp
pr11465.S
pr13961.exp
pr13961.S
rnglists-multiple-cus.exp
rnglists-sec-offset.exp
shortpiece.exp
staticvirtual.exp
struct-decl.exp
struct-with-sig.exp
subrange-enum.exp
subrange.exp
symbol_needs_eval_fail.exp
symbol_needs_eval_timeout.exp
symbol_needs_eval.c
symtab-producer.exp
template-specification-full-name.exp
trace-crash.exp
trace-crash.S
typeddwarf-amd64.S
typeddwarf.c
typeddwarf.exp
typeddwarf.S
typedef-void-finish.exp
utf-rust.exp
valop.exp
valop.S
var-access.c
var-access.exp
variant.c
variant.exp
varval.c
varval.exp
void-type.c
void-type.exp
watch-notconst2.c
watch-notconst2.S
watch-notconst.c
watch-notconst.exp gdb/testsuite: fix "continue outside of loop" TCL errors 2022-05-16 10:07:43 -03:00