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

Unified Diff: util/win/exception_handler_server.cc

Issue 1392093003: win: Capture some CRITICAL_SECTION debugging data (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: . Created 5 years, 2 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
« no previous file with comments | « util/win/exception_handler_server.h ('k') | util/win/exception_handler_server_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/win/exception_handler_server.cc
diff --git a/util/win/exception_handler_server.cc b/util/win/exception_handler_server.cc
index 840b1767f9724b0fde6ebd4405110584c98d41e2..9cc69e6791c1d1f10429199f3265020e2546ca18 100644
--- a/util/win/exception_handler_server.cc
+++ b/util/win/exception_handler_server.cc
@@ -105,6 +105,7 @@ class ClientData {
ScopedKernelHANDLE process,
WinVMAddress crash_exception_information_address,
WinVMAddress non_crash_exception_information_address,
+ WinVMAddress debug_critical_section_address,
WAITORTIMERCALLBACK crash_dump_request_callback,
WAITORTIMERCALLBACK non_crash_dump_request_callback,
WAITORTIMERCALLBACK process_end_callback)
@@ -124,7 +125,8 @@ class ClientData {
crash_exception_information_address_(
crash_exception_information_address),
non_crash_exception_information_address_(
- non_crash_exception_information_address) {
+ non_crash_exception_information_address),
+ debug_critical_section_address_(debug_critical_section_address) {
RegisterThreadPoolWaits(crash_dump_request_callback,
non_crash_dump_request_callback,
process_end_callback);
@@ -155,6 +157,9 @@ class ClientData {
WinVMAddress non_crash_exception_information_address() const {
return non_crash_exception_information_address_;
}
+ WinVMAddress debug_critical_section_address() const {
+ return debug_critical_section_address_;
+ }
HANDLE process() const { return process_.get(); }
private:
@@ -219,6 +224,7 @@ class ClientData {
ScopedKernelHANDLE process_;
WinVMAddress crash_exception_information_address_;
WinVMAddress non_crash_exception_information_address_;
+ WinVMAddress debug_critical_section_address_;
DISALLOW_COPY_AND_ASSIGN(ClientData);
};
@@ -412,6 +418,7 @@ bool ExceptionHandlerServer::ServiceClientConnection(
ScopedKernelHANDLE(client_process),
message.registration.crash_exception_information,
message.registration.non_crash_exception_information,
+ message.registration.critical_section_address,
&OnCrashDumpEvent,
&OnNonCrashDumpEvent,
&OnProcessEnd);
@@ -465,7 +472,9 @@ void __stdcall ExceptionHandlerServer::OnCrashDumpEvent(void* ctx, BOOLEAN) {
// Capture the exception.
unsigned int exit_code = client->delegate()->ExceptionHandlerServerException(
- client->process(), client->crash_exception_information_address());
+ client->process(),
+ client->crash_exception_information_address(),
+ client->debug_critical_section_address());
TerminateProcess(client->process(), exit_code);
}
@@ -478,7 +487,9 @@ void __stdcall ExceptionHandlerServer::OnNonCrashDumpEvent(void* ctx, BOOLEAN) {
// Capture the exception.
client->delegate()->ExceptionHandlerServerException(
- client->process(), client->non_crash_exception_information_address());
+ client->process(),
+ client->non_crash_exception_information_address(),
+ client->debug_critical_section_address());
bool result = SetEvent(client->non_crash_dump_completed_event());
PLOG_IF(ERROR, !result) << "SetEvent";
« no previous file with comments | « util/win/exception_handler_server.h ('k') | util/win/exception_handler_server_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698