如何在 ARM 处理器上设置软件断点? [英] How do I set a software breakpoint on an ARM processor?

查看:33
本文介绍了如何在 ARM 处理器上设置软件断点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何做相当于 x86 软件中断的操作:

How do I do the equivalent of an x86 software interrupt:

asm( "int $3" )

在 ARM 处理器(特别是 Cortex A8)上生成会中断 gdb 下执行的事件?

on an ARM processor (specifically a Cortex A8) to generate an event that will break execution under gdb?

推荐答案

使用 arm-none-eabi-gdb.exe 交叉编译器,这对我很有用(感谢 Igor 的回答):

Using arm-none-eabi-gdb.exe cross compiler, this works great for me (thanks to Igor's answer):

__asm__("BKPT");

这篇关于如何在 ARM 处理器上设置软件断点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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