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

Unified Diff: handler/win/crashy_test_program.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
Index: handler/win/crashy_test_program.cc
diff --git a/handler/win/crashy_test_program.cc b/handler/win/crashy_test_program.cc
index 622a5e5df08d3218dbdd2e5d1a2ab7fca32992e2..6eb79f1caa28800ea94323f3699b0e0f2491b611 100644
--- a/handler/win/crashy_test_program.cc
+++ b/handler/win/crashy_test_program.cc
@@ -27,6 +27,8 @@
namespace crashpad {
namespace {
+CRITICAL_SECTION g_test_critical_section;
+
ULONG RtlNtStatusToDosError(NTSTATUS status) {
static decltype(::RtlNtStatusToDosError)* rtl_nt_status_to_dos_error =
reinterpret_cast<decltype(::RtlNtStatusToDosError)*>(
@@ -61,6 +63,10 @@ int CrashyMain(int argc, char* argv[]) {
return 1;
}
+ InitializeCriticalSectionEx(
+ &g_test_critical_section, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
+ EnterCriticalSection(&g_test_critical_section);
+
SomeCrashyFunction();
return 0;

Powered by Google App Engine
This is Rietveld 408576698