Index: chrome/browser/nacl_host/nacl_process_host.cc |
=================================================================== |
--- chrome/browser/nacl_host/nacl_process_host.cc (revision 138748) |
+++ chrome/browser/nacl_host/nacl_process_host.cc (working copy) |
@@ -312,6 +312,12 @@ |
cmd_line->AppendArgNative(FILE_PATH_LITERAL("nacl-manifest ") + |
manifest_path.value()); |
} |
+ FilePath script = CommandLine::ForCurrentProcess()->GetSwitchValuePath( |
+ switches::kNaClGdbScript); |
+ if (!script.empty()) { |
+ cmd_line->AppendArg("--command"); |
+ cmd_line->AppendArgNative(script.value()); |
+ } |
cmd_line->AppendArg("--args"); |
const CommandLine::StringVector& argv = line->argv(); |
for (size_t i = 0; i < argv.size(); i++) { |
@@ -385,6 +391,12 @@ |
cmd_line.AppendArg("dump binary value /proc/" + |
base::IntToString(base::GetCurrentProcId()) + |
"/fd/" + base::IntToString(fds[1]) + " (char)0"); |
+ FilePath script = CommandLine::ForCurrentProcess()->GetSwitchValuePath( |
+ switches::kNaClGdbScript); |
+ if (!script.empty()) { |
+ cmd_line.AppendArg("--command"); |
+ cmd_line.AppendArgNative(script.value()); |
+ } |
// wait on fds[0] |
// If the debugger crashes before attaching to the NaCl process, the user can |
// release resources by terminating the NaCl loader in Chrome Task Manager. |