This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| snippets:gdb [2019/03/18 11:40] – created allspark | snippets:gdb [2024/01/12 23:03] (current) – allspark | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| * `finish` | * `finish` | ||
| + | * `step` next source line | ||
| + | * `stepi` one machine instruction | ||
| + | * `next` same as `step` but skip function | ||
| + | * `nexti` same as `stepi` but skip function | ||
| + | |||
| + | `info registers` | ||
| + | |||
| + | ## attach to running process | ||
| + | |||
| + | `echo 0 > / | ||
| + | |||
| + | `thread apply all bt` | ||
| + | |||
| + | ## remote debugging | ||
| + | |||
| + | * on remote site: | ||
| + | |||
| + | ``` | ||
| + | gdbserver --attach :10000 <pid> | ||
| + | ``` | ||
| + | |||
| + | * on local site: | ||
| + | |||
| + | ``` | ||
| + | arm-linux-gnueabihf-gdb -x sysroot-file.gdbinit -ex ' | ||
| + | ``` | ||
| + | |||
| + | |||