1/16
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
-g
Compilation flag to be able to use a debugger
lldb <executable name>
Open debugger
quit/q
Exits debugger
run
Runs program up to break point
b <line number>
sets a breakpoint at the specified line number
l
See the code around the location where your execution is currently paused
p <variable name>
prints value of variable
p &<variable name>
prints address of variable
watchpoint set variable <variable name>
stop execution and notify if the value of the variable changes
next
Executes one line of code without entering function calls
step
Executes one line of code and will enter function calls
kill
exit current program
-fno-stack-protector
Removes compiler protections against buffer overflow
x/<#>x<unit>. &<var>
Read # of units from the memory address starting at &var. (ex: x/4xb &name reads four bytes from variable name)
word
4-byte block of memory
objdump -d <executable>
Gives addresses of all machine code for the executable
bt/backtrace
go back a frame