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

Unified Diff: chrome/browser/nacl_host/test/mock_nacl_gdb.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/test/mock_nacl_gdb.cc
===================================================================
--- chrome/browser/nacl_host/test/mock_nacl_gdb.cc (revision 138748)
+++ chrome/browser/nacl_host/test/mock_nacl_gdb.cc (working copy)
@@ -14,6 +14,7 @@
static const char kArgs[] = "--args";
static const char kEvalCommand[] = "--eval-command";
+static const char kCommand[] = "--command";
static const char kNaClIrt[] = "nacl-irt ";
static const char kPass[] = "PASS";
static const char kDump[] = "dump binary value ";
@@ -64,6 +65,15 @@
}
continue;
}
+ if (strcmp(argv[i], kCommand) == 0) {
+ // Command line shouldn't end with --command switch without value.
+ i += 2;
+ CHECK_LE(i, argc);
+ std::string nacl_gdb_script(argv[i - 1]);
+ file_util::WriteFile(FilePath::FromUTF8Unsafe(nacl_gdb_script),
+ kPass, strlen(kPass));
+ continue;
+ }
// Unknown argument.
NOTREACHED() << "Invalid argument " << argv[i];
}

Powered by Google App Engine
This is Rietveld 408576698