http://bugs.winehq.org/show_bug.cgi?id=7426
Summary: winedbg is unable to extract callstack from minidump Product: Wine Version: 0.9.30. Platform: Other OS/Version: other Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-debug AssignedTo: wine-bugs@winehq.org ReportedBy: lindevel@gmx.net
When I create a program with MinGW which dumps a minidump, winedbg can't extract the callstack from the created dump.
All I get is this: WineDbg starting on minidump on pid 0008 mdump2.exe was running on #1 Intel Pentium Pro/II-0.2560 CPU on Windows 2000 (2195) Register dump: CS:0073 SS:007b DS:007b ES:007b FS:0033 GS:003b EIP:004012fb ESP:0062feb0 EBP:0062feb8 EFLAGS:00010212( - 00 - RIA1) EAX:00000000 EBX:7b8ab5c8 ECX:7b8ab5c8 EDX:0040130e ESI:00401140 EDI:7ffdf000 Stack dump: 0x0062feb0: *** Invalid address 0x0062feb0
Backtrace: WineDbg starting on pid 0008
This problem can be tested with the sample code from http://www.codeproject.com/debug/postmortemdebug_standalone1.asp?df=100&...
The same happens with following minimalised code-extract:
#include <windows.h> #include "/usr/include/wine/windows/dbghelp.h"
typedef BOOL (WINAPI *MINIDUMPWRITEDUMP)(HANDLE hProcess, DWORD dwPid, HANDLE hFile, MINIDUMP_TYPE DumpType, CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam );
LONG WINAPI WindowsExceptionFilter(EXCEPTION_POINTERS* pExceptionInfo) { HMODULE hDll = LoadLibrary( "DBGHELP.DLL" ); MINIDUMPWRITEDUMP pDump = (MINIDUMPWRITEDUMP)GetProcAddress( hDll, "MiniDumpWriteDump" ); HANDLE hFile = CreateFile( "app.exe.mdmp", GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL ); MINIDUMP_EXCEPTION_INFORMATION ExInfo;
ExInfo.ThreadId = GetCurrentThreadId(); ExInfo.ExceptionPointers = pExceptionInfo; ExInfo.ClientPointers = NULL; pDump( GetCurrentProcess(), GetCurrentProcessId(), hFile, MiniDumpNormal, &ExInfo, NULL, NULL ); return(EXCEPTION_CONTINUE_SEARCH); }
int main(int argc, char *argv[]) { SetUnhandledExceptionFilter(WindowsExceptionFilter);
*(int*)NULL = 0x1234;
return 0; }
I compiled both samples with: mingw32-g++ mdump.cpp -o mdump.exe
However, when I load a minidump created by Windows XP (Which a user gave me. It was not created by my app and I don't know how he created it. Maybe some MS library did it...) it seems to work. (It doesn't tell me any function names for some reason, but at least it doesn't say "Invalid address".)