From: Mark Kettenis Date: Sun, 9 Sep 2007 22:25:31 +0000 (+0000) Subject: * lib/gdb.exp (build_id_debug_filename_get): Improve check for X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8b3fc8d898e7be8b3a60d30e76ff956d0941a023;p=binutils-gdb.git * lib/gdb.exp (build_id_debug_filename_get): Improve check for build-id. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index a6536acf9ff..f999c0c6453 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2007-09-10 Mark Kettenis + * lib/gdb.exp (build_id_debug_filename_get): Improve check for + build-id. + * lib/gdb.exp (gdb_compile): OpenBSD doesn't need -dl, and doesn't know about $ORIGIN. Calculate output dir from $dest instead of using ${objdir}/{$subdir}. diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 5629762a251..48b62f45eb7 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -2491,7 +2491,14 @@ proc separate_debug_filename { exec } { # Return "" if no build-id found. proc build_id_debug_filename_get { exec } { set tmp "${exec}-tmp" - exec objcopy -j .note.gnu.build-id -O binary $exec $tmp + set objcopy_program [transform objcopy] + + set result [catch "exec $objcopy_program -j .note.gnu.build-id -O binary $exec $tmp" output] + verbose "result is $result" + verbose "output is $output" + if {$result == 1} { + return "" + } set fi [open $tmp] # Skip the NOTE header. read $fi 16