Skip to content

Commit

Permalink
Fix the Windows fallback backtrace implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
adeas31 committed Dec 28, 2016
1 parent bce2ab2 commit 6dca91b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 0 additions & 2 deletions OMEdit/OMEditGUI/MainWindow.cpp
Expand Up @@ -371,8 +371,6 @@ void MainWindow::setUpMainWindow()
if (OptionsDialog::instance()->getGeneralSettingsPage()->getEnableAutoSaveGroupBox()->isChecked()) {
mpAutoSaveTimer->start();
}
QWidget *p;
p->setObjectName("a");
}

/*!
Expand Down
8 changes: 6 additions & 2 deletions OMEdit/OMEditGUI/OMEditGUI.pro
Expand Up @@ -98,6 +98,10 @@ win32 {
CONFIG += osg
} else { # Unix libraries and includes
include(OMEdit.config)
# required for backtrace
# In order to get the stack trace in Windows we must add -g flag. Qt automatically adds the -O2 flag for optimization.
# We should also unset the QMAKE_LFLAGS_RELEASE define because it is defined as QMAKE_LFLAGS_RELEASE = -Wl,-s in qmake.conf file for MinGW
# -s will remove all symbol table and relocation information from the executable.
# On unix we use backtrace of execinfo.h which requires -rdynamic
# The symbol names may be unavailable without the use of special linker
# options. For systems using the GNU linker, it is necessary to use
Expand Down Expand Up @@ -172,7 +176,7 @@ SOURCES += main.cpp \
Debugger/DebuggerConfigurationsDialog.cpp \
Debugger/Attach/AttachToProcessDialog.cpp \
Debugger/Attach/ProcessListModel.cpp \
# CrashReport/backtrace.c \
CrashReport/backtrace.c \
CrashReport/GDBBacktrace.cpp \
CrashReport/CrashReportDialog.cpp

Expand Down Expand Up @@ -240,7 +244,7 @@ HEADERS += Util/Helper.h \
Debugger/DebuggerConfigurationsDialog.h \
Debugger/Attach/AttachToProcessDialog.h \
Debugger/Attach/ProcessListModel.h \
# CrashReport/backtrace.h \
CrashReport/backtrace.h \
CrashReport/GDBBacktrace.h \
CrashReport/CrashReportDialog.h

Expand Down
3 changes: 2 additions & 1 deletion OMEdit/OMEditGUI/main.cpp
Expand Up @@ -93,8 +93,9 @@ static inline void writeGDBErrorFile(QString output)

#ifdef WIN32
#include "CrashReport/backtrace.h"

static char *g_output = NULL;
LONG WINAPI exceptionFilter(LPEXCEPTION_POINTERS /*info*/)
LONG WINAPI exceptionFilter(LPEXCEPTION_POINTERS info)
{
GDBBacktrace *pGDBBacktrace = new GDBBacktrace;
if (pGDBBacktrace->errorOccurred()) {
Expand Down

0 comments on commit 6dca91b

Please sign in to comment.