From 99b877a03b04d4f24607cd8e98086199d28f5c28 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 7 Apr 2022 15:09:40 +1000 Subject: [PATCH] Tools: added script to make using a crash_dump.bin easier - OV3-955 --- Tools/debug/gdb_crashdump.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 Tools/debug/gdb_crashdump.sh diff --git a/Tools/debug/gdb_crashdump.sh b/Tools/debug/gdb_crashdump.sh new file mode 100755 index 0000000000..89f6b4d66c --- /dev/null +++ b/Tools/debug/gdb_crashdump.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# script to more easily get a backtrace from an ArduPilot crash_dump.bin + +[ $# -eq 2 ] || { + echo "Usage: gdb_crashdump.sh ELF_FILE CRASH_DUMP" + exit 1 +} + +ELF_FILE=$1 +CRASH_DUMP=$2 + +arm-none-eabi-gdb -nx "$ELF_FILE" -ex "set target-charset ASCII" -ex "target remote | modules/CrashDebug/bins/lin64/CrashDebug --elf $ELF_FILE --dump $CRASH_DUMP"