I'm attempting to get the nacl-gdb working with one of the example applications provided with the nacl_sdk. In particular, I'm trying to get it working with the sample hello_tutorial application in the getting_started/part1 folder (the stub code from this tutorial: https://developers.google.com/native-client/dev/devguide/tutorial/tutorial-part1).

I've tried following the instructions here: https://developers.google.com/native-client/dev/devguide/devcycle/debugging#debugging-with-nacl-gdb

But whenever I connect to the target, gdb prints out the following:

(gdb) target remote localhost:4014
Remote debugging using localhost:4014
warning: Can not parse XML target description; XML support was disabled at compile time
0x00000000 in ?? ()

I can then continue and the application runs, but it it's very helpful without the debugging symbols. Anybody know why this might not be working properly?

I performed the following steps:

  1. Modified the Makefile to build hello_tutorial.pexe without finalizing it, and added the -g flag when compiling, and re-ran make.
  2. Ran pnacl-translate to create the .nexe files from the un-finalized .pexe. ../../toolchain/linux_pnacl/bin/pnacl-translate --allow-llvm-bitcode-input hello_tutorial.pexe -arch x86-64 -o hello_tutorial_x86_64.nexe
  3. Modified the hello_tutorial.nmf to point to the nexe files instead of the pexe file.
  4. Modified index.html to point to "application/x-nacl", instead of "application/x-pnacl"
  5. Started Chrome with the following command:

    /opt/google/chrome/chrome --enable-nacl --enable-nacl-debug --no-sandbox --disable-hang-monitor localhost:5103
    
  6. Start up the debugger from the part1 folder with the following command:

    ../../toolchain/linux_x86_newlib/bin/x86_64-nacl-gdb
    
  7. Ran the following commands from within gdb. (Note that it shows "no debugging symbols found" when reading from the nacl_irt_x86_64.nexe - is that a problem?)

    (gdb) nacl-irt hello_tutorial_x86_64.nexe
    Reading symbols from /home/bender/dev/nacl_sdk/pepper_33/getting_started/part1/hello_tutorial_x86_64.nexe...done.
    (gdb) nacl-irt /opt/google/chrome/nacl_irt_x86_64.nexe
    Reading symbols from /opt/google/chrome/nacl_irt_x86_64.nexe...(no debugging symbols found)...done.
    (gdb) target remote localhost:4014
    Remote debugging using localhost:4014
    warning: Can not parse XML target description; XML support was disabled at compile time
    0x00000000 in ?? ()
    

I'm running on Linux:

Linux bender-VirtualBox 3.11.0-18-generic #32-Ubuntu SMP Tue Feb 18 21:11:14 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
有帮助吗?

解决方案

Looks like this is working okay if I use pepper_canary instead of pepper_33. Found some info at this link: https://code.google.com/p/nativeclient/issues/detail?id=3739

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top