GDB如何确定ARM体系结构 [英] How does GDB determine ARM architecture

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

问题描述

我将gdb(arm-none-eabi)与德州仪器(TI)的大力神(Cortex-R4F)处理器配合使用.我正在使用德州仪器(TI)的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?

更新: 我找到了set体系结构命令:

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.

A,我们现在发现了其他问题.看来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天全站免登陆