In this post I will address GDB on the PC side.

GDB comes preinstalled with most Linux distributions. You can definitely find one in your PC. However, these GDBs are not what we need here. We need a GDB that runs on PC (x86, x86-64) but can debug ARM architecture. Therefore we need to build it. Fortunately, OpenEmbedded already has pre-written recipes for it. All we need to do is type the following commands:

source ~/.oe/environment-angstromv2012.05

bitbake gdb-cross

You’ll find the file in [path to setup-scripts]/build/tmp-angstrom_v2012_05-eglibc/sysroots/x86_64-linux/usr/bin/armv7a-angstrom-linux-gnueabi/, the file name is arm-angstrom-linux-gnueabi-gdb. I’m running a x86-64 Linux distribution. If yours is x86, it will be …/x86-linux/…

In addition to gdb, we also need vmlinux file for debug symbol table. This file is generated during the kernel building processing. Therefore we already have it. We just need to dig it out. It is located at [path to setup-scripts]/build/tmp-angstrom_v2012_05-eglibc/work/beagleboard-angstrom-linux-gnueabi/linux-mainline-3.2.28-r122a/git/vmlinux.

Now all the files are ready.



創作者 silentlain 的頭像

SilentLain's Blog

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