Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2049)

Unified Diff: chrome/browser/nacl_host/nacl_process_host.cc

Issue 10447012: Add nacl-gdb-script switch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698