I have an NPAPI plug in running on OS X 10.6.8 that I'd like to debug. When I load it using FireFox 3.6.19, I can set the active executable to FF, start FF, attach using XCode, and the breakpoint will fire at the expected time.
When using Safari 5.1, I see that the plug in runs out of process, so I created and activated a customer executable for /System/Library/PrivateFrameworks/WebKit2.framework/PluginProcess.app. I then start Safari, navigate to the page hosting the plug in, attach to the plug in process, and then use the UI such the breakpoint should fire, but it doesn't. I can tell by the UI that the plug in definately loaded. If the pause the process, I see:
(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. My understanding is that the symbols will be in the plug in, so, I believe that gdb can't find my source files.
Thanks in advance for your help, Dave