I’m using the pepper_36 SDK toolchain.
I’ve compiled the pepper_36 SDK source code with Visual Studio 2012 toolchain:
C:\NaCl_SDK\pepper_36\src\ppapi_cpp>make TOOLCHAIN=win CONFIG=Debug
C:\NaCl_SDK\vs_addin\examples\hello_nacl_cpp
I’ve downloaded “chrome-win32” & “chrome-win32-syms” binaries as per the instructions in the Colt McAnlis’s blog:
I’ve added the symbol file locations for the “chrome-win32-syms” & the target path of the hello_nacl_cpp example to the VS2012, ToolsàOptionsàDebugginhàSymbols.
I’m running the VS2012 hello_nacl_cpp with any of these Command Argument, neither one works:
--register-pepper-plugins="$(TargetPath)";application/x-nacl http://localhost:$(NaClWebServerPort)/$(NaCLIndexHTML) --user-data-dir="$(ProjectDir)/chrome_data"
--register-pepper-plugins="$(TargetPath)";application/x-nacl http://localhost:$(NaClWebServerPort)/$(NaCLIndexHTML) --no-sandbox --user-data-dir="$(ProjectDir)/chrome_data"
I’m using Apache HTTP server to host the index.html.
I’m not running any other Chrome processes. When I start debugging, VS2012 loads the symbols for Chrome, Chrome launches the html page and loads the plugin. I see the message from the plugin displayed on the page.
I then attach VS2012 debugger to the one of the three chrome processes that VS2012 allows me to attach to in Native debugging (the other two Chrome processes are greyed out for attachment). However, I don’t see the debugging symbols for the hello_nacl_cpp to get loaded!!!???
I’ve tried the launch Chrome with --single-process switch but Chrome keeps getting exception violation one after another in Visual Studio.
My breakpoint show a hollow circle. See the code below for the breakpoint location:
class NaClProjectInstance : public pp::Instance {
public:
explicit NaClProjectInstance(PP_Instance instance)
: pp::Instance(instance),
// Use this macro to eliminate compiler warning.
PP_ALLOW_THIS_IN_INITIALIZER_LIST(factory_(this)) {
myInstance = this;
}
virtual ~NaClProjectInstance() {
}
virtual bool Init(uint32_t argc, const char* argn[],
const char* argv[]) {
PostMessage(pp::Var("Creating Instance Start")); // Breakpoint Here
I’ve not build the Chrome source code with VS2012 toolset. But I’m not sure if this is the issue since I’m getting Chrome symbols loaded!? Please let me know if this is the cause!
I guess there’s something about posting on this site that once you post, makes you start thinking harder about the issue and sometimes light bulbs start coming on J
Only unpacked extensions and apps installed from the Chrome Web Store can load NaCl modules without enabling Native Client.
After adding "--enable-nacl" switch to launching Chrome the plugin loaded successfully. Then attaching the process caused the symbols to got loaded.