OLD | NEW |
1 // Copyright 2015 The Crashpad Authors. All rights reserved. | 1 // Copyright 2015 The Crashpad Authors. 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, |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 if (!client.StartHandler(base::FilePath(argv[1]), | 105 if (!client.StartHandler(base::FilePath(argv[1]), |
106 base::FilePath(argv[2]), | 106 base::FilePath(argv[2]), |
107 std::string(), | 107 std::string(), |
108 std::map<std::string, std::string>(), | 108 std::map<std::string, std::string>(), |
109 std::vector<std::string>(), | 109 std::vector<std::string>(), |
110 false)) { | 110 false)) { |
111 LOG(ERROR) << "StartHandler"; | 111 LOG(ERROR) << "StartHandler"; |
112 return EXIT_FAILURE; | 112 return EXIT_FAILURE; |
113 } | 113 } |
114 } else { | 114 } else { |
115 fprintf(stderr, "Usage: %s <server_pipe_name>\n", argv[0]); | 115 fprintf(stderr, "Usage: %ls <server_pipe_name>\n", argv[0]); |
116 fprintf(stderr, " %s <handler_path> <database_path>\n", argv[0]); | 116 fprintf(stderr, " %ls <handler_path> <database_path>\n", argv[0]); |
117 return EXIT_FAILURE; | 117 return EXIT_FAILURE; |
118 } | 118 } |
119 | 119 |
120 if (!client.UseHandler()) { | 120 if (!client.UseHandler()) { |
121 LOG(ERROR) << "UseHandler"; | 121 LOG(ERROR) << "UseHandler"; |
122 return EXIT_FAILURE; | 122 return EXIT_FAILURE; |
123 } | 123 } |
124 | 124 |
125 AllocateMemoryOfVariousProtections(); | 125 AllocateMemoryOfVariousProtections(); |
126 | 126 |
127 if (InitializeCriticalSectionWithDebugInfoIfPossible( | 127 if (InitializeCriticalSectionWithDebugInfoIfPossible( |
128 &g_test_critical_section)) { | 128 &g_test_critical_section)) { |
129 EnterCriticalSection(&g_test_critical_section); | 129 EnterCriticalSection(&g_test_critical_section); |
130 } | 130 } |
131 | 131 |
132 SomeCrashyFunction(); | 132 SomeCrashyFunction(); |
133 | 133 |
134 return EXIT_SUCCESS; | 134 return EXIT_SUCCESS; |
135 } | 135 } |
136 | 136 |
137 } // namespace | 137 } // namespace |
138 } // namespace crashpad | 138 } // namespace crashpad |
139 | 139 |
140 int wmain(int argc, wchar_t* argv[]) { | 140 int wmain(int argc, wchar_t* argv[]) { |
141 return crashpad::CrashyMain(argc, argv); | 141 return crashpad::CrashyMain(argc, argv); |
142 } | 142 } |
OLD | NEW |