Load TF-A BL1 symbols in GDB.
Change-Id: Ie650b2dc5e708579fd249a6e0200612e2bd3e5ed
diff --git a/aarch64/aarch64.gdb b/aarch64/aarch64.gdb
index 8635d41..0ff644d 100644
--- a/aarch64/aarch64.gdb
+++ b/aarch64/aarch64.gdb
@@ -107,6 +107,10 @@
echo Protected KVM debug mode initialized\n
end
+add-symbol-file "##BL1_ELF_PATH##"
+add-symbol-file "##BL2_ELF_PATH##"
+add-symbol-file "##BL31_ELF_PATH##"
+
# Connect to QEMU emulating the kernel.
target remote :1234
diff --git a/aarch64/run_gdb.sh b/aarch64/run_gdb.sh
index 6210c8a..75562c7 100755
--- a/aarch64/run_gdb.sh
+++ b/aarch64/run_gdb.sh
@@ -18,6 +18,9 @@
default_var GDB "${TOOLCHAINS_GDB_BIN}"
default_var KERNEL_ELF "${LINUX_OUT_ELF}"
+default_var BL1_ELF "${OUT_DIR}/trusted-firmware-a/qemu/release/bl1/bl1.elf"
+default_var BL2_ELF "${OUT_DIR}/trusted-firmware-a/qemu/release/bl2/bl2.elf"
+default_var BL31_ELF "${OUT_DIR}/trusted-firmware-a/qemu/release/bl31/bl31.elf"
default_var VERBOSE 0
function usage() {
@@ -64,5 +67,9 @@
OUTPUT=$(mktemp)
[ "${VERBOSE}" -eq 1 ] && set -x
-sed "s|##ELF_PATH##|${KERNEL_ELF}|g" "${INPUT}" > "${OUTPUT}"
+sed -e "s|##ELF_PATH##|${KERNEL_ELF}|g" \
+ -e "s|##BL1_ELF_PATH##|${BL1_ELF}|g" \
+ -e "s|##BL2_ELF_PATH##|${BL2_ELF}|g" \
+ -e "s|##BL31_ELF_PATH##|${BL31_ELF}|g" \
+ "${INPUT}" > "${OUTPUT}"
exec "${GDB}" -ex "source ${OUTPUT}"