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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 enum { kMessageVersion = 1 }; | 43 enum { kMessageVersion = 1 }; |
44 | 44 |
45 //! \brief Version field to detect skew between client and server. Should be | 45 //! \brief Version field to detect skew between client and server. Should be |
46 //! set to kMessageVersion. | 46 //! set to kMessageVersion. |
47 int version; | 47 int version; |
48 | 48 |
49 //! \brief The PID of the client process. | 49 //! \brief The PID of the client process. |
50 DWORD client_process_id; | 50 DWORD client_process_id; |
51 | 51 |
52 //! \brief The address, in the client process address space, of an | 52 //! \brief The address, in the client process address space, of an |
53 //! ExceptionInformation structure. | 53 //! ExceptionInformation structure, used when handling a crash dump |
54 WinVMAddress exception_information; | 54 //! request. |
| 55 WinVMAddress crash_exception_information; |
| 56 |
| 57 //! \brief The address, in the client process address space, of an |
| 58 //! ExceptionInformation structure, used when handling a non-crashing dump |
| 59 //! request. |
| 60 WinVMAddress non_crash_exception_information; |
55 }; | 61 }; |
56 | 62 |
57 //! \brief A message only sent to the server by itself to trigger shutdown. | 63 //! \brief A message only sent to the server by itself to trigger shutdown. |
58 struct ShutdownRequest { | 64 struct ShutdownRequest { |
59 //! \brief A randomly generated token used to validate the the shutdown | 65 //! \brief A randomly generated token used to validate the the shutdown |
60 //! request was not sent from another process. | 66 //! request was not sent from another process. |
61 uint64_t token; | 67 uint64_t token; |
62 }; | 68 }; |
63 | 69 |
64 //! \brief The message passed from client to server by | 70 //! \brief The message passed from client to server by |
(...skipping 16 matching lines...) Expand all Loading... |
81 //! \brief A client registration response. | 87 //! \brief A client registration response. |
82 //! | 88 //! |
83 //! See <a | 89 //! See <a |
84 //! href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa384203">Int
erprocess | 90 //! href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa384203">Int
erprocess |
85 //! Communication Between 32-bit and 64-bit Applications</a> for details on | 91 //! Communication Between 32-bit and 64-bit Applications</a> for details on |
86 //! communicating handle values between processes of varying bitness. | 92 //! communicating handle values between processes of varying bitness. |
87 struct RegistrationResponse { | 93 struct RegistrationResponse { |
88 //! \brief An event `HANDLE`, valid in the client process, that should be | 94 //! \brief An event `HANDLE`, valid in the client process, that should be |
89 //! signaled to request a crash report. 64-bit clients should convert the | 95 //! signaled to request a crash report. 64-bit clients should convert the |
90 //! value to a `HANDLE` using sign-extension. | 96 //! value to a `HANDLE` using sign-extension. |
91 uint32_t request_report_event; | 97 uint32_t request_crash_dump_event; |
| 98 |
| 99 //! \brief An event `HANDLE`, valid in the client process, that should be |
| 100 //! signaled to request a non-crashing dump be taken. 64-bit clients |
| 101 //! should convert the value to `HANDLEEE` using sign-extension. |
| 102 uint32_t request_non_crash_dump_event; |
| 103 |
| 104 //! \brief An event `HANDLE`, valid in the client process, that will be |
| 105 //! signaled by the server when the non-crashing dump is complete. 64-bit |
| 106 //! clients should convert the value to `HANDLEEE` using sign-extension. |
| 107 uint32_t non_crash_dump_completed_event; |
92 }; | 108 }; |
93 | 109 |
94 //! \brief The response sent back to the client via SendToCrashHandlerServer(). | 110 //! \brief The response sent back to the client via SendToCrashHandlerServer(). |
95 union ServerToClientMessage { | 111 union ServerToClientMessage { |
96 RegistrationResponse registration; | 112 RegistrationResponse registration; |
97 }; | 113 }; |
98 | 114 |
99 #pragma pack(pop) | 115 #pragma pack(pop) |
100 | 116 |
101 //! \brief Connect over the given \a pipe_name, passing \a message to the | 117 //! \brief Connect over the given \a pipe_name, passing \a message to the |
102 //! server, storing the server's reply into \a response. | 118 //! server, storing the server's reply into \a response. |
103 //! | 119 //! |
104 //! Typically clients will not use this directly, instead using | 120 //! Typically clients will not use this directly, instead using |
105 //! CrashpadClient::SetHandler(). | 121 //! CrashpadClient::SetHandler(). |
106 //! | 122 //! |
107 //! \sa CrashpadClient::SetHandler() | 123 //! \sa CrashpadClient::SetHandler() |
108 bool SendToCrashHandlerServer(const base::string16& pipe_name, | 124 bool SendToCrashHandlerServer(const base::string16& pipe_name, |
109 const ClientToServerMessage& message, | 125 const ClientToServerMessage& message, |
110 ServerToClientMessage* response); | 126 ServerToClientMessage* response); |
111 | 127 |
112 } // namespace crashpad | 128 } // namespace crashpad |
113 | 129 |
114 #endif // CRASHPAD_UTIL_WIN_REGISTRATION_PROTOCOL_WIN_H_ | 130 #endif // CRASHPAD_UTIL_WIN_REGISTRATION_PROTOCOL_WIN_H_ |
OLD | NEW |