diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-06-20 16:12:58 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-06-20 16:13:35 +0200 |
commit | 319f3cbeab9bab0e75daf28077540e71159fa583 (patch) | |
tree | e604e0e64cb2551ba3c6a901849e3e254ec4c1d2 /solenv | |
parent | 592046fac193841164a1bb8363748d86ff3d7b6c (diff) |
Try guessing the actual executable that produced an ELF core file
...which may be different from $EXECUTABLE e.g. when in a UITest (where
EXECUTABLE=python.bin) an soffice.bin sub-process crashed
Change-Id: Ia448c911b8475686e98c6bb6f43d7d32abece7cd
Diffstat (limited to 'solenv')
-rwxr-xr-x | solenv/bin/gdb-core-bt.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/solenv/bin/gdb-core-bt.sh b/solenv/bin/gdb-core-bt.sh index ec21fb1f37c4..a24390dace2c 100755 --- a/solenv/bin/gdb-core-bt.sh +++ b/solenv/bin/gdb-core-bt.sh @@ -23,6 +23,10 @@ then echo "Backtraces:" GDBCOMMANDFILE=$(mktemp) printf "info registers\nthread apply all backtrace full\n" > "$GDBCOMMANDFILE" + guess=$(file "$COREFILE") + guess=${guess#* execfn: \'} + guess=${guess%%\'*} + if [ -x "$guess" ]; then EXECUTABLE=$guess; fi gdb -x "$GDBCOMMANDFILE" --batch "$EXECUTABLE" "$COREFILE" rm "$GDBCOMMANDFILE" echo |