summaryrefslogtreecommitdiffstats
path: root/documentation/GDB commands
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/GDB commands')
-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