Last active
September 19, 2018 01:13
-
-
Save srpatcha/cf9ef3f55a2b952149e6f36f914d6b71 to your computer and use it in GitHub Desktop.
GDB debugging :
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
/sys/kernel/debug/gpio current running GPIO pins in kernel , like 21,23,80 how we interface port numbers for applications