From c2b2ccc5eddd4c0f592576c983135c0f18b90bf8 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Thu, 15 May 2014 15:50:34 -0700 Subject: Make more robust when run in parallel mode. Since we're not compiling with gcc, we don't know where the DWO file will ultimately be built. It could be built in testsuite/gdb.dwarf2/foo (non-parallel mode) or testsuite/outputs/gdb.dwarf2/foo (parallel mode). * gdb.dwarf2/fission-reread.S: Remove directory from .dwo file path. * gdb.dwarf2/fission-reread.exp: Set debug-file-directory before loading file. Add test for TU lookup. --- gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/gdb.dwarf2/fission-reread.S | 4 ++-- gdb/testsuite/gdb.dwarf2/fission-reread.exp | 11 ++++++++++- 3 files changed, 18 insertions(+), 3 deletions(-) (limited to 'gdb/testsuite') diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 486a4e2..2c1d3df 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2014-05-15 Doug Evans + + * gdb.dwarf2/fission-reread.S: Remove directory from .dwo file path. + * gdb.dwarf2/fission-reread.exp: Set debug-file-directory before + loading file. Add test for TU lookup. + 2014-05-15 Simon Marchi * lib/mi-support.exp (mi_run_cmd_full): Set arguments by diff --git a/gdb/testsuite/gdb.dwarf2/fission-reread.S b/gdb/testsuite/gdb.dwarf2/fission-reread.S index 6d013c3..3e006bc 100644 --- a/gdb/testsuite/gdb.dwarf2/fission-reread.S +++ b/gdb/testsuite/gdb.dwarf2/fission-reread.S @@ -134,7 +134,7 @@ main: .4byte 0 /* Offset to Type DIE */ .uleb128 0x2 /* (DIE (0) DW_TAG_type_unit) */ .ascii "/tmp/src/gdb/testsuite\0" /* DW_AT_comp_dir */ - .ascii "gdb.dwarf2/fission-reread.dwo\0" /* DW_AT_GNU_dwo_name */ + .ascii "fission-reread.dwo\0" /* DW_AT_GNU_dwo_name */ .4byte .Ldebug_pubnames0 /* DW_AT_GNU_pubnames */ .4byte .Ldebug_pubtypes0 /* DW_AT_GNU_pubtypes */ .4byte .Ldebug_addr0 /* DW_AT_GNU_addr_base */ @@ -205,7 +205,7 @@ main: .4byte .Letext0-.Ltext0 /* DW_AT_high_pc */ .4byte .Ldebug_line0 /* DW_AT_stmt_list */ .ascii "/tmp/src/gdb/testsuite\0" /* DW_AT_comp_dir */ - .ascii "gdb.dwarf2/fission-reread.dwo\0" /* DW_AT_GNU_dwo_name */ + .ascii "fission-reread.dwo\0" /* DW_AT_GNU_dwo_name */ .4byte .Ldebug_pubnames0 /* DW_AT_GNU_pubnames */ .4byte .Ldebug_pubtypes0 /* DW_AT_GNU_pubtypes */ .4byte .Ldebug_addr0 /* DW_AT_GNU_addr_base */ diff --git a/gdb/testsuite/gdb.dwarf2/fission-reread.exp b/gdb/testsuite/gdb.dwarf2/fission-reread.exp index e7c3d9d..7eb792b 100644 --- a/gdb/testsuite/gdb.dwarf2/fission-reread.exp +++ b/gdb/testsuite/gdb.dwarf2/fission-reread.exp @@ -32,10 +32,19 @@ if [build_executable_from_fission_assembler \ return -1 } -clean_restart ${binfile} +gdb_exit +gdb_start +gdb_reinitialize_dir $srcdir/$subdir +# Make sure we can find the .dwo file, regardless of whether we're +# running in parallel mode. +gdb_test_no_output "set debug-file-directory [file dirname $binfile]" \ + "set debug-file-directory" +gdb_load $binfile gdb_test "break main" "Breakpoint.*at.*" +gdb_test "ptype baz" "type = class foo {.*" + # If we get this far gdb didn't crash, nor did an error occur. pass $testfile -- cgit v1.1