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

Side by Side Diff: snapshot/win/process_snapshot_win_test.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 unified diff | Download patch
« no previous file with comments | « snapshot/win/process_snapshot_win.cc ('k') | tools/generate_dump.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 ChildLauncher child(child_test_executable, done_uuid.ToString16()); 45 ChildLauncher child(child_test_executable, done_uuid.ToString16());
46 child.Start(); 46 child.Start();
47 47
48 char c; 48 char c;
49 ASSERT_TRUE(LoggingReadFile(child.stdout_read_handle(), &c, sizeof(c))); 49 ASSERT_TRUE(LoggingReadFile(child.stdout_read_handle(), &c, sizeof(c)));
50 ASSERT_EQ(' ', c); 50 ASSERT_EQ(' ', c);
51 51
52 ScopedProcessSuspend suspend(child.process_handle()); 52 ScopedProcessSuspend suspend(child.process_handle());
53 53
54 ProcessSnapshotWin process_snapshot; 54 ProcessSnapshotWin process_snapshot;
55 ASSERT_TRUE(process_snapshot.Initialize(child.process_handle(), 55 ASSERT_TRUE(process_snapshot.Initialize(
56 ProcessSuspensionState::kSuspended)); 56 child.process_handle(), ProcessSuspensionState::kSuspended, 0));
57 57
58 ASSERT_GE(process_snapshot.Modules().size(), 2u); 58 ASSERT_GE(process_snapshot.Modules().size(), 2u);
59 59
60 UUID uuid; 60 UUID uuid;
61 DWORD age; 61 DWORD age;
62 std::string pdbname; 62 std::string pdbname;
63 const std::string suffix(".pdb"); 63 const std::string suffix(".pdb");
64 64
65 // Check the main .exe to see that we can retrieve its sections. 65 // Check the main .exe to see that we can retrieve its sections.
66 auto module = reinterpret_cast<const internal::ModuleSnapshotWin*>( 66 auto module = reinterpret_cast<const internal::ModuleSnapshotWin*>(
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 TestImageReaderChild(FILE_PATH_LITERAL("..\\..\\out\\Debug")); 98 TestImageReaderChild(FILE_PATH_LITERAL("..\\..\\out\\Debug"));
99 #else 99 #else
100 TestImageReaderChild(FILE_PATH_LITERAL("..\\..\\out\\Release")); 100 TestImageReaderChild(FILE_PATH_LITERAL("..\\..\\out\\Release"));
101 #endif 101 #endif
102 } 102 }
103 #endif 103 #endif
104 104
105 } // namespace 105 } // namespace
106 } // namespace test 106 } // namespace test
107 } // namespace crashpad 107 } // namespace crashpad
OLDNEW
« no previous file with comments | « snapshot/win/process_snapshot_win.cc ('k') | tools/generate_dump.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698