Skip to content

Commit e192bc4

Browse files
committed
Remove old stack trace dump code in main
Will be moved to a new class.
1 parent 608d519 commit e192bc4

File tree

1 file changed

+1
-31
lines changed

1 file changed

+1
-31
lines changed

src/app/main.cpp

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -267,37 +267,7 @@ static void dumpBacktrace( unsigned int depth )
267267
wait( &status );
268268
}
269269
#elif defined(Q_OS_WIN)
270-
void **buffer = new void *[ depth ];
271-
272-
// SymSetOptions( SYMOPT_DEFERRED_LOADS | SYMOPT_INCLUDE_32BIT_MODULES | SYMOPT_UNDNAME );
273-
// SymInitialize( GetCurrentProcess(), "http://msdl.microsoft.com/download/symbols;http://download.osgeo.org/osgeo4w/symstore", TRUE );
274-
275-
276-
277-
// unsigned short nFrames = CaptureStackBackTrace( 1, depth, buffer, nullptr );
278-
// SYMBOL_INFO *symbol = ( SYMBOL_INFO * ) qgsMalloc( sizeof( SYMBOL_INFO ) + 256 );
279-
// symbol->MaxNameLen = 255;
280-
// symbol->SizeOfStruct = sizeof( SYMBOL_INFO );
281-
// IMAGEHLP_LINE *line = ( IMAGEHLP_LINE * ) qgsMalloc( sizeof( IMAGEHLP_LINE ) );
282-
// line->SizeOfStruct = sizeof( IMAGEHLP_LINE );
283-
284-
// for ( int i = 0; i < nFrames; i++ )
285-
// {
286-
// DWORD dwDisplacement;
287-
// SymFromAddr( GetCurrentProcess(), ( DWORD64 )( buffer[ i ] ), 0, symbol );
288-
// symbol->Name[ 255 ] = 0;
289-
// if ( SymGetLineFromAddr( GetCurrentProcess(), ( DWORD64 )( buffer[i] ), &dwDisplacement, line ) )
290-
// {
291-
// myPrint( "%s(%d) : (%s) frame %d, address %x\n", line->FileName, line->LineNumber, symbol->Name, i, symbol->Address );
292-
// }
293-
// else
294-
// {
295-
// myPrint( "%s(%d) : (%s) unknown source location, frame %d, address %x [GetLastError()=%d]\n", __FILE__, __LINE__, symbol->Name, i, symbol->Address, GetLastError() );
296-
// }
297-
// }
298-
299-
// qgsFree( symbol );
300-
// qgsFree( line );
270+
// TODO Replace with incoming QgsStackTrace
301271
#else
302272
Q_UNUSED( depth );
303273
#endif

0 commit comments

Comments
 (0)