Skip to content

Commit

Permalink
fix backtrace output
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jan 24, 2015
1 parent e5a4557 commit 1e21c5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/main.cpp
Expand Up @@ -87,7 +87,7 @@ typedef SInt32 SRefCon;
#include "qgsrectangle.h"
#include "qgslogger.h"

#if (defined(linux) && !defined(ANDROID)) || defined(__FreeBSD__)
#if ((defined(linux) || defined(__linux__)) && !defined(ANDROID)) || defined(__FreeBSD__)
#include <unistd.h>
#include <execinfo.h>
#include <signal.h>
Expand Down Expand Up @@ -175,7 +175,7 @@ static void dumpBacktrace( unsigned int depth )
if ( depth == 0 )
depth = 20;

#if (defined(linux) && !defined(ANDROID)) || defined(__FreeBSD__)
#if ((defined(linux) || defined(__linux__)) && !defined(ANDROID)) || defined(__FreeBSD__)
int stderr_fd = -1;
if ( access( "/usr/bin/c++filt", X_OK ) < 0 )
{
Expand Down Expand Up @@ -234,7 +234,7 @@ static void dumpBacktrace( unsigned int depth )
void **buffer = new void *[ depth ];

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

unsigned short nFrames = CaptureStackBackTrace( 1, depth, buffer, NULL );
SYMBOL_INFO *symbol = ( SYMBOL_INFO * ) qgsMalloc( sizeof( SYMBOL_INFO ) + 256 );
Expand Down

0 comments on commit 1e21c5a

Please sign in to comment.