diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-07-19 20:28:52 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-07-19 20:28:52 +0000 |
commit | 918dd9105923fdbf070e5782aed7cd6275caa321 (patch) | |
tree | e83ae92245cfabb66db1bb61baae37973eca1523 /gdb/testsuite/gdb.dwarf2/dw2-op-call.exp | |
parent | 0e37a63c3cabe0baab792ed4169307ab4cdc791d (diff) | |
download | gdb-918dd9105923fdbf070e5782aed7cd6275caa321.zip gdb-918dd9105923fdbf070e5782aed7cd6275caa321.tar.gz gdb-918dd9105923fdbf070e5782aed7cd6275caa321.tar.bz2 |
gdb/
Fix crash if referenced CU is aged out.
* dwarf2loc.c (per_cu_dwarf_call): New variable back_to, use to for
xfree of block.data.
(indirect_pieced_value): New variable back_to, use to for xfree of
baton.data.
(dwarf2_compile_expr_to_ax): New variable back_to, use to for xfree of
block.data.
* dwarf2read.c (dwarf2_find_base_address): New prototype.
(load_cu): New function from ...
(dw2_do_instantiate_symtab): ... the code here ...
(process_full_comp_unit): ... and here.
(dwarf2_fetch_die_location_block): Call load_cu first. Call xmemdup on
retval.data.
gdb/testsuite/
Fix crash if referenced CU is aged out.
* gdb.dwarf2/dw2-op-call.exp (maintenance set dwarf2 max-cache-age 0):
New.
* gdb.dwarf2/implptr.exp: Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.dwarf2/dw2-op-call.exp')
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-op-call.exp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp b/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp index 3fcef09..3319133 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp @@ -31,6 +31,9 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objdir}/${subdir}/${execu clean_restart $executable +# Additional test to verify the referenced CU is not aged out. +gdb_test_no_output "maintenance set dwarf2 max-cache-age 0" + gdb_test "p array1" " = 1" gdb_test "p array2" " = 2" "array2 using DW_OP_call2" gdb_test "p array3" " = 3" "array3 using DW_OP_call4" |