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 15 matching lines...) Expand all Loading... |
26 return reinterpret_cast<crashpad::WinVMAddress>(_ReturnAddress()); | 26 return reinterpret_cast<crashpad::WinVMAddress>(_ReturnAddress()); |
27 } | 27 } |
28 | 28 |
29 } // namespace | 29 } // namespace |
30 | 30 |
31 int wmain(int argc, wchar_t* argv[]) { | 31 int wmain(int argc, wchar_t* argv[]) { |
32 CHECK_EQ(argc, 2); | 32 CHECK_EQ(argc, 2); |
33 | 33 |
34 crashpad::CrashpadClient client; | 34 crashpad::CrashpadClient client; |
35 CHECK(client.SetHandlerIPCPipe(argv[1])); | 35 CHECK(client.SetHandlerIPCPipe(argv[1])); |
36 CHECK(client.UseHandler()); | |
37 | 36 |
38 HANDLE out = GetStdHandle(STD_OUTPUT_HANDLE); | 37 HANDLE out = GetStdHandle(STD_OUTPUT_HANDLE); |
39 PCHECK(out != INVALID_HANDLE_VALUE) << "GetStdHandle"; | 38 PCHECK(out != INVALID_HANDLE_VALUE) << "GetStdHandle"; |
40 crashpad::WinVMAddress break_address = CurrentAddress(); | 39 crashpad::WinVMAddress break_address = CurrentAddress(); |
41 crashpad::CheckedWriteFile(out, &break_address, sizeof(break_address)); | 40 crashpad::CheckedWriteFile(out, &break_address, sizeof(break_address)); |
42 | 41 |
43 __debugbreak(); | 42 __debugbreak(); |
44 | 43 |
45 return 0; | 44 return 0; |
46 } | 45 } |
OLD | NEW |