简体   繁体   English

如何使用gdb在PPC上查看DAR(数据访问寄存器)的内容?

[英]How can I see the contents of the DAR (data access register) on PPC using gdb?

I'm doing debugging on an embedded PPC platform (the arch is ppc750) and I noticed that when a binary crashes, if I type 'info registers' into gdb I can't see the contents of the DAR (data access register), which should show the memory address that the program was trying to read - I get only the trap register that tells me the type of the exception: 我正在嵌入式PPC平台(拱门是ppc750)上进行调试,我注意到当二进制文件崩溃时,如果我在gdb中键入“信息寄存器”,则看不到DAR(数据访问寄存器)的内容,它应该显示程序试图读取的内存地址-我仅获得陷阱寄存器,该寄存器告诉我异常的类型:

(gdb) info registers
 r0             0x1034875e       271877982
 r1             0x7fffed30       2147478832
 r2             0xfd7f7a0        265811872
 [...]
 pc             0xf18d718        0xf18d718
 msr            0xd032   53298
 cr             0x80000848       2147485768
 lr             0xf18d6f8        0xf18d6f8
 ctr            0xf235d90        253975952
 xer            0x20000000       536870912
 orig_r3        0x26     38
 trap           0x300    768

Is this even possible? 这有可能吗? I'm using gdb 7.0.1 (kind of old, I know, but more recent versions don't play well with our ancient toolchain). 我使用的是gdb 7.0.1(我知道它有些旧,但是较新的版本在我们的古老工具链中无法很好地发挥作用)。

I can't see the contents of the DAR (data access register) 我看不到DAR(数据访问寄存器)的内容

As far as I can tell, that register is only available/usable in kernel mode. 据我所知,该寄存器仅在内核模式下可用/可用。

Are you debugging on "bare metal"? 您是否正在调试“裸机”? If not, you shouldn't be looking for the DAR register in the first place. 如果没有,那么您不应该首先寻找DAR寄存器。

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

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