diff options
-rwxr-xr-x | solenv/bin/gdb-core-bt.sh | 10 | ||||
-rwxr-xr-x | solenv/bin/lldb-core-bt.sh | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/solenv/bin/gdb-core-bt.sh b/solenv/bin/gdb-core-bt.sh index 2216e2aba5e5..b48a5a4405cc 100755 --- a/solenv/bin/gdb-core-bt.sh +++ b/solenv/bin/gdb-core-bt.sh @@ -20,15 +20,15 @@ then do if [ -f "$COREFILE" ] then - printf '\nIt looks like %s generated %s\nBacktraces:\n' \ - "$EXECUTABLE" "$COREFILE" - GDBCOMMANDFILE=$(mktemp) - printf "info registers\nthread apply all backtrace full\n" \ - >"$GDBCOMMANDFILE" guess=$(file "$COREFILE") guess=${guess#* execfn: \'} guess=${guess%%\'*} if [ ! -x "$guess" ]; then guess=$EXECUTABLE; fi + printf '\nIt looks like %s generated %s\nBacktraces:\n' \ + "$guess" "$COREFILE" + GDBCOMMANDFILE=$(mktemp) + printf "info registers\nthread apply all backtrace full\n" \ + >"$GDBCOMMANDFILE" gdb -iex "add-auto-load-safe-path ${INSTDIR?}" -x "$GDBCOMMANDFILE" --batch "$guess" \ "$COREFILE" && found=x rm "$GDBCOMMANDFILE" diff --git a/solenv/bin/lldb-core-bt.sh b/solenv/bin/lldb-core-bt.sh index 2bd982ec21e9..def4a8939db0 100755 --- a/solenv/bin/lldb-core-bt.sh +++ b/solenv/bin/lldb-core-bt.sh @@ -20,13 +20,13 @@ then do if [ -f "$COREFILE" ] then - printf '\nIt looks like %s generated %s\nBacktraces:\n' \ - "$EXECUTABLE" "$COREFILE" - $LLDBCOMMANDFILE=$(mktemp) guess=$(file "$COREFILE") guess=${guess#* execfn: \'} guess=${guess%%\'*} if [ ! -x "$guess" ]; then guess=$EXECUTABLE; fi + printf '\nIt looks like %s generated %s\nBacktraces:\n' \ + "$guess" "$COREFILE" + $LLDBCOMMANDFILE=$(mktemp) printf "target create -c $COREFILE $guess\nthread backtrace all\nquit\n" >"$LLDBCOMMANDFILE" lldb -s "$LLDBCOMMANDFILE" --batch \ && found=x |