Skip to content
Permalink
Browse files
Remove old stack trace dump code in main
Will be moved to a new class.
  • Loading branch information
NathanW2 committed Apr 22, 2017
1 parent 608d519 commit e192bc48765d92994ad5194d1eea820c704ac3c2
Showing with 1 addition and 31 deletions.
  1. +1 −31 src/app/main.cpp
@@ -267,37 +267,7 @@ static void dumpBacktrace( unsigned int depth )
wait( &status );
}
#elif defined(Q_OS_WIN)
void **buffer = new void *[ depth ];

// SymSetOptions( SYMOPT_DEFERRED_LOADS | SYMOPT_INCLUDE_32BIT_MODULES | SYMOPT_UNDNAME );
// SymInitialize( GetCurrentProcess(), "http://msdl.microsoft.com/download/symbols;http://download.osgeo.org/osgeo4w/symstore", TRUE );



// unsigned short nFrames = CaptureStackBackTrace( 1, depth, buffer, nullptr );
// SYMBOL_INFO *symbol = ( SYMBOL_INFO * ) qgsMalloc( sizeof( SYMBOL_INFO ) + 256 );
// symbol->MaxNameLen = 255;
// symbol->SizeOfStruct = sizeof( SYMBOL_INFO );
// IMAGEHLP_LINE *line = ( IMAGEHLP_LINE * ) qgsMalloc( sizeof( IMAGEHLP_LINE ) );
// line->SizeOfStruct = sizeof( IMAGEHLP_LINE );

// for ( int i = 0; i < nFrames; i++ )
// {
// DWORD dwDisplacement;
// SymFromAddr( GetCurrentProcess(), ( DWORD64 )( buffer[ i ] ), 0, symbol );
// symbol->Name[ 255 ] = 0;
// if ( SymGetLineFromAddr( GetCurrentProcess(), ( DWORD64 )( buffer[i] ), &dwDisplacement, line ) )
// {
// myPrint( "%s(%d) : (%s) frame %d, address %x\n", line->FileName, line->LineNumber, symbol->Name, i, symbol->Address );
// }
// else
// {
// myPrint( "%s(%d) : (%s) unknown source location, frame %d, address %x [GetLastError()=%d]\n", __FILE__, __LINE__, symbol->Name, i, symbol->Address, GetLastError() );
// }
// }

// qgsFree( symbol );
// qgsFree( line );
// TODO Replace with incoming QgsStackTrace
#else
Q_UNUSED( depth );
#endif

0 comments on commit e192bc4

Please sign in to comment.