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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 LOG(ERROR) << "SetHandler"; | 175 LOG(ERROR) << "SetHandler"; |
176 return EXIT_FAILURE; | 176 return EXIT_FAILURE; |
177 } | 177 } |
178 } else if (argc == 3) { | 178 } else if (argc == 3) { |
179 if (!client.StartHandler(base::FilePath(argv[1]), | 179 if (!client.StartHandler(base::FilePath(argv[1]), |
180 base::FilePath(argv[2]), | 180 base::FilePath(argv[2]), |
181 base::FilePath(), | 181 base::FilePath(), |
182 std::string(), | 182 std::string(), |
183 std::map<std::string, std::string>(), | 183 std::map<std::string, std::string>(), |
184 std::vector<std::string>(), | 184 std::vector<std::string>(), |
185 false)) { | 185 false, |
| 186 true)) { |
186 LOG(ERROR) << "StartHandler"; | 187 LOG(ERROR) << "StartHandler"; |
187 return EXIT_FAILURE; | 188 return EXIT_FAILURE; |
188 } | 189 } |
189 } else { | 190 } else { |
190 fprintf(stderr, "Usage: %ls <server_pipe_name>\n", argv[0]); | 191 fprintf(stderr, "Usage: %ls <server_pipe_name>\n", argv[0]); |
191 fprintf(stderr, " %ls <handler_path> <database_path>\n", argv[0]); | 192 fprintf(stderr, " %ls <handler_path> <database_path>\n", argv[0]); |
192 return EXIT_FAILURE; | 193 return EXIT_FAILURE; |
193 } | 194 } |
194 | 195 |
195 if (!client.UseHandler()) { | |
196 LOG(ERROR) << "UseHandler"; | |
197 return EXIT_FAILURE; | |
198 } | |
199 | |
200 crashpad::SimpleAddressRangeBag* extra_ranges = | 196 crashpad::SimpleAddressRangeBag* extra_ranges = |
201 new crashpad::SimpleAddressRangeBag(); | 197 new crashpad::SimpleAddressRangeBag(); |
202 crashpad::CrashpadInfo::GetCrashpadInfo()->set_extra_memory_ranges( | 198 crashpad::CrashpadInfo::GetCrashpadInfo()->set_extra_memory_ranges( |
203 extra_ranges); | 199 extra_ranges); |
204 AllocateExtraMemoryToBeSaved(extra_ranges); | 200 AllocateExtraMemoryToBeSaved(extra_ranges); |
205 AllocateExtraUnsavedMemory(extra_ranges); | 201 AllocateExtraUnsavedMemory(extra_ranges); |
206 | 202 |
207 // Load and unload some uncommonly used modules so we can see them in the list | 203 // Load and unload some uncommonly used modules so we can see them in the list |
208 // reported by `lm`. At least two so that we confirm we got the size of | 204 // reported by `lm`. At least two so that we confirm we got the size of |
209 // RTL_UNLOAD_EVENT_TRACE right. | 205 // RTL_UNLOAD_EVENT_TRACE right. |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 | 249 |
254 return EXIT_SUCCESS; | 250 return EXIT_SUCCESS; |
255 } | 251 } |
256 | 252 |
257 } // namespace | 253 } // namespace |
258 } // namespace crashpad | 254 } // namespace crashpad |
259 | 255 |
260 int wmain(int argc, wchar_t* argv[]) { | 256 int wmain(int argc, wchar_t* argv[]) { |
261 return crashpad::CrashyMain(argc, argv); | 257 return crashpad::CrashyMain(argc, argv); |
262 } | 258 } |
OLD | NEW |