forked from qt-creator/qt-creator
CDB: always set stop reason when handling exceptions
Otherwise we get an unknown stop reason which might get handled differently in the cdbengine. Fixes: QTCREATORBUG-26506 Change-Id: Ia1622977631190d43a6b599b58410953cd2add6e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -173,14 +173,14 @@ STDMETHODIMP EventCallback::Exception(
|
|||||||
__in ULONG FirstChance
|
__in ULONG FirstChance
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
const ExtensionContext::StopReasonMap parameters = exceptionParameters(*Ex, FirstChance);
|
||||||
|
ExtensionContext::instance().setStopReason(parameters, "exception");
|
||||||
if ((FirstChance && ExtensionContext::instance().parameters().firstChanceException != 0)
|
if ((FirstChance && ExtensionContext::instance().parameters().firstChanceException != 0)
|
||||||
|| (!FirstChance && ExtensionContext::instance().parameters().secondChanceException != 0)) {
|
|| (!FirstChance && ExtensionContext::instance().parameters().secondChanceException != 0)) {
|
||||||
// Report the exception as GBMI and set potential stop reason
|
// Report the exception as GBMI and set potential stop reason
|
||||||
const ExtensionContext::StopReasonMap parameters = exceptionParameters(*Ex, FirstChance);
|
|
||||||
|
|
||||||
std::ostringstream str;
|
std::ostringstream str;
|
||||||
formatGdbmiHash(str, parameters);
|
formatGdbmiHash(str, parameters);
|
||||||
ExtensionContext::instance().setStopReason(parameters, "exception");
|
|
||||||
ExtensionContext::instance().report('E', 0, 0, "exception", "%s", str.str().c_str());
|
ExtensionContext::instance().report('E', 0, 0, "exception", "%s", str.str().c_str());
|
||||||
}
|
}
|
||||||
return m_wrapped ? m_wrapped->Exception(Ex, FirstChance) : S_OK;
|
return m_wrapped ? m_wrapped->Exception(Ex, FirstChance) : S_OK;
|
||||||
|
Reference in New Issue
Block a user