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

Side by Side Diff: src/client/windows/crash_generation/minidump_generator.h

Issue 1994015: Moved exception_handler_test to the more aptly named exception_handler_death_... (Closed) Base URL: http://google-breakpad.googlecode.com/svn/trunk/
Patch Set: '' Created 10 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2008, Google Inc. 1 // Copyright (c) 2008, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
11 // copyright notice, this list of conditions and the following disclaimer 11 // copyright notice, this list of conditions and the following disclaimer
12 // in the documentation and/or other materials provided with the 12 // in the documentation and/or other materials provided with the
13 // distribution. 13 // distribution.
14 // * Neither the name of Google Inc. nor the names of its 14 // * Neither the name of Google Inc. nor the names of its
15 // contributors may be used to endorse or promote products derived from 15 // contributors may be used to endorse or promote products derived from
16 // this software without specific prior written permission. 16 // this software without specific prior written permission.
17 // 17 //
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 29
30 #ifndef CLIENT_WINDOWS_CRASH_GENERATION_MINIDUMP_GENERATION_H__ 30 #ifndef CLIENT_WINDOWS_CRASH_GENERATION_MINIDUMP_GENERATOR_H_
31 #define CLIENT_WINDOWS_CRASH_GENERATION_MINIDUMP_GENERATION_H__ 31 #define CLIENT_WINDOWS_CRASH_GENERATION_MINIDUMP_GENERATOR_H_
32 32
33 #include <windows.h> 33 #include <windows.h>
34 #include <dbghelp.h> 34 #include <dbghelp.h>
35 #include <list> 35 #include <list>
36 #include "google_breakpad/common/minidump_format.h" 36 #include "google_breakpad/common/minidump_format.h"
37 37
38 namespace google_breakpad { 38 namespace google_breakpad {
39 39
40 // Abstraction for various objects and operations needed to generate 40 // Abstraction for various objects and operations needed to generate
41 // minidump on Windows. This abstraction is useful to hide all the gory 41 // minidump on Windows. This abstraction is useful to hide all the gory
(...skipping 12 matching lines...) Expand all
54 bool WriteMinidump(HANDLE process_handle, 54 bool WriteMinidump(HANDLE process_handle,
55 DWORD process_id, 55 DWORD process_id,
56 DWORD thread_id, 56 DWORD thread_id,
57 DWORD requesting_thread_id, 57 DWORD requesting_thread_id,
58 EXCEPTION_POINTERS* exception_pointers, 58 EXCEPTION_POINTERS* exception_pointers,
59 MDRawAssertionInfo* assert_info, 59 MDRawAssertionInfo* assert_info,
60 MINIDUMP_TYPE dump_type, 60 MINIDUMP_TYPE dump_type,
61 bool is_client_pointers, 61 bool is_client_pointers,
62 std::wstring* dump_path); 62 std::wstring* dump_path);
63 63
64 // Writes the minidump with the given parameters. Stores the dump file
65 // path in the dump_path (and full_dump_path) parameter if dump
66 // generation succeeds. full_dump_path and dump_path can be NULL.
67 bool WriteMinidump(HANDLE process_handle,
68 DWORD process_id,
69 DWORD thread_id,
70 DWORD requesting_thread_id,
71 EXCEPTION_POINTERS* exception_pointers,
72 MDRawAssertionInfo* assert_info,
73 MINIDUMP_TYPE dump_type,
74 bool is_client_pointers,
75 std::wstring* dump_path,
76 std::wstring* full_dump_path);
77
64 private: 78 private:
65 // Function pointer type for MiniDumpWriteDump, which is looked up 79 // Function pointer type for MiniDumpWriteDump, which is looked up
66 // dynamically. 80 // dynamically.
67 typedef BOOL (WINAPI* MiniDumpWriteDumpType)( 81 typedef BOOL (WINAPI* MiniDumpWriteDumpType)(
68 HANDLE hProcess, 82 HANDLE hProcess,
69 DWORD ProcessId, 83 DWORD ProcessId,
70 HANDLE hFile, 84 HANDLE hFile,
71 MINIDUMP_TYPE DumpType, 85 MINIDUMP_TYPE DumpType,
72 CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, 86 CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam,
73 CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, 87 CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // Critical section to sychronize action of loading modules dynamically. 125 // Critical section to sychronize action of loading modules dynamically.
112 CRITICAL_SECTION module_load_sync_; 126 CRITICAL_SECTION module_load_sync_;
113 127
114 // Critical section to synchronize action of dynamically getting function 128 // Critical section to synchronize action of dynamically getting function
115 // addresses from modules. 129 // addresses from modules.
116 CRITICAL_SECTION get_proc_address_sync_; 130 CRITICAL_SECTION get_proc_address_sync_;
117 }; 131 };
118 132
119 } // namespace google_breakpad 133 } // namespace google_breakpad
120 134
121 #endif // CLIENT_WINDOWS_CRASH_GENERATION_MINIDUMP_GENERATION_H__ 135 #endif // CLIENT_WINDOWS_CRASH_GENERATION_MINIDUMP_GENERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698