Last active
September 19, 2018 01:13
-
-
Save srpatcha/cf9ef3f55a2b952149e6f36f914d6b71 to your computer and use it in GitHub Desktop.
Revisions
-
srpatcha revised this gist
Apr 9, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -26,12 +26,12 @@ 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 created this gist
Apr 9, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,37 @@ 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