将 GDB 附加到进程 ID 并在 iPhone 上列出其 ARM 寄存器的最佳方法?
只是想知道,将 GDB 附加到进程 ID 并在 iPhone 上列出其 ARM 寄存器(通过可可应用程序)的最可靠/最佳方法是什么?我已经尝试 NSTask 有一段时间了,它能够列出特定进程的 x86 寄存器(通过 iOS 模拟器)。但部署在 iPhone 上时,就不起作用了。我还没有看到有人成功执行异步操作,就像我在 iPhone 上寻找的那样。我正在考虑使用 Applescript 运行带有 gdb 命令的 bash 脚本,有人愿意评论这样的任务的可行性吗?
非常感谢任何帮助!
我尝试使用 NSTask 来实现此目标可以在这里找到:
Just wondering, what is the most reliable/best way to attach GDB to process ID and list its ARM registers on the iPhone (through a cocoa app)? I've been trying NSTask for quite awhile, it is able to list the x86 registers of a specific process (through the iOS Simulator). But when deployed on an iPhone, it doesn't work. I have yet to see anyone perform successful asynchronous operations such as what I am seeking on the iPhone. I was thinking of using Applescript to run a bash script with the gdb commands inside, anyone care to comment on the feasability of such a task?
Any help is very much appreciated!
My attempt at using NSTask for this objective can be found here :
Strange GDB behaviour once application is deployed to a jailbroken iPhone
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您询问如何在应用程序内执行此操作:您无法在 iOS 上执行此操作。您的进程被限制无法访问其他进程,并且当然不能生成 GDB 以任何方式影响它们。
如果您询问如何在 Xcode 中执行此操作:选择
Product
菜单,然后选择Attach to Process
。 (这里假设 Xcode 4。我不记得 Xcode 3 菜单项了,但是如果您使用Help
菜单中的搜索栏,您可以轻松找到它。)If you are asking how to do this from within an app: you can't do this meaningfully on iOS. Your process has limited to no access to other processes and certainly can't spawn GDB to affect them in any way.
If you're asking how to do this from within Xcode: Select the
Product
menu, and then selectAttach to Process
. (This assumes Xcode 4. I don't remember the Xcode 3 menu item offhand, but if you use the search bar in theHelp
menu, you can find it easily.)