feat(apps/scripts): set a logging file for gdb using starter app (#16278)

This commit is contained in:
Angelo Venturini
2023-05-16 20:57:35 -03:00
committed by GitHub
parent a8bc892da3
commit 97dff23ba1
2 changed files with 7 additions and 3 deletions

View File

@@ -5,9 +5,11 @@ CONFIG="$3"
SYSLOG="$4"
SYSERR="$5"
GDB_ENABLED="$6"
CRASHES_PATH="$7"
if [ $GDB_ENABLED -eq 1 ]; then
echo "set logging on" > "$GDB_FILE"
echo "set logging file "$CRASHES_PATH"/gdb-$(date +%Y-%m-%d-%H-%M-%S).txt" > "$GDB_FILE"
echo "set logging on" >> "$GDB_FILE"
echo "set debug timestamp" >> "$GDB_FILE"
echo "run -c $3" >> "$GDB_FILE"
echo "bt" >> "$GDB_FILE"