OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <cstdio> | 5 #include <cstdio> |
6 #include <cstring> | 6 #include <cstring> |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/environment.h" | 9 #include "base/environment.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/process_util.h" | |
14 | 13 |
15 static const char kEvalCommand[] = "--eval-command"; | 14 static const char kEvalCommand[] = "--eval-command"; |
16 static const char kCommand[] = "--command"; | 15 static const char kCommand[] = "--command"; |
17 static const char kNaClIrt[] = "nacl-irt \""; | 16 static const char kNaClIrt[] = "nacl-irt \""; |
18 static const char kPass[] = "PASS"; | 17 static const char kPass[] = "PASS"; |
19 static const char kAttach[] = "target remote :4014"; | 18 static const char kAttach[] = "target remote :4014"; |
20 | 19 |
21 int main(int argc, char** argv) { | 20 int main(int argc, char** argv) { |
22 scoped_ptr<base::Environment> env(base::Environment::Create()); | 21 scoped_ptr<base::Environment> env(base::Environment::Create()); |
23 std::string mock_nacl_gdb_file; | 22 std::string mock_nacl_gdb_file; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 continue; | 55 continue; |
57 } | 56 } |
58 // Unknown argument. | 57 // Unknown argument. |
59 NOTREACHED() << "Invalid argument " << argv[i]; | 58 NOTREACHED() << "Invalid argument " << argv[i]; |
60 } | 59 } |
61 CHECK_EQ(i, argc); | 60 CHECK_EQ(i, argc); |
62 file_util::WriteFile(base::FilePath::FromUTF8Unsafe(mock_nacl_gdb_file), | 61 file_util::WriteFile(base::FilePath::FromUTF8Unsafe(mock_nacl_gdb_file), |
63 kPass, strlen(kPass)); | 62 kPass, strlen(kPass)); |
64 return 0; | 63 return 0; |
65 } | 64 } |
OLD | NEW |