如何在专用接口方法上设置gdb断点 [英] How to set gdb breakpoints on private interface methods
本文介绍了如何在专用接口方法上设置gdb断点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可以说Apple使用了一个私有框架DictationServices.framework,它具有符号/方法dictationEnabled的@interface SODictationPreferences。如何以编程方式在该方法上设置一个断点(使用ObjectiveC)?
解决方案
可能通过ptrace?
ptrace - 进程跟踪和调试
概要
#include
#include
int
ptrace(int request,pid_t pid,caddr_t addr,int data);
描述
ptrace()提供了跟踪和调试功能。它允许一个进程(追踪进程)控制另一个进程(追踪进程)。
Lets say Apple uses a private framework DictationServices.framework which has an @interface SODictationPreferences with symbol/method dictationEnabled. How would one be able to programmatically set a breakpoint on that method (With ObjectiveC)?
解决方案
possibly via ptrace?
ptrace -- process tracing and debugging
SYNOPSIS #include #include
int
ptrace(int request, pid_t pid, caddr_t addr, int data);
DESCRIPTION ptrace() provides tracing and debugging facilities. It allows one process (the tracing process) to control another (the traced process).
这篇关于如何在专用接口方法上设置gdb断点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文