Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2297)

Unified Diff: util/win/registration_protocol_win.h

Issue 1301853002: win: Crash handler server (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: fixes and move some things around Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: util/win/registration_protocol_win.h
diff --git a/client/registration_protocol_win.h b/util/win/registration_protocol_win.h
similarity index 56%
rename from client/registration_protocol_win.h
rename to util/win/registration_protocol_win.h
index 68eaa76c3c51adda1c7a3d2f52169b8b78a2a5da..929ff3ac5bad93ccd0bf00de8b1e26d103b3f095 100644
--- a/client/registration_protocol_win.h
+++ b/util/win/registration_protocol_win.h
@@ -12,28 +12,40 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef CRASHPAD_CLIENT_REGISTRATION_PROTOCOL_WIN_H_
-#define CRASHPAD_CLIENT_REGISTRATION_PROTOCOL_WIN_H_
+#ifndef CRASHPAD_UTIL_WIN_REGISTRATION_PROTOCOL_WIN_H_
+#define CRASHPAD_UTIL_WIN_REGISTRATION_PROTOCOL_WIN_H_
#include <windows.h>
#include <stdint.h>
+#include "base/strings/string16.h"
#include "util/win/address_types.h"
namespace crashpad {
#pragma pack(push, 1)
+
+//! \brief Structure read out of the client process by the crash handler when an
+//! exception occurs.
+struct ExceptionInformation {
+ //! \brief The thread on which the exception happened.
+ DWORD thread_id;
+
+ //! \brief The address of an EXCEPTION_POINTERS structure in the client
+ //! process that describes the exception.
+ WinVMAddress exception_pointers;
Mark Mentovai 2015/08/26 21:40:28 Packs better if the WinVMAddress comes before the
scottmg 2015/08/27 01:04:38 Done.
+};
+
//! \brief A client registration request.
struct RegistrationRequest {
//! \brief The PID of the client process.
DWORD client_process_id;
Mark Mentovai 2015/08/26 21:40:28 Can the server determine this from the message wit
scottmg 2015/08/27 01:04:38 Right, I don't think it's possible on XP. (swapped
- //! \brief The address, in the client process address space, of a CrashpadInfo
- //! structure.
- crashpad::WinVMAddress crashpad_info_address;
+
+ //! \brief The address, in the client process address space, of an
+ //! ExceptionInformation structure.
+ WinVMAddress exception_information;
};
-#pragma pack(pop)
-#pragma pack(push, 1)
//! \brief A client registration response.
//!
//! See <a
@@ -45,13 +57,25 @@ struct RegistrationResponse {
//! signaled to request a crash report. 64-bit clients should convert the
//! value to a `HANDLE` using sign-extension.
uint32_t request_report_event;
- //! \brief An event `HANDLE`, valid in the client process, that will be
- //! signaled when the requested crash report is complete. 64-bit clients
- //! should convert the value to a `HANDLE` using sign-extension.
- uint32_t report_complete_event;
};
+
#pragma pack(pop)
+namespace internal {
+
+//! \brief Connect over the given \a pipe_name, passing \a request to the
+//! server, and reading its reply into \a response.
+//!
+//! Typically clients will not use this directly, instead using
+//! CrashpadClient::SetHandler().
+//!
+//! \sa CrashpadClient::SetHandler()
+bool RegisterWithCrashHandlerServer(const base::string16& pipe_name,
+ const RegistrationRequest& request,
+ RegistrationResponse* response);
+
+} // namespace internal
+
} // namespace crashpad
-#endif // CRASHPAD_CLIENT_REGISTRATION_PROTOCOL_WIN_H_
+#endif // CRASHPAD_UTIL_WIN_REGISTRATION_PROTOCOL_WIN_H_

Powered by Google App Engine
This is Rietveld 408576698