Chromium Code Reviews| 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]; |
| } |