如何调试基于ARM平台的随机数据中止发行 [英] How to debug random data abort issue on arm based platform

查看:186
本文介绍了如何调试基于ARM平台的随机数据中止发行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

随着基于ARM项目开发,我们得到的数据异常随机,那就是当我们玩它,我们得到一个数据中止中断。但数据中止并不总是在同一个点,当我们与寄存器映射与R14或R13检查,即使检查回调函数。反正是有,我可以得到有关的根本原因的信息,数据中止precisely?我试着裁判 2 但无法得到相同点时,我的陷阱关于中断的数据。

As developing on ARM based project, we get data abort randomly, that is when we play with it we get a data abort interrupt. But the data abort is not always on the same point when we check with the register map with r14 or r13, even though check the function callback. Is there anyway that I can get the information about the root cause on data abort precisely? I have try the ref2 but could not get the same point when I trap the data about interrupt.

相关
ARM数据中止错误异常调试
ARM:如何分析数据中止异常

推荐答案

检查如上你的Keil链接描述会告诉你,触发数据中止指令链接寄存器(R14)。从那里,你必须要弄清楚的为什么的就引发了数据中止,以及如何可能发生,这是困难的部分。

Checking the link register (r14) as described in your Keil link above will show you the instruction that triggered the data abort. From there you'll have to figure out why it triggered a data abort and how that could have happened, which is the difficult part.

在我的经验,最有可能发生的是,你访问一个无效的指针。它可以有很多原因无效。这里有几个候选人:

In my experience what most likely happened is that you accessed an invalid pointer. It can be invalid for many reasons. Here are a few candidates:


  1. 您使用的指针已经初始化之前

  2. 您使用的指针后,或含内存,已被释放(当另一个函数分配它随后被修改)

  3. 指针由堆栈溢出损坏

  4. 指针被其他无关,行为不端code就是内存损坏践踏

  5. 指针是在栈中分配为一个局部变量,然后使用后,分配功能已经退出

  6. 指针有它的类型不正确对齐(例如,尝试访问为0x4001的一个uint32_t的)

正如你所看到的,很多东西可以是ARM数据异常的根本原因。寻找根本原因是什么使得ARM的软件/固件开发这么多的乐趣的一部分!祝你好运搞清楚您的难题。

As you can see, lots of things can be the root cause of an ARM data abort. Finding the root cause is part of what makes ARM software/firmware development so much fun! Good luck figuring out your puzzle.

这篇关于如何调试基于ARM平台的随机数据中止发行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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