GDB如何确定ARM架构 [英] How does GDB determine ARM architecture

查看:42
本文介绍了GDB如何确定ARM架构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将 gdb (arm-none-eabi) 与 Texas Instruments Hercules (Cortex-R4F) 处理器一起使用.我使用 Texas Instrument 的 XDS 代理作为远程 GDB 服务器

I am using gdb (arm-none-eabi) with a Texas Instruments Hercules (Cortex-R4F) processor. I'm using Texas Instrument's XDS agent as a remote GDB server

运行后

target remote ip:port 

在 GDB 中,GDB 将与 XDS GDBserver 连接.然后我可以打印寄存器

in GDB, GDB will connect with the XDS GDBserver. I can then print the registers

info all-registers

它向我展示了 CPU 寄存器,还有 f7 和 fpa 寄存器,这让我得出结论,CPU 有一个浮点协处理器 (FPA).然而事实并非如此.处理器有 vfpv3.所以 GDB 使用了错误的寄存器定义,这导致了问题.

It shows me the CPU registers, but also f7 and fpa registers which lead me to conclude that the CPU has an floating point coprocessor (FPA). This is however not the case. The processor has vfpv3. So GDB is using the wrong register definitions which leads to problems.

我试图通过设置找到XDS GDB服务器发送的数据包中的信息

I tried to find the info in the packets sent by XDS GDB server by setting

set debug remote 1

但找不到任何信息.GDB 如何确定要使用的寄存器定义?

but could not find any info. How does GDB determine the register definitions to use?

更新:我找到了设置架构命令:

Update: I found the set architecture command:

set architecture

>Requires an argument. Valid arguments are arm, armv2, armv2a, armv3, armv3m, armv4, armv4t, armv5, armv5t, armv5te, xscale, ep9312, iwmmxt, iwmmxt2, arm_any, auto.

Cortex-R4f 是带有 vfpv3 的 armv7.我该如何设置?

Cortex-R4f is armv7 with vfpv3. How can I set it?

推荐答案

TI 的 XDS 代理充当 GDBServer.

TI's XDS agent is acting as a GDBServer.

但是它不会响应诸如 qXfer:features:read... 之类的数据包来获取有关目标的信息

But it does not respond to packets such as qXfer:features:read... to get information on the target

最后我手动申请了:

set tdesc filename /gdb/binutils-gdb/gdb/features/arm/arm-with-vfpv3.xml

这为 Corter-R4f 设置了正确的功能,并允许我设置断点、调用函数等.

this sets the correct features for the Corter-R4f and allows me to set breakpoints, call functions, etc.

唉,我们现在发现了其他问题.TI的XDS GDBserver代理好像不是很稳定.

Alas, we're finding other problems now. It seems TI's XDS GDBserver agent is not very stable.

这篇关于GDB如何确定ARM架构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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