forked from qt-creator/qt-creator
Debugger/MSVC: Move MSVC-specific code around.
for new CDB engine.
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include "winutils.h"
|
||||
#include "dbgwinutils.h"
|
||||
#include "debuggerdialogs.h"
|
||||
#include "breakpoint.h"
|
||||
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QString>
|
||||
@@ -381,5 +382,29 @@ bool isFatalWinException(long code)
|
||||
return true;
|
||||
}
|
||||
|
||||
// Special function names in MSVC runtime
|
||||
const char *winMSVCThrowFunction = "CxxThrowException";
|
||||
const char *winMSVCCatchFunction = "__CxxCallCatchBlock";
|
||||
|
||||
BreakpointParameters fixWinMSVCBreakpoint(const BreakpointParameters &p)
|
||||
{
|
||||
if (p.type == BreakpointAtThrow) {
|
||||
BreakpointParameters rc(BreakpointByFunction);
|
||||
rc.functionName = QLatin1String(winMSVCThrowFunction);
|
||||
return rc;
|
||||
}
|
||||
if (p.type == BreakpointAtCatch) {
|
||||
BreakpointParameters rc(BreakpointByFunction);
|
||||
rc.functionName = QLatin1String(winMSVCCatchFunction);
|
||||
return rc;
|
||||
}
|
||||
if (p.type == BreakpointAtMain) {
|
||||
BreakpointParameters rc(BreakpointByFunction);
|
||||
rc.functionName = QLatin1String("main");
|
||||
return rc;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Debugger
|
||||
|
||||
Reference in New Issue
Block a user