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

Side by Side Diff: handler/win/crashy_test_program.cc

Issue 1364803004: win: Save contents of TEBs allowing !teb and !gle to work in windbg (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@dump-without-crashing
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 | « no previous file | minidump/minidump_thread_writer.cc » ('j') | minidump/minidump_thread_writer.cc » ('J')
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,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and 12 // See the License for the specific language governing permissions and
13 // limitations under the License. 13 // limitations under the License.
14 14
15 #include "client/crashpad_client.h" 15 #include <windows.h>
16 16
17 #include "base/logging.h" 17 #include "base/logging.h"
18 #include "client/crashpad_client.h"
18 #include "tools/tool_support.h" 19 #include "tools/tool_support.h"
19 20
20 namespace crashpad { 21 namespace crashpad {
21 namespace { 22 namespace {
22 23
23 void SomeCrashyFunction() { 24 void SomeCrashyFunction() {
24 volatile int* foo = reinterpret_cast<volatile int*>(7); 25 volatile int* foo = reinterpret_cast<volatile int*>(7);
Mark Mentovai 2015/09/29 22:14:04 Move after CreateFile().
scottmg 2015/09/30 18:54:11 Done.
26 // Cause a GetLastError setting too before we crash.
27 CreateFile(L"non-existent file",
Mark Mentovai 2015/09/29 22:14:04 Since we don’t control the current directory or it
scottmg 2015/09/30 18:54:11 SetLastError() seems much better. Done.
28 GENERIC_READ,
29 0,
30 nullptr,
31 OPEN_EXISTING,
32 0,
33 nullptr);
25 *foo = 42; 34 *foo = 42;
26 } 35 }
27 36
28 int CrashyMain(int argc, char* argv[]) { 37 int CrashyMain(int argc, char* argv[]) {
29 if (argc != 2) { 38 if (argc != 2) {
30 fprintf(stderr, "Usage: %s <server_pipe_name>\n", argv[0]); 39 fprintf(stderr, "Usage: %s <server_pipe_name>\n", argv[0]);
31 return 1; 40 return 1;
32 } 41 }
33 42
34 CrashpadClient client; 43 CrashpadClient client;
(...skipping 10 matching lines...) Expand all
45 54
46 return 0; 55 return 0;
47 } 56 }
48 57
49 } // namespace 58 } // namespace
50 } // namespace crashpad 59 } // namespace crashpad
51 60
52 int wmain(int argc, wchar_t* argv[]) { 61 int wmain(int argc, wchar_t* argv[]) {
53 return crashpad::ToolSupport::Wmain(argc, argv, crashpad::CrashyMain); 62 return crashpad::ToolSupport::Wmain(argc, argv, crashpad::CrashyMain);
54 } 63 }
OLDNEW
« no previous file with comments | « no previous file | minidump/minidump_thread_writer.cc » ('j') | minidump/minidump_thread_writer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698