]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
fix some fission tests
authorTom Tromey <tromey@redhat.com>
Fri, 18 Oct 2013 20:25:06 +0000 (14:25 -0600)
committerTom Tromey <tromey@redhat.com>
Mon, 4 Nov 2013 18:02:11 +0000 (11:02 -0700)
A couple of Fission tests rely on the current directory layout.  This
assumption is not valid in parallel mode.

This patch fixes the problem by removing the relative directory from
the .S files and instead having the tests set debug-file-directory
before opening the main file.

2013-11-04  Tom Tromey  <tromey@redhat.com>

* gdb.dwarf2/fission-base.S: Remove "gdb.dwarf/".
* gdb.dwarf2/fission-base.exp: Set debug-file-directory
before loading binfile.
* gdb.dwarf2/fission-loclists.S: Remove "gdb.dwarf/".
* gdb.dwarf2/fission-loclists.exp: Set debug-file-directory
before loading binfile.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.dwarf2/fission-base.S
gdb/testsuite/gdb.dwarf2/fission-base.exp
gdb/testsuite/gdb.dwarf2/fission-loclists.S
gdb/testsuite/gdb.dwarf2/fission-loclists.exp

index 0c33d0e05f6c4d3bb634c53eba53b94b148d985f..2be762a3d4856602b9463202bd53d477a2dd037a 100644 (file)
@@ -1,3 +1,12 @@
+2013-11-04  Tom Tromey  <tromey@redhat.com>
+
+       * gdb.dwarf2/fission-base.S: Remove "gdb.dwarf/".
+       * gdb.dwarf2/fission-base.exp: Set debug-file-directory
+       before loading binfile.
+       * gdb.dwarf2/fission-loclists.S: Remove "gdb.dwarf/".
+       * gdb.dwarf2/fission-loclists.exp: Set debug-file-directory
+       before loading binfile.
+
 2013-11-04  Tom Tromey  <tromey@redhat.com>
 
        * gdb.base/foll-exec.c (main): Use BASEDIR.
index ccd6b236a08a590b085ce5c618db0fa670f8a805..e670423a92bb8dfd8f5bb306852767d1e5e987ef 100644 (file)
@@ -85,7 +85,7 @@ main:
        .uleb128 0x1    # (DIE (0xb) DW_TAG_compile_unit)
        .ascii "GNU C 4.6.x-fission\0"  # DW_AT_producer
        .byte   0x1     # DW_AT_language
-       .ascii "gdb.dwarf2/fission-base.c\0"    # DW_AT_name
+       .ascii "fission-base.c\0"       # DW_AT_name
        .ascii "/tmp/src/gdb/testsuite\0"       # DW_AT_comp_dir
        .byte   1       # DW_AT_GNU_dwo_id
        .byte   2
@@ -143,7 +143,7 @@ main:
        .8byte  .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-base.dwo\0"  # DW_AT_GNU_dwo_name
+       .ascii "fission-base.dwo\0"     # DW_AT_GNU_dwo_name
        .4byte  .Ldebug_pubnames0       # DW_AT_GNU_pubnames
        .4byte  .Ldebug_pubtypes0       # DW_AT_GNU_pubtypes
        .4byte  .Ldebug_addr0_begin     # DW_AT_GNU_addr_base
index bb4eb7716d76d8456521d952847e8bb83d32a71f..81ca5854e267a8e683e3afed970c125c2e4ad171 100644 (file)
@@ -37,7 +37,14 @@ 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
 
 if ![runto_main] {
     return -1
index 876c6105f44289ae2cea5e689023df2d217d31fc..ee34a299a6368c9643d36a9034f1c71f715ce8da 100644 (file)
@@ -240,7 +240,7 @@ main:
        .byte   0x5
        .4byte  .Ldebug_ranges0 # DW_AT_GNU_ranges_base
        .ascii "/tmp/src/gdb/testsuite\0"       # DW_AT_comp_dir
-       .ascii "gdb.dwarf2/fission-loclists.dwo\0"      # DW_AT_GNU_dwo_name
+       .ascii "fission-loclists.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
index 29ccd1bb9befc1343a3f7d663ddd888d8f5bbaf6..dccd6c2b12b679b8013c5c9fc3390add03ba186f 100644 (file)
@@ -37,7 +37,14 @@ 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
 
 if ![runto_main] {
     return -1