gdb remote cross debugging fails with “Remote 'g' packet reply is too long”

吃可爱长大的小学妹 提交于 2019-12-03 01:55:30

As I ran into this recently on Ubuntu 12.04 (x86_64) and solved it in a different way, I thought I'd comment. The kicker in this case is that Ubuntu seems to have gdb with libexpat enabled. Some tinkering later and this solved it for me:

set architecture i386:x86-64:intel

So it appears this can result when there is a mismatch of architectures as well.

I was able to use gdb-multiarch instead and resolved my issue.

I had this same problem trying to debug a Freescale ARM on an i5 machine running Ubuntu 11.10 64bit.

The fix that worked for me was to specify the --with-expat flag when configuring gdb. I also had to install the libexpat1-dev package.

Explanation here

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!