【发布时间】:2011-09-02 17:56:58
【问题描述】:
我有一个在 OS X 10.6.8 上运行的 NPAPI 插件,我想调试它。当我使用 FireFox 3.6.19 加载它时,我可以将活动可执行文件设置为 FF,启动 FF,使用 XCode 附加,断点将在预期的时间触发。
在使用 Safari 5.1 时,我看到插件进程耗尽,因此我为 /System/Library/PrivateFrameworks/WebKit2.framework/PluginProcess.app 创建并激活了一个客户可执行文件。然后我启动 Safari,导航到托管插件的页面,附加到插件进程,然后使用 UI,这样断点应该会触发,但它不会。我可以通过 UI 判断插件肯定已加载。如果暂停进程,我看到:
(gdb) i b
Num Type Disp Enb Address What
1 breakpoint keep y <PENDING> "ADP_NPAPI_Interface.m":34
2 breakpoint keep y <PENDING> "ADP_NPAPI_Interface.m":34
3 breakpoint keep y <PENDING> "ADP_NPAPI_Interface.m":34
4 breakpoint keep y <PENDING> "plugin.cpp":244
5 breakpoint keep y <PENDING> "plugin.cpp":358
6 breakpoint keep y <PENDING> objc_exception_throw
(gdb) show directories
Source directories searched: $cdir:$cwd
(gdb) info sources
No symbol table is loaded. Use the "file" command.
(gdb) file sources
sources: No such file or directory
(gdb) info file
No registers.
No registers.
(gdb) show paths
Executable and object file path: /Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym。我的理解是符号会在插件中,所以,我相信gdb找不到我的源文件。
提前感谢您的帮助, 戴夫
【问题讨论】: