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

Unified 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, 3 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 | « no previous file | minidump/minidump_thread_writer.cc » ('j') | minidump/minidump_thread_writer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: handler/win/crashy_test_program.cc
diff --git a/handler/win/crashy_test_program.cc b/handler/win/crashy_test_program.cc
index 07c9cf101278213f36b55e3025b8b1c88ece15a4..d9af2fba3b9a56004d63f70054244fc87722c32f 100644
--- a/handler/win/crashy_test_program.cc
+++ b/handler/win/crashy_test_program.cc
@@ -12,9 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "client/crashpad_client.h"
+#include <windows.h>
#include "base/logging.h"
+#include "client/crashpad_client.h"
#include "tools/tool_support.h"
namespace crashpad {
@@ -22,6 +23,14 @@ namespace {
void SomeCrashyFunction() {
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.
+ // Cause a GetLastError setting too before we crash.
+ 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.
+ GENERIC_READ,
+ 0,
+ nullptr,
+ OPEN_EXISTING,
+ 0,
+ nullptr);
*foo = 42;
}
« 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