summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorRegia König2022-09-02 11:29:26 +0200
committerRegia König2022-09-02 11:29:26 +0200
commite7b7db1268cab0be88a22d52c27ce836729e81a8 (patch)
tree58eb5935dafb76ea169e806ab4b4352b1be4cfb2 /documentation
parentAdd gdbscript for testing if relocation happens (diff)
downloadmemtest86-e7b7db1268cab0be88a22d52c27ce836729e81a8.tar.gz
memtest86-e7b7db1268cab0be88a22d52c27ce836729e81a8.tar.xz
memtest86-e7b7db1268cab0be88a22d52c27ce836729e81a8.zip
Move scripts for gdb
Diffstat (limited to 'documentation')
-rw-r--r--documentation/GDB commands6
1 files changed, 6 insertions, 0 deletions
diff --git a/documentation/GDB commands b/documentation/GDB commands
index 14b793b..8411f19 100644
--- a/documentation/GDB commands
+++ b/documentation/GDB commands
@@ -127,6 +127,12 @@ VARIABLES
set x=4 or set variable x=4
whatis x -> type = double
+DISSASEMBLE BINARIES
+ gdb -batch -ex 'file /bin/ls' -ex 'disassemble main'
+ Also, -ex 'set disassembly-flavor intel' before other -exs will result in Intel assembly syntax
+
+ gcc -O0 -ggdb3 -std=c99 -Wall -Wextra -pedantic -o main.out main.c
+ gdb -batch -ex "disassemble/rs myfunc" main.out