[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Add breakpoint stop reasons to the minidump. (PR #108448)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 7 14:10:28 PDT 2024
================
@@ -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
More information about the lldb-commits
mailing list