Skip to content

Commit

Permalink
Remove old stack trace dump code in main
Browse files Browse the repository at this point in the history
Will be moved to a new class.
  • Loading branch information
NathanW2 committed Apr 22, 2017
1 parent 608d519 commit e192bc4
Showing 1 changed file with 1 addition and 31 deletions.
32 changes: 1 addition & 31 deletions src/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e192bc4

Please sign in to comment.