How to use gdb in the in browser nacl‑devenv environment of https://chrome.google.com/webstore/detail/nacl-development-environm/aljpgkjeipgnmdpikaajmnepbcfkglfa

39 views
Skip to first unread message

lael.c...@gmail.com

unread,
Oct 23, 2016, 8:03:11 AM10/23/16
to Native-Client-Discuss
I downloaded and installed https://chrome.google.com/webstore/detail/nacl-development-environm/aljpgkjeipgnmdpikaajmnepbcfkglfa
I installed gdb with the pkg command. However, when I try to run a program, I get
gdb python2.7
GNU gdb
(GDB) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-nacl".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/python2.7
Don't know how to run.  Try "help target".
(gdb) target exec /usr/bin/python2.7
(gdb) r
Starting program: /usr/bin/python2.7
Don'
t know how to run.  Try "help target".
It does this even on programs I compile myself (with debugging symbols that time and the .nexe extension)

Sam Clegg

unread,
Oct 24, 2016, 5:17:10 PM10/24/16
to native-cli...@googlegroups.com
My understanding is that the version of GDB in the NaCl development
can only be used for remote (TCP/IP based) debugging. Debugging of
child processed would require more of the low level plumbing such as
ptrace() that the dev environment does not yet support.
> --
> You received this message because you are subscribed to the Google Groups
> "Native-Client-Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to native-client-di...@googlegroups.com.
> To post to this group, send email to native-cli...@googlegroups.com.
> Visit this group at https://groups.google.com/group/native-client-discuss.
> For more options, visit https://groups.google.com/d/optout.

lael.c...@gmail.com

unread,
Oct 24, 2016, 5:22:43 PM10/24/16
to Native-Client-Discuss
Le lundi 24 octobre 2016 23:17:10 UTC+2, Sam Clegg a écrit :
My understanding is that the version of GDB in the NaCl development
can only be used for remote (TCP/IP based) debugging.  Debugging of
child processed would require more of the low level plumbing such as
ptrace() that the dev environment does not yet support.

In that case, how to use tcp/ip for local debugging with only several instances of the in browser sdk on the same machine ?

Sam Clegg

unread,
Oct 24, 2016, 5:47:51 PM10/24/16
to native-cli...@googlegroups.com
The ability to debug NaCl process is controlled by the chrome flag
chrome://flags/#nacl-debug-mask.

I suggest you set it to debug any processed with .nmf ending in
`debug.mnf`. When you launch such as process it will pause on
startup. In another window you can then use gdb to connect to the
remote port (use `target remote :4014` to do this) and then
`continue` the program.
Reply all
Reply to author
Forward
0 new messages