In the previous post, we’ve successfully launched KGDB on BeagleBoard. Now we need to execute GDB with BeagleBoard’s symbol table and and remote connect to KGDB on BeagleBoard.

1. Go to the folder we built arm-angstrom-linux-gnueabi-gdb and type:
./arm-angstrom-linux-gnueabi-gdb [path to vmlinux file]

GDB will launch and you should see:

The most important part of this GDB is that the host is your PC (in my case x86_64-linux), and target is BeagleBoard (arm-angstrom-linux-gnueabi).

2. In gdb command prompt, type
target remote /dev/[COM port]

to connect to BeagleBoard. You will see

Hooray! Now you can start debugging!

 

Problem 1:
I got an error message when trying to remote connect to BeagleBoard in GDB. What’s wrong?
This is because your previous screen session is still connected to BeagleBoard via COM port. Therefore your COM port is occupied. We need to terminate the screen to release COM port. We can do it by:
1. Open a new terminal. Type screen –list

2. Type screen –S 3154 –X quit  3154 is your screen session id. Now your screen session is terminate. You can continue with gdb.

silentlain 發表在 痞客邦 PIXNET 留言(0) 人氣()