2

我在 iOS 6.0.1 上使用 gdb(来自radare.org 的 1708 版)来调试未知应用程序。出于某种原因,我想分配内存,这应该通过“调用(char *)malloc(size)”来工作。我已经浏览了很多使用此类调用的示例(例如这里),但是所有这些调用都失败了。

(gdb) call (char*)malloc(4)

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x00000004
0x37af2060 in strcpy ()
The program being debugged was signaled while in a function called from GDB.
GDB has restored the context to what it was before the call.
To change this behavior use "set unwindonsignal off"
Evaluation of the expression containing the function (malloc) will be abandoned.

或 (gdb) print (float) fabs (3.0)

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x40080000
0x37b18040 in T_CString_int64ToString ()
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on"
Evaluation of the expression containing the function (T_CString_int64ToString) will be abandoned.

为什么 malloc 会以参数“size”访问内存?Anly 想法如何解决这个问题?还是 gdb 版本根本不适合 iOS 6.X?实际调用似乎有效,但内部函数导致失败(T_CString_int64ToString)。

4

1 回答 1

0

GDB 似乎正在尝试访问未映射的内存区域,这是 malloc 调用返回的地址。尝试附加到已知的应用程序/进程并查看 malloc 调用是否有效。

您是否尝试过发布 1821?它可从CrackLords Repository获得,将其添加到 cydia 以获取此版本,或者您可以按照这些说明自行签名iOS >= 4.3 上的工作 GNU 调试器

于 2013-01-08T01:11:21.580 回答