Commit 1c56e0ed authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Merge branch 'master' of git@git.videolan.org:vlc

parents 0d358ba0 5b963efa
...@@ -241,7 +241,7 @@ LONG WINAPI vlc_exception_filter(struct _EXCEPTION_POINTERS *lpExceptionInfo) ...@@ -241,7 +241,7 @@ LONG WINAPI vlc_exception_filter(struct _EXCEPTION_POINTERS *lpExceptionInfo)
osvi.dwOSVersionInfoSize = sizeof( OSVERSIONINFO ); osvi.dwOSVersionInfoSize = sizeof( OSVERSIONINFO );
GetVersionEx( &osvi ); GetVersionEx( &osvi );
fwprintf( fd, L"[Version]\nOS=%d.%d.%d.%d.%s\nVLC=" VERSION_MESSAGE, osvi.dwMajorVersion, fwprintf( fd, L"[version]\nOS=%d.%d.%d.%d.%s\nVLC=" VERSION_MESSAGE, osvi.dwMajorVersion,
osvi.dwMinorVersion, osvi.dwMinorVersion,
osvi.dwBuildNumber, osvi.dwBuildNumber,
osvi.dwPlatformId, osvi.dwPlatformId,
...@@ -250,7 +250,7 @@ LONG WINAPI vlc_exception_filter(struct _EXCEPTION_POINTERS *lpExceptionInfo) ...@@ -250,7 +250,7 @@ LONG WINAPI vlc_exception_filter(struct _EXCEPTION_POINTERS *lpExceptionInfo)
const CONTEXT *const pContext = (const CONTEXT *)lpExceptionInfo->ContextRecord; const CONTEXT *const pContext = (const CONTEXT *)lpExceptionInfo->ContextRecord;
const EXCEPTION_RECORD *const pException = (const EXCEPTION_RECORD *)lpExceptionInfo->ExceptionRecord; const EXCEPTION_RECORD *const pException = (const EXCEPTION_RECORD *)lpExceptionInfo->ExceptionRecord;
/*No nested exceptions for now*/ /*No nested exceptions for now*/
fwprintf( fd, L"\n\n[Exceptions]\n%08x at %08x",pException->ExceptionCode, fwprintf( fd, L"\n\n[exceptions]\n%08x at %08x",pException->ExceptionCode,
pException->ExceptionAddress ); pException->ExceptionAddress );
if( pException->NumberParameters > 0 ) if( pException->NumberParameters > 0 )
{ {
...@@ -259,27 +259,31 @@ LONG WINAPI vlc_exception_filter(struct _EXCEPTION_POINTERS *lpExceptionInfo) ...@@ -259,27 +259,31 @@ LONG WINAPI vlc_exception_filter(struct _EXCEPTION_POINTERS *lpExceptionInfo)
fprintf( fd, " | %08x", pException->ExceptionInformation[i] ); fprintf( fd, " | %08x", pException->ExceptionInformation[i] );
} }
fwprintf( fd, L"\n\n[CONTEXT]\nEDI:%08x\nESI:%08x\n" \ fwprintf( fd, L"\n\n[context]\nEDI:%08x\nESI:%08x\n" \
"EBX:%08x\nEDX:%08x\nECX:%08x\nEAX:%08x\n" \ "EBX:%08x\nEDX:%08x\nECX:%08x\nEAX:%08x\n" \
"EBP:%08x\nEIP:%08x\nESP:%08x\n", "EBP:%08x\nEIP:%08x\nESP:%08x\n",
pContext->Edi,pContext->Esi,pContext->Ebx, pContext->Edi,pContext->Esi,pContext->Ebx,
pContext->Edx,pContext->Ecx,pContext->Eax, pContext->Edx,pContext->Ecx,pContext->Eax,
pContext->Ebp,pContext->Eip,pContext->Esp ); pContext->Ebp,pContext->Eip,pContext->Esp );
fwprintf( fd, L"\n\n[STACKTRACE]\n#EIP|base|module\n" ); fwprintf( fd, L"\n[stacktrace]\n#EIP|base|module\n" );
DWORD pEbp = pContext->Ebp;
DWORD caller = *((DWORD*)pEbp + 1) ;
wchar_t module[ 256 ]; wchar_t module[ 256 ];
MEMORY_BASIC_INFORMATION mbi ;
VirtualQuery( (DWORD *)pContext->Eip, &mbi, sizeof( mbi ) ) ;
HINSTANCE hInstance = mbi.AllocationBase;
GetModuleFileName( hInstance, module, 256 ) ;
fwprintf( fd, L"%08x|%s\n", pContext->Eip, module );
DWORD pEbp = pContext->Ebp;
DWORD caller = *((DWORD*)pEbp + 1);
do do
{ {
MEMORY_BASIC_INFORMATION mbi ;
VirtualQuery( (DWORD *)caller, &mbi, sizeof( mbi ) ) ; VirtualQuery( (DWORD *)caller, &mbi, sizeof( mbi ) ) ;
HINSTANCE hInstance = mbi.AllocationBase; HINSTANCE hInstance = mbi.AllocationBase;
GetModuleFileName( hInstance, module, 256 ) ; GetModuleFileName( hInstance, module, 256 ) ;
fwprintf( fd, L"%08x|%08x|%s\n", caller, hInstance, module ); fwprintf( fd, L"%08x|%s\n", caller, module );
pEbp = *(DWORD*)pEbp ; pEbp = *(DWORD*)pEbp ;
caller = *((DWORD*)pEbp + 1) ; caller = *((DWORD*)pEbp + 1) ;
/*The last EBP points to NULL!*/ /*The last EBP points to NULL!*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment