OLD | NEW |
1 // Copyright 2015 Google Inc. All Rights Reserved. | 1 // Copyright 2015 Google Inc. All Rights Reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 // See the License for the specific language governing permissions and | 12 // See the License for the specific language governing permissions and |
13 // limitations under the License. | 13 // limitations under the License. |
| 14 // |
| 15 // Defines the RunLaaApp class which implements a command-line tool for |
| 16 // running applications with Large Address Aware mode enabled or disabled. |
14 | 17 |
15 #ifndef SYZYGY_POIROT_POIROT_APP_H_ | 18 #ifndef SYZYGY_RUNLAA_RUNLAA_APP_H_ |
16 #define SYZYGY_POIROT_POIROT_APP_H_ | 19 #define SYZYGY_RUNLAA_RUNLAA_APP_H_ |
17 | 20 |
18 #include "base/command_line.h" | 21 #include "base/command_line.h" |
19 #include "base/files/file_path.h" | 22 #include "base/files/file_path.h" |
20 #include "base/strings/string_piece.h" | |
21 #include "syzygy/application/application.h" | 23 #include "syzygy/application/application.h" |
22 #include "syzygy/poirot/minidump_processor.h" | |
23 | 24 |
24 namespace poirot { | 25 namespace runlaa { |
25 | 26 |
26 // This class implements the minidump processor command-line utility. | 27 class RunLaaApp : public application::AppImplBase { |
27 // | |
28 // See the description given in PoirotApp:::PrintUsage() for | |
29 // information about running this utility. | |
30 class PoirotApp : public application::AppImplBase { | |
31 public: | 28 public: |
| 29 RunLaaApp() |
| 30 : AppImplBase("RunLAA"), |
| 31 is_laa_(false), |
| 32 in_place_(false), |
| 33 keep_temp_dir_(false) {} |
| 34 |
32 // @name Implementation of the AppImplBase interface. | 35 // @name Implementation of the AppImplBase interface. |
33 // @{ | 36 // @{ |
34 PoirotApp() : application::AppImplBase("PoirotApp") {} | |
35 | |
36 bool ParseCommandLine(const base::CommandLine* command_line); | 37 bool ParseCommandLine(const base::CommandLine* command_line); |
37 | |
38 int Run(); | 38 int Run(); |
39 // @} | 39 // @} |
40 | 40 |
| 41 // Exposed for unittesting. |
41 protected: | 42 protected: |
42 // @name Utility function | 43 std::string expect_mode_; |
43 // @{ | 44 base::FilePath image_; |
44 void PrintUsage(const base::FilePath& program, | 45 bool is_laa_; |
45 const base::StringPiece& message); | 46 bool in_place_; |
46 // @} | 47 bool keep_temp_dir_; |
47 | 48 base::CommandLine::StringVector child_argv_; |
48 // @name Command-line options. | |
49 // @{ | |
50 base::FilePath input_minidump_; | |
51 base::FilePath output_file_; | |
52 // @} | |
53 | |
54 private: | |
55 DISALLOW_COPY_AND_ASSIGN(PoirotApp); | |
56 }; | 49 }; |
57 | 50 |
58 } // namespace poirot | 51 } // namespace runlaa |
59 | 52 |
60 #endif // SYZYGY_POIROT_POIROT_APP_H_ | 53 #endif // SYZYGY_RUNLAA_RUNLAA_APP_H_ |
OLD | NEW |