lldb Quick Reference
From Wikistix
Threads
| command | abbreviation | action |
|---|---|---|
| thread list | list all threads in the core/program | |
| thread backtrace | bt | dump thread stack of current thread |
| thread backtrace all | bt all | dump thread stacks for all threads |
| thread select <index> | t <index> | switch to thread with the given index |
| thread select -t <tid> | t -t <tid> | switch to thread with the given thread id |
Stack
| command | abbreviation | action |
|---|---|---|
| thread backtrace | bt | dump stack backtrace of the current thread |
| frame select <frameid> | f <frameid> | change the current stack frame to the given frame id |
| frame select --relative=1 | up | change current stack frame moving up the stack, to the caller |
| frame select --relative=-1 | down | change current stack frame moving down the stack, to the callee |
| frame variable --no-args | fr v -a | dump stack frame local variables |
Disassembly
| command | abbreviation | action |
|---|---|---|
| disassemble | di | show disassembly around current PC |
| disassemble -s 0x123456 -c 100 | di -s 0x123456 -c 100 | disassemble 100 instructions starting at the given symbol or address |
| disassemble -a 0x123456 | di -a 0x123456 | disassemble function containing the given address |
Memory
| command | abbreviation | action |
|---|---|---|
| memory read -s 1 -f x -c 300 0x123456 | x -s 1 -f x -c 300 0x123456 | display 300 single byte values in hex starting at address 0x123456 |
| memory read -s 1 -f x -c 16 $rip | x -s 1 -f x -c 16 $rip x/16xb $rip |
display 16 bytes in hex starting at $rip the instruction pointer on x86 |