17 lines
525 B
Plaintext
Raw Normal View History

2021-05-13 20:29:44 +08:00
set architecture aarch64
target remote localhost:1234
define add-symbol-file-auto
# Parse .text address to temp file
shell echo set \$text_address=$(readelf -WS $arg0 | grep .text | awk '{ print "0x"$5 }') >/tmp/temp_gdb_text_address.txt
# Source .text address
source /tmp/temp_gdb_text_address.txt
# Clean tempfile
shell rm -f /tmp/temp_gdb_text_address.txt
# Load symbol table
add-symbol-file $arg0 $text_address
end
add-symbol-file-auto ./build/kernel.img
2022-04-19 21:34:02 +08:00
add-symbol-file-auto ./user/build/ramdisk/badinsn.bin