You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
589 B
42 lines
589 B
3 years ago
|
#! /bin/sh
|
||
|
|
||
|
if command -v gdb-multiarch &> /dev/null
|
||
|
then
|
||
|
GDB_CMD=$(command -v gdb-multiarch)
|
||
|
|
||
|
elif command -v arm-none-eabi-gdb &> /dev/null
|
||
|
then
|
||
|
GDB_CMD=$(command -v arm-none-eabi-gdb)
|
||
|
|
||
|
else
|
||
|
echo "gdb arm-none-eabi or multi-arch not found"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
file ${1}
|
||
|
|
||
|
gdb_cmd_file=$(mktemp)
|
||
|
|
||
|
cat >"${gdb_cmd_file}" <<EOL
|
||
|
|
||
|
source ${WORKSPACE}/platforms/nuttx/Debug/NuttX
|
||
|
source ${WORKSPACE}/platforms/nuttx/Debug/ARMv7M
|
||
|
|
||
|
target remote localhost:2331
|
||
|
|
||
|
monitor regs
|
||
|
|
||
|
showtasks
|
||
|
|
||
|
vecstate
|
||
|
|
||
|
info threads
|
||
|
|
||
|
backtrace
|
||
|
|
||
|
bt full
|
||
|
|
||
|
EOL
|
||
|
|
||
|
${GDB_CMD} -silent --nh --nx --nw -batch -x ${gdb_cmd_file} ${1}
|