diff options
author | Doug Evans <dje@google.com> | 2013-09-20 21:47:06 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2013-09-20 21:47:06 +0000 |
commit | 4fa7d390970c4e558fc42b8d5ff4d42b60240db4 (patch) | |
tree | 70483ea08ea0dc76a38b9045c7f4703489ce2085 /gdb/testsuite/gdb.base/gnu-debugdata.exp | |
parent | ecb33a79498ac5cdf7f284b64585e343bd1bbba3 (diff) | |
download | gdb-4fa7d390970c4e558fc42b8d5ff4d42b60240db4.zip gdb-4fa7d390970c4e558fc42b8d5ff4d42b60240db4.tar.gz gdb-4fa7d390970c4e558fc42b8d5ff4d42b60240db4.tar.bz2 |
* lib/future.exp (gdb_find_objcopy, gdb_find_readelf): New procs.
* lib/gdb.exp (build_id_debug_filename_get): Update to use them.
(gdb_gnu_strip_debug): Ditto.
* lib/prelink-support.exp (section_get, prelink_no): Ditto.
* gdb.arch/altivec-abi.exp: Ditto.
* gdb.base/attach-pie-misread.exp: Ditto.
* gdb.base/comprdebug.exp: Ditto.
* gdb.base/dup-sect.exp: Ditto.
* gdb.base/gnu-debugdata.exp: Ditto.
* gdb.base/step-symless.exp: Ditto.
* gdb.dwarf2/dw2-inline-param.exp: Ditto.
* gdb.dwarf2/dw2-skip-prologue.exp: Ditto.
* gdb.dwarf2/gdb-index.exp: Ditto.
Diffstat (limited to 'gdb/testsuite/gdb.base/gnu-debugdata.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/gnu-debugdata.exp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/testsuite/gdb.base/gnu-debugdata.exp b/gdb/testsuite/gdb.base/gnu-debugdata.exp index e567ea8..4ed3438 100644 --- a/gdb/testsuite/gdb.base/gnu-debugdata.exp +++ b/gdb/testsuite/gdb.base/gnu-debugdata.exp @@ -21,6 +21,8 @@ if [build_executable ${testfile}.exp $testfile] { set pipeline_counter 0 +set objcopy_program [gdb_find_objcopy] + # Run a pipeline of processes through 'run_on_host'. # TEST is the base name of the test, it is modified and passed to 'run_on_host'. # Each subsequent argument is a list of the form {PROGRAM [ARG]...}. @@ -98,7 +100,7 @@ if {[run_on_host "strip" [transform strip] \ # Separate full debug info into ${binfile}.debug. remote_file host delete ${binfile}.debug -if {[run_on_host "copydebug" [transform objcopy] \ +if {[run_on_host "copydebug" ${objcopy_program} \ "--only-keep-debug ${binfile} ${binfile}.debug"]} { return -1 } @@ -106,7 +108,7 @@ if {[run_on_host "copydebug" [transform objcopy] \ # Copy the full debuginfo, keeping only a minimal set of symbols and # removing some unnecessary sections. remote_file host delete ${binfile}.mini_debuginfo -if {[run_on_host "objcopy 1" [transform objcopy] "-S --remove-section .gdb_index --remove-section .comment --keep-symbols=${binfile}.keep_symbols ${binfile}.debug ${binfile}.mini_debuginfo"]} { +if {[run_on_host "objcopy 1" ${objcopy_program} "-S --remove-section .gdb_index --remove-section .comment --keep-symbols=${binfile}.keep_symbols ${binfile}.debug ${binfile}.mini_debuginfo"]} { return -1 } @@ -115,7 +117,7 @@ if {[run_on_host "objcopy 1" [transform objcopy] "-S --remove-section .gdb_index # some files there may be PT_NOTE with NT_GNU_BUILD_ID and GDB could look up # the .debug file from it. This is only an additional test of GDB, such link # is not present in usual MiniDebugInfo sections. -if {[run_on_host "addlink" [transform objcopy] \ +if {[run_on_host "addlink" ${objcopy_program} \ "--add-gnu-debuglink=${binfile}.debug ${binfile}.mini_debuginfo ${binfile}.mini_debuginfo-debuglink"]} { return -1 } @@ -127,7 +129,7 @@ if {[run_on_host "xz" "xz" "-k ${binfile}.mini_debuginfo-debuglink"]} { return -1 } remote_file host delete ${binfile}.test -if {[run_on_host "objcopy 2" [transform objcopy] "--add-section .gnu_debugdata=${binfile}.mini_debuginfo-debuglink.xz ${binfile}.strip ${binfile}.test"]} { +if {[run_on_host "objcopy 2" ${objcopy_program} "--add-section .gnu_debugdata=${binfile}.mini_debuginfo-debuglink.xz ${binfile}.strip ${binfile}.test"]} { return -1 } |