* lib/gdb.exp (build_id_debug_filename_get): Improve check for
build-id.
This commit is contained in:
parent
695e2681dd
commit
8b3fc8d898
@ -1,5 +1,8 @@
|
||||
2007-09-10 Mark Kettenis <kettenis@gnu.org>
|
||||
|
||||
* 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}.
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user