[Libreoffice-commits] core.git: solenv/bin

Stephan Bergmann sbergman at redhat.com
Tue Jun 20 14:15:31 UTC 2017


 solenv/bin/gdb-core-bt.sh |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 319f3cbeab9bab0e75daf28077540e71159fa583
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jun 20 16:12:58 2017 +0200

    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

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


More information about the Libreoffice-commits mailing list