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

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) {
Mark Seaborn 2012/05/24 17:25:58 It looks to me that if no --command arg is provide
halyavin 2012/05/25 09:37:45 Done.
+ // Command line shouldn't end with --command switch without value.
+ i += 2;
+ CHECK_LE(i, argc);
+ std::string nacl_gdb_script;
+ env->GetVar("NACL_GDB_SCRIPT", &nacl_gdb_script);
+ CHECK_EQ(strcmp(argv[i - 1], nacl_gdb_script.c_str()), 0);
+ continue;
+ }
// Unknown argument.
NOTREACHED() << "Invalid argument " << argv[i];
}

Powered by Google App Engine
This is Rietveld 408576698