-
Notifications
You must be signed in to change notification settings - Fork 2
GDB old
Pedro Adão edited this page Oct 12, 2020
·
1 revision
Below is a simple list of basic GDB commands. They should get you going for most of our exercises
-
gdb ./file
--- open GDB to debugfile
-
disas function
--- disassemble functionfunction
-
disas address
--- disassemble function at thisaddress
-
b address
--- inserts a breakpoint at addressaddress
-
r < file
--- run the program with inputfile
-
s
--- execute next step of program -
c
--- execute until the next breakpoint of the program -
p expr
--- prints the valueexpr
.expr
can be a var, the pointer to a var (its address), a register, etc. It can even beaddress1 - address2
and in this case returns the difference between the addresses. -
info f
--- returns the info of a frame. Particularly usefull whenever you need to know where the return address of the function is stored and/or the value contained there. -
stack n
--- show then
registers after the stack pointer -
x/nx $rsp
--- show then
registers after the register$rsp
-
x/nx address
--- show then
registers after the addressaddress
- Home
- SSof Scoreboard
- Virtual Machine Details
- Basic usage of tools
- Using Burp Suite as a Web Proxy (2019/20)
- gdb Basics
- Labs
- Still to be updated to current year
- Lab Extra - Reverse Enginneering (2018/19)