Skip to content

Instantly share code, notes, and snippets.

@srpatcha
Last active September 19, 2018 01:13
Show Gist options
  • Save srpatcha/cf9ef3f55a2b952149e6f36f914d6b71 to your computer and use it in GitHub Desktop.
Save srpatcha/cf9ef3f55a2b952149e6f36f914d6b71 to your computer and use it in GitHub Desktop.
GDB debugging :
Compile Source Code with -g to load debugging symbols :
Example : gcc -g -o hellow helloworld.c
GDB Debugging :
$ gdb a.out
gdb) b main
gdb) c
gdb) list
gdb) print x
gdb) x/20i $pc
GDB Target Debugging :
Run command on board (target_machine) : $ sudo ./gdbserver.i686 host:2345 a.out
Run in our local machine for debugging: $ gdb a.out
gdb) target remote target_machine_IP:2345
gdb) b main
gdb) c
gdb) list
gdb) print x
Will print next 20 instructions on target gdb) x/20i $pc
@srpatcha
Copy link
Author

/sys/kernel/debug/gpio current running GPIO pins in kernel , like 21,23,80 how we interface port numbers for applications

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment