mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2025-12-26 09:14:58 +01:00
Suppress handler thread from appearing in MinidumpProcessor's ProcessState
(#65). r=bryner - Interface change: (ProcessState).crash_thread is now requesting_thread and will be populated for non-crash dumps. If the requesting thread cannot be determined, requesting_thread is set to -1. http://groups.google.com/group/airbag-dev/browse_thread/thread/c422ec481a2db440 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@62 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
5ac32b6534
commit
76f052f8fb
16 changed files with 22370 additions and 15417 deletions
BIN
src/processor/testdata/minidump1.dmp
vendored
BIN
src/processor/testdata/minidump1.dmp
vendored
Binary file not shown.
3735
src/processor/testdata/minidump1.out
vendored
3735
src/processor/testdata/minidump1.out
vendored
File diff suppressed because one or more lines are too long
BIN
src/processor/testdata/minidump2.dmp
vendored
BIN
src/processor/testdata/minidump2.dmp
vendored
Binary file not shown.
666
src/processor/testdata/minidump2.dump.out
vendored
Normal file
666
src/processor/testdata/minidump2.dump.out
vendored
Normal file
File diff suppressed because one or more lines are too long
16
src/processor/testdata/minidump2.stackwalk.out
vendored
16
src/processor/testdata/minidump2.stackwalk.out
vendored
|
|
@ -4,16 +4,16 @@ CPU: x86
|
|||
GenuineIntel family 6 model 13 stepping 8
|
||||
|
||||
Crash reason: EXCEPTION_ACCESS_VIOLATION
|
||||
Crash address: 0x0
|
||||
Crash address: 0x45
|
||||
|
||||
Thread 0 (crashed)
|
||||
0 test_app.exe!CrashFunction() [test_app.cc : 65 + 0x3]
|
||||
eip = 0x0040102e esp = 0x0012ff3c ebp = 0x0012ff40 ebx = 0x7c80abc1
|
||||
esi = 0x00000002 edi = 0x00000a28 eax = 0x00000000 ecx = 0x00000001
|
||||
edx = 0x0041c888 efl = 0x00010286
|
||||
1 test_app.exe!main [test_app.cc : 70 + 0x4]
|
||||
eip = 0x0040107f esp = 0x0012ff48 ebp = 0x0012ff70
|
||||
0 test_app.exe!CrashFunction() [test_app.cc : 51 + 0x3]
|
||||
eip = 0x0040208e esp = 0x0012feec ebp = 0x0012fef0 ebx = 0x7c80abc1
|
||||
esi = 0x00000002 edi = 0x00000a28 eax = 0x00000045 ecx = 0x0012fefc
|
||||
edx = 0x7c90eb94 efl = 0x00010246
|
||||
1 test_app.exe!main [test_app.cc : 56 + 0x4]
|
||||
eip = 0x004020df esp = 0x0012fef8 ebp = 0x0012ff70
|
||||
2 test_app.exe!__tmainCRTStartup [crt0.c : 318 + 0x11]
|
||||
eip = 0x0040153c esp = 0x0012ff78 ebp = 0x0012ffc0 ebx = 0x7c80abc1
|
||||
eip = 0x0040395c esp = 0x0012ff78 ebp = 0x0012ffc0
|
||||
3 kernel32.dll!BaseProcessStart + 0x22
|
||||
eip = 0x7c816fd7 esp = 0x0012ffc8 ebp = 0x0012fff0
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
21406
src/processor/testdata/symbols/test_app.pdb/8DDB7E9A365748938D6EB08B1DCA31AA1/test_app.sym
vendored
Normal file
21406
src/processor/testdata/symbols/test_app.pdb/8DDB7E9A365748938D6EB08B1DCA31AA1/test_app.sym
vendored
Normal file
File diff suppressed because it is too large
Load diff
49
src/processor/testdata/test_app.cc
vendored
49
src/processor/testdata/test_app.cc
vendored
|
|
@ -28,47 +28,32 @@
|
|||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// This file is used to generate minidump2.dmp and minidump2.sym.
|
||||
// cl /Zi /Fetest_app.exe test_app.cc dbghelp.lib
|
||||
// cl /Zi test_app.cc /Fetest_app.exe /I airbag/src \
|
||||
// airbag/src/client/windows/releasestaticcrt/exception_handler.lib \
|
||||
// ole32.lib
|
||||
// Then run test_app to generate a dump, and dump_syms to create the .sym file.
|
||||
|
||||
#include <windows.h>
|
||||
#include <dbghelp.h>
|
||||
#include <cstdio>
|
||||
|
||||
static LONG HandleException(EXCEPTION_POINTERS *exinfo) {
|
||||
HANDLE dump_file = CreateFile("dump.dmp",
|
||||
GENERIC_WRITE,
|
||||
FILE_SHARE_WRITE,
|
||||
NULL,
|
||||
CREATE_ALWAYS,
|
||||
FILE_ATTRIBUTE_NORMAL,
|
||||
NULL);
|
||||
#include "client/windows/handler/exception_handler.h"
|
||||
|
||||
MINIDUMP_EXCEPTION_INFORMATION except_info;
|
||||
except_info.ThreadId = GetCurrentThreadId();
|
||||
except_info.ExceptionPointers = exinfo;
|
||||
except_info.ClientPointers = false;
|
||||
|
||||
MiniDumpWriteDump(GetCurrentProcess(),
|
||||
GetCurrentProcessId(),
|
||||
dump_file,
|
||||
MiniDumpNormal,
|
||||
&except_info,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
CloseHandle(dump_file);
|
||||
return EXCEPTION_EXECUTE_HANDLER;
|
||||
void callback(const std::wstring &id, void *context, bool succeeded) {
|
||||
if (succeeded) {
|
||||
printf("dump guid is %ws\n", id.c_str());
|
||||
} else {
|
||||
printf("dump failed\n");
|
||||
}
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void CrashFunction() {
|
||||
int *i = NULL;
|
||||
int *i = reinterpret_cast<int*>(0x45);
|
||||
*i = 5; // crash!
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
__try {
|
||||
CrashFunction();
|
||||
} __except(HandleException(GetExceptionInformation())) {
|
||||
}
|
||||
int main(int argc, char **argv) {
|
||||
google_airbag::ExceptionHandler eh(L".", callback, NULL, true);
|
||||
CrashFunction();
|
||||
printf("did not crash?\n");
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue