编译gdb进行远程调试 [英] Compiling gdb for remote debugging

查看:337
本文介绍了编译gdb进行远程调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图远程调试在arm9上运行的应用程序

I'm trying to remote debug an application running on arm9

到目前为止,我已经能够在我的设备上交叉编译和执行gdbserver。

So far I've been able to cross compile and execute gdbserver on my device.


  1. 获取gdb(7.2)源代码并解压缩它们

  2. ./ configure --target = arm- linux-gnueabi --with-expat = / usr / local / lib /

  3. make

  4. cd gdb / gdbserver

  5. ./ configure --host = arm-none-linux-gnueabi

  6. make

  7. tftp gdbserver到我的设备

  8. 运行并通过gdb连接到设备

  1. get gdb (7.2) sources and extract them
  2. ./configure --target=arm-none-linux-gnueabi --with-expat=/usr/local/lib/
  3. make
  4. cd gdb/gdbserver
  5. ./configure --host=arm-none-linux-gnueabi
  6. make
  7. tftp gdbserver to my device
  8. run and connect via gdb to the device

gdbserver似乎可以正确启动, helloworld应用程序

gdbserver "seems" to start correctly and attach itself to my helloworld application

当我尝试gdb到远程服务器时,我得到

警告:无法解析XML目标描述; XML支持已禁用在编译时

When I try to gdb to the remote server, I get
"warning: Can not parse XML target description; XML support was disabled at compile time"

显然,编译没有考虑expat。我真的不确定如何指定expat库路径到配置脚本。

Obviously, the compilation didn't take into account expat. I'm really unsure about how to specify the expat library path to the configuration script.

推荐答案

它通过googling相同的问题)

(old question but I stumbled into it via googling the same problem)

问题是缺少 expat lib。这很难猜到,因为:

The problem is the missing "expat" lib. This is hard to guess because :


  1. 这个lib是编译gdb的可选项

  2. 名称没有与XML的明确连接...

因此请安装emat-dev 您的数据包管理器或任何东西),然后重新启动 ./ configure 。小心安装dev版本,因为我们正在进行重新编译并需要include文件。

So install "expat-dev" (with your packet manager or anything) and then relaunch ./configure. Be careful to install the "dev" version since we are doing recompilation and need the include files.

为了确保,可以添加 --with-expat ./ configure 调用,如果找不到expat,它将停止并显示错误。

To be extra-sure, it's possible to add the "--with-expat" to the ./configure call so that it will stop with an error if expat is not found.

这篇关于编译gdb进行远程调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆