================
@@ -273,8 +273,14 @@ void ProcessMinidump::RefreshStateAfterStop() {
         // No stop.
         return;
       }
-
-      stop_info = StopInfo::CreateStopReasonWithSignal(*stop_thread, signo);
+      const char *description = nullptr;
+      if (exception_stream.ExceptionRecord.ExceptionFlags ==
+          llvm::minidump::Exception::LLDB_FLAG)
+        description = reinterpret_cast<const char *>(
----------------
clayborg wrote:

Since this string might not be null terminated if it is too long, then we 
should probably put this into a llvm::StringRef and cap the length to the max 
length:
```
llvm::StringRef description;
if (exception_stream.ExceptionRecord.ExceptionFlags == 
llvm::minidump::Exception::LLDB_FLAG)
    description = reinterpret_cast<const char 
*>(exception_stream.ExceptionRecord.ExceptionInformation);

stop_info = StopInfo::CreateStopReasonWithSignal(*stop_thread, signo, 
    description.substr(0, Exception::MaxParameterBytes).str().c_str());
```

https://github.com/llvm/llvm-project/pull/108448
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to