diff options
author | mcgrathr@chromium.org <mcgrathr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-15 18:29:28 +0000 |
---|---|---|
committer | mcgrathr@chromium.org <mcgrathr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-15 18:29:28 +0000 |
commit | 1fd08b68a824f91fec3866326bc098d52ad0dbfd (patch) | |
tree | 31788b8470e0898ccea064e9fca43fef56ebc9cf /chrome/app | |
parent | 1bb3cc069885ff67a2532bd9d67bc7dc75bb47fb (diff) | |
download | chromium_src-1fd08b68a824f91fec3866326bc098d52ad0dbfd.zip chromium_src-1fd08b68a824f91fec3866326bc098d52ad0dbfd.tar.gz chromium_src-1fd08b68a824f91fec3866326bc098d52ad0dbfd.tar.bz2 |
Make nacl_helper easily debuggable
This makes it so that attaching gdb to a nacl_helper process, or using gdb
on a core dump from such a process, automatically finds the symbols of the
nacl_helper executable and all the shared libraries it uses. The theory of
operation and the details are explained in comments in the code.
BUG= http://code.google.com/p/chromium/issues/detail?id=103436
TEST= nacl still works, gdb attach on nacl_helper process, or gdb on core file from one, find symbols
R=mseaborn@chromium.org,bradchen@google.com
Review URL: http://codereview.chromium.org/8491060
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110120 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app')
-rw-r--r-- | chrome/app/nacl_fork_delegate_linux.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/app/nacl_fork_delegate_linux.cc b/chrome/app/nacl_fork_delegate_linux.cc index a3723a3..372a5b7 100644 --- a/chrome/app/nacl_fork_delegate_linux.cc +++ b/chrome/app/nacl_fork_delegate_linux.cc @@ -26,7 +26,12 @@ NaClForkDelegate::NaClForkDelegate() sandboxed_(false), fd_(-1) {} +/* + * Note these need to match up with their counterparts in nacl_helper_linux.c + * and nacl_helper_bootstrap_linux.c. + */ const char kNaClHelperAtZero[] = "--at-zero"; +const char kNaClHelperRDebug[] = "--r_debug=0xXXXXXXXXXXXXXXXX"; void NaClForkDelegate::Init(const bool sandboxed, const int browserdesc, @@ -59,6 +64,7 @@ void NaClForkDelegate::Init(const bool sandboxed, CommandLine cmd_line(helper_bootstrap_exe); cmd_line.AppendArgPath(helper_exe); cmd_line.AppendArgNative(kNaClHelperAtZero); + cmd_line.AppendArgNative(kNaClHelperRDebug); base::LaunchOptions options; options.fds_to_remap = &fds_to_map; options.clone_flags = CLONE_FS | SIGCHLD; |