首页 > 解决方案 > 在 GDB 中的 ARM Thumb 指令上设置断点

问题描述

我正在练习反转剥离的 arm 二进制文件(我写的),发现当我在 say 处设置断点0x010451并运行程序时,gdb 永远旋转,直到我按下 ctrl+c。当我这样做时,当前的电脑位于该地址,但我无法继续该程序。

当我将断点设置为 时0x010450,gdb 会很好地命中断点,但指令被解码为非拇指指令。

这是预期的吗?一个错误?我将在今天晚些时候尝试上传示例。

版本信息(在 qemu 用户模式仿真下):

debian@debian-arm:~/lab$ gdb --version
GNU gdb (Debian 8.2.1-2+b3) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
debian@debian-arm:~/lab$ uname -a
Linux debian-arm 4.19.0-10-armmp-lpae #1 SMP Debian 4.19.132-1 (2020-07-24) armv7l GNU/Linux

标签: debuggingarmgdbqemuthumb

解决方案


推荐阅读