================
@@ -29,53 +44,76 @@ ExceptionInfoRequestHandler::Run(const
ExceptionInfoArguments &args) const {
return llvm::make_error<DAPError>(
llvm::formatv("Invalid thread id: {}", args.threadId).str());
- ExceptionInfoResponseBody response;
- response.breakMode = eExceptionBreakModeAlways;
+ ExceptionInfoResponseBody body;
+ body.breakMode = eExceptionBreakModeAlways;
const lldb::StopReason stop_reason = thread.GetStopReason();
switch (stop_reason) {
+ case lldb::eStopReasonInstrumentation:
+ body.exceptionId = "runtime-instrumentation";
+ break;
case lldb::eStopReasonSignal:
- response.exceptionId = "signal";
+ body.exceptionId = "signal";
break;
case lldb::eStopReasonBreakpoint: {
const ExceptionBreakpoint *exc_bp =
dap.GetExceptionBPFromStopReason(thread);
if (exc_bp) {
- response.exceptionId = exc_bp->GetFilter();
- response.description = exc_bp->GetLabel();
+ body.exceptionId = exc_bp->GetFilter();
+ body.description = exc_bp->GetLabel().str() + "\n";
} else {
- response.exceptionId = "exception";
+ body.exceptionId = "exception";
}
} break;
default:
- response.exceptionId = "exception";
+ body.exceptionId = "exception";
}
lldb::SBStream stream;
- if (response.description.empty()) {
- if (thread.GetStopDescription(stream)) {
- response.description = {stream.GetData(), stream.GetSize()};
- }
- }
+ if (thread.GetStopDescription(stream))
+ body.description += {stream.GetData(), stream.GetSize()};
if (lldb::SBValue exception = thread.GetCurrentException()) {
+ body.details = ExceptionDetails{};
+ body.details->evaluateName = exception.GetName();
+ body.details->typeName = exception.GetDisplayTypeName();
----------------
ashgti wrote:
Fixed.
https://github.com/llvm/llvm-project/pull/176273
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits