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:
mmentovai 2006-11-06 23:00:19 +00:00
parent 5ac32b6534
commit 76f052f8fb
16 changed files with 22370 additions and 15417 deletions

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

View file

@ -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

View file

@ -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;
}