简体   繁体   English

远程'g'数据包回复太长aarch64 arm64

[英]Remote 'g' packet reply is too long aarch64 arm64

I am trying to setup KGDB to debug our arm64 kernel. 我正在尝试设置KGDB来调试arm64内核。 My setup is that target is running on kernel 3.14 (with some arm64 kgdb patches back ported), on host I used the linaro toolchain 4.8 aarch64-linux-gnu-gdb, and whenever I issue: 我的设置是目标在内核3.14上运行(向后移植了一些arm64 kgdb补丁),在主机上,我使用了linaro工具链4.8 aarch64-linux-gnu-gdb,并且在每次发布时:

target remote /dev/ttyS0

I got the error message: 我收到错误消息:

Remote 'g' packet reply is too long:

I Googled a lot on the problem, and none of them worked out for me. 我在这个问题上搜索了很多,但没有一个对我有用。 I think this problem is specific to arm64. 我认为此问题特定于arm64。 Does anyone here by any chance know how to proceed? 这里有没有人知道如何进行?

Inspired the question here: https://answers.launchpad.net/gcc-arm-embedded/+question/193249 在这里启发了这个问题: https : //answers.launchpad.net/gcc-arm-embedded/+question/193249

I found the solution. 我找到了解决方案。 Before issuing 发行前

target remote /dev/ttyS0

do the following 请执行下列操作

set tdesc filename aarch64.xml

I took aarch64.xml from the latest gdb source code: gdb-7.8/gdb/features/aarch64.xml. 我从最新的gdb源代码中获取了aarch64.xml:gdb-7.8 / gdb / features / aarch64.xml。 By doing that, we instruct the GDB client to accept more registers than it initially expects. 通过这样做,我们指示GDB客户端接受比其最初预期更多的寄存器。

The root cause seems that the GDB client is only expecting 31 registers and register SP, PC, CPSR, but kernel gdb stub returns not only those registers but other FPU registers, which cause error message: 根本原因似乎是GDB客户端仅需要31个寄存器以及SP,PC,CPSR寄存器,但是内核gdb存根不仅返回那些寄存器,而且还返回其他FPU寄存器,这将导致错误消息:

Remote 'g' packet reply is too long:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM