Gdb: Difference between revisions

From Wiki :-)
Jump to navigation Jump to search
Created page with "gdb is a debugger. {| class="wikitable" !Command !Comment |- |target remote <target-ip>:<port> | |- |continue (c) | |- |stepi (si) | |- |step (s) | |- |nexti (ni) | |- |next..."
 
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 21: Line 21:
|-
|-
|next (n) [count]
|next (n) [count]
|
|-
|disassemble (disas) [/r, /m]
|
|-
|info (i) [functions (fun), registers (r), sharedlibrary, sources]
|
|-
|list
|
|-
|file
|
|
|}
|}

Latest revision as of 23:17, 9 January 2019

gdb is a debugger.

Command Comment
target remote <target-ip>:<port>
continue (c)
stepi (si)
step (s)
nexti (ni)
next (n) [count]
disassemble (disas) [/r, /m]
info (i) [functions (fun), registers (r), sharedlibrary, sources]
list
file

How to remote debug executable?

On the target

Run gdbserver as follow:

gdbserver --multi :<port> <program to debug>

On the host

Run gdb as follow:

(gdb) target remote  <target-ip>:<port>