Gdb
From Attie's Wiki
(Difference between revisions)
m |
m |
||
Line 40: | Line 40: | ||
|- | |- | ||
| <code>x/32i ''<variable>''</code> || dump variable contents, as 32 machine instructions | | <code>x/32i ''<variable>''</code> || dump variable contents, as 32 machine instructions | ||
+ | |- | ||
+ | ! - !! - | ||
|- | |- | ||
| <code>generate-core-file</code> || it's a secret... | | <code>generate-core-file</code> || it's a secret... | ||
|} | |} |
Revision as of 16:22, 24 September 2015
Useful GDB commands...
Command | Description |
---|---|
bt or backtrace |
show a backtrace from the current location |
frame <frameno> |
move to a different stack frame |
- | - |
info threads |
list of running threads |
thread <threadno> |
switch to a different thread |
- | - |
info breakpoints |
list of breakpoints |
break <file>:<lineno> |
set a breakpoint |
step |
step into the current line |
next |
step over the current line |
fin |
step out |
cont |
continue execution |
del <number> |
delete a breakpoint (or multiple with <number> <number> )
|
- | - |
x/x <address> |
examine memory |
x/x <variable> |
dump variable contents |
x/128xb <variable> |
dump variable contents, 128 bytes (b byte / h halfword / w word / g giant, 8-bytes )
|
x/s <variable> |
dump variable contents, as a nul-terminated string |
x/32i <variable> |
dump variable contents, as 32 machine instructions |
- | - |
generate-core-file |
it's a secret... |