Skip to content

Commit

Permalink
Fix gdb scripts for Trusty debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
abcSup committed Apr 5, 2024
1 parent bea824d commit a6d93f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions scripts/gdb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ fi

IFS=" " read -r ARCH ACK TRUSTY TRUSTY_TARGET < $GDB_FILE

TRUSTY_OUT=$OUT_DIR/trusty/build-$TRUSTY_TARGET

if [[ "$ACK" -eq 1 ]]; then
LINUX_OUT=$OUT_DIR/ack/common/$ARCH
elif [[ "$TRUSTY" -eq 1 ]] then
LINUX_OUT=$TRUSTY_OUT/linux-build
else
LINUX_OUT=$OUT_DIR/linux/$ARCH
fi

TRUSTY_OUT=$OUT_DIR/trusty/build-$TRUSTY_TARGET

OUTPUT=$(mktemp)
cp "$GDBINIT" "$OUTPUT"
echo "Using gdbscript in $OUTPUT"
Expand Down
2 changes: 1 addition & 1 deletion scripts/gdbinit.gdb
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ if ##TRUSTY## == 1
add-symbol-file ##TRUSTY_OUT##/atf/qemu/debug/bl2/bl2.elf 0x0
add-symbol-file ##TRUSTY_OUT##/atf/qemu/debug/bl31/bl31.elf 0xe0a0000
add-symbol-file ##TRUSTY_OUT##/lk.elf 0xe200000
endif
end

0 comments on commit a6d93f0

Please sign in to comment.