ARM数据中止错误异常调试 [英] ARM Data Abort error exception debugging

查看:663
本文介绍了ARM数据中止错误异常调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,现在我明白,我得到一个ARM数据中止例外 - 例外之我见本身(在STL库一个错误的地址),但我想如何捕获异常之前走备份堆栈帧。我使用的是IAR工具链,它告诉我的调用堆栈异常后不可用 - 有一招办法说服给我的调用堆栈的工具?感谢所有快速帮助!

So now I understand that I'm getting a ARM Data Abort exception - I see how to trap the exception itself (a bad address in the STL library), but I would like to walk back up the stack frame before the exception. I'm using the IAR toolchain, and it tells me the call stack is unavailable after the exception - is there a trick way to convince the tool to show me the call stack? Thanks for all the quick help!

推荐答案

如果你看一下ARM ARM(ARM体系结构参考手册,只是谷歌手挽手),程序员型号 - >处理器模式和寄存器部分。当中断模式你priveledged这样你就可以从中止切换到主管说,然后让R13的副本,然后切换回中止模式,并从转储R13的副本堆栈。您的R14也告诉你中止发生的位置。

if you look at the ARM ARM (ARM Architecture Reference Manual, just google "arm arm"), Programmers Model -> Processor modes and Registers sections. When in abort mode you are priveledged so you can switch from abort to say supervisor and then make a copy of r13, then switch back to abort mode and dump the stack from the copy of r13. Your r14 also tells you where the abort occurred.

我不会感到惊讶,如果这个异常是从对齐。尝试读/写一个字与其它比零点在较低的两个比特的东西或与该地址组,所以LSb一个半字的地址。其实如果你把链接寄存器和寄存器(R0-R12),因为中止和用​​户/主管使用相同的寄存器空间的转储,你可以看看造成中断和地址,看它是否确实是一个指令对齐问题还是其他什么东西。请注意,电脑是一个,两个或提前三个指令根据模式的拇指或手臂不得不中止,如果你不使用拇指都那么这没什么可担心的。

I wouldnt be surprised if this abort was from an alignment. Trying to read/write a word with an address with something other than zeros in the lower two bits or a halfword with the lsbit of the address set. Actually if you take the link register and a dump of the registers (r0-r12) since abort and user/supervisor use the same register space, you can look at the instruction that caused the abort and the address to see if it was indeed an alignment problem or something else. Note that the pc is one, two or three instructions ahead depending on the mode thumb or arm that had the abort, if you are not using thumb at all then this nothing to worry about.

这篇关于ARM数据中止错误异常调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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