Compiling gdb for remote debugging

倖福魔咒の 提交于 2019-12-03 12:56:57

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

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

  1. this lib is optional for compiling gdb
  2. the "expat" name has no clear connection to XML...

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.

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.

Somehow it worked anyway

Also, create a file ~/.gdbinit with

file /home/username/path/to/exec/exec_name
set sysroot /path/to/libraries/running/on/target/device
target remote HOST:PORT
b main
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!