Skip to content
Browse files

[WIN] create a minidump after exceptions in threads

  • Loading branch information...
1 parent 97ec9c1 commit 88f5ff9f708df491f02bbdef9cc59ebcac45c816 @CrystalP committed Apr 24, 2012
Showing with 6 additions and 1 deletion.
  1. +5 −0 xbmc/threads/Thread.cpp
  2. +0 −1 xbmc/utils/Win32Exception.cpp
  3. +1 −0 xbmc/utils/Win32Exception.h
View
5 xbmc/threads/Thread.cpp
@@ -161,6 +161,7 @@ DWORD WINAPI CThread::staticThread(LPVOID* data)
catch (const win32_exception &e)
{
e.writelog(__FUNCTION__);
+ e.write_minidump();
if( pThread->IsAutoDelete() )
{
delete pThread;
@@ -190,10 +191,12 @@ DWORD WINAPI CThread::staticThread(LPVOID* data)
catch (const access_violation &e)
{
e.writelog(__FUNCTION__);
+ e.write_minidump();
}
catch (const win32_exception &e)
{
e.writelog(__FUNCTION__);
+ e.write_minidump();
}
#endif
catch(...)
@@ -209,10 +212,12 @@ DWORD WINAPI CThread::staticThread(LPVOID* data)
catch (const access_violation &e)
{
e.writelog(__FUNCTION__);
+ e.write_minidump();
}
catch (const win32_exception &e)
{
e.writelog(__FUNCTION__);
+ e.write_minidump();
}
#endif
catch(...)
View
1 xbmc/utils/Win32Exception.cpp
@@ -92,7 +92,6 @@ void win32_exception::writelog(const char *prefix) const
bool win32_exception::write_minidump(EXCEPTION_POINTERS* pEp)
{
// Create the dump file where the xbmc.exe resides
- CStdString errorMsg;
bool returncode = false;
CStdString dumpFileName;
SYSTEMTIME stLocalTime;
View
1 xbmc/utils/Win32Exception.h
@@ -55,6 +55,7 @@ class win32_exception: public std::exception
Address where() const { return mWhere; };
unsigned code() const { return mCode; };
virtual void writelog(const char *prefix) const;
+ bool write_minidump() const { return write_minidump(mExceptionPointers); };
static bool write_minidump(EXCEPTION_POINTERS* pEp);
protected:
win32_exception(EXCEPTION_POINTERS* info);

0 comments on commit 88f5ff9

Please sign in to comment.
Something went wrong with that request. Please try again.