在此大概记录一下, 流水帐,供将来查看.
6. 安装gdb 依赖包termcap-1.3.1/
6.1 termcap-1.3.1/
./configure --target=arm-linux
make & make install
------------------------------------------
python绑定gdb问题,否则出现Qt Creator不能启用编译出来的arm-linux-gdb
python gdb error: python is missing or unusable
apt-get install
python python-dev
dpkg -L python-dev
带python的
gdb
export LDFLAGS="-Wl,-rpath,
-L"
configure --with-python=
export LDFLAGS="-Wl,-rpath,/usr/lib -Lpyglib"
configure --with-python=/usr/bin
----------------------------------------------------------------
http://blog.csdn.net/flyingcloude/article/details/9417795
gdb
----obj
----obj-gdbserver
gdb error Remote 'g' packet reply is too long问题
vi gdb/remote.c
static void
process_g_packet (struct regcache *regcache)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct remote_state *rs = get_remote_state ();
struct remote_arch_state *rsa = get_remote_arch_state ();
int i, buf_len;
char *p;
char *regs;
buf_len = strlen (rs->buf);
/* Further sanity checks, with knowledge of the architecture. */
if (buf_len > 2 * rsa->sizeof_g_packet){
rsa->sizeof_g_packet = buf_len ;
for (i = 0; i < gdbarch_num_regs (gdbarch); i++)
{
if (rsa->regs[i].pnum == -1) continue;
if (rsa->regs[i].offset >= rsa->sizeof_g_packet)
rsa->regs[i].in_g_packet = 0;
else
rsa->regs[i].in_g_packet = 1;
}
error (_("Remote 'g' packet reply is too long: %s"), rs->buf);
}
mkdir obj; cd obj
export CC=/usr/bin/gcc
export AR=/usr/bin/ar
../configure --target=arm-linux --enable-shared --prefix=/home/rooter/downloads/gdb-7.9.1/obj LDFLAGS="-L/usr/local/lib/" CPPFLAGS="-I/usr/local/include" --with-python=/usr/bin --without-x --disable-gdbtk --disable-tui --without-included-regex --without-included-gettext --host=arm
查看是否支持python信息
make 1> out.log 2> err.log
若不支持,看export LDFLAGS="-Wl,-rpath, -L"
configure --with-python=配置是否正确
make; make install
gdb中是否支持检测
(gdb) python print("Hello world!")
mkdir obj-gdbserver; cd obj-gdbserver
export CC=/opt/EmbedSky/4.4.6/bin/arm-linux-gcc
export AR=/opt/EmbedSky/4.4.6/bin/arm-linux-ar
../gdb/gdbserver/configure --host=arm-linux --without-included-regex --without-included-gettext --prefix=/home/rooter/downloads/gdb-7.9.1/obj-gdbserver
QtCreator配置参考:
开发板ip: 192.168.28.21
PC ip: 192.168.28.18
port : 3333
./gdbserver 192.168.28.18:3333 InputTool -qws -font unicode
阅读(1617) | 评论(0) | 转发(0) |