Debugger/MSVC: Move MSVC-specific code around.

for new CDB engine.
This commit is contained in:
Friedemann Kleint
2010-11-18 11:53:45 +01:00
parent 2d4e75101e
commit 203c7a2f11
5 changed files with 38 additions and 29 deletions

View File

@@ -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