summaryrefslogtreecommitdiffstats
path: root/solenv/bin
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-06-20 16:12:58 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-06-20 16:13:35 +0200
commit319f3cbeab9bab0e75daf28077540e71159fa583 (patch)
treee604e0e64cb2551ba3c6a901849e3e254ec4c1d2 /solenv/bin
parentupdater: build daily builds with gtk3 support (diff)
downloadcore-319f3cbeab9bab0e75daf28077540e71159fa583.tar.gz
core-319f3cbeab9bab0e75daf28077540e71159fa583.zip
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/bin')
-rwxr-xr-xsolenv/bin/gdb-core-bt.sh4
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