User Tools

Site Tools


snippets:gdb

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
snippets:gdb [2019/07/19 10:52] allsparksnippets:gdb [2024/01/12 23:03] (current) allspark
Line 2: Line 2:
  
 * `finish`  print return value of current function * `finish`  print return value of current function
 +* `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 ## attach to running process
Line 7: Line 13:
 `echo 0 > /proc/sys/kernel/yama/ptrace_scope`  `echo 0 > /proc/sys/kernel/yama/ptrace_scope` 
  
-`thread apply all where`+`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 'target extended-remote <remoteip>:10000' -ex 'set remote exec-file <remote binary>' --args <local binary with debug> 
 +``` 
 + 
snippets/gdb.1563526329.txt.gz · Last modified: by allspark