[Lldb-commits] [lldb] [LLDB][Minidump] Add breakpoint stop reasons to the minidump. (PR #108448)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Thu Sep 12 14:37:16 PDT 2024
================
@@ -686,16 +692,10 @@ Status MinidumpFileBuilder::AddExceptions() {
for (const ThreadSP &thread_sp : thread_list) {
StopInfoSP stop_info_sp = thread_sp->GetStopInfo();
bool add_exception = false;
- if (stop_info_sp) {
- switch (stop_info_sp->GetStopReason()) {
- case eStopReasonSignal:
- case eStopReasonException:
+ if (stop_info_sp && thread_stop_reasons.count(stop_info_sp->GetStopReason()) > 0) {
add_exception = true;
- break;
- default:
- break;
- }
}
+
----------------
clayborg wrote:
Down below we should do something like:
```
const StopReason stop_reason = stop_info_sp->GetStopReason();
if (stop_reason == eStopReasonSignal || stop_reason == eStopReasonException)
exp_record.ExceptionCode = static_cast<llvm::support::ulittle32_t>(stop_info_sp->GetValue());
else
exp_record.ExceptionCode = lldb::StopReason::eStopReasonLLDB;
```
Then fill in the arguments for each stop reason into:
```
size_t data_count = ...; // See SBThread::GetStopReasonDataCount()
exp_record.NumberParameters = data_count; // See SBThread::GetStopReasonDataCount()
for (i=0; i<data_count; ++i)
exp_record.ExceptionInformation[i] = ...; // See SBThread::GetStopReasonDataAtIndex()
```
Then we learn to load this information into a StopReason using this data. Then we never lose any signal.
https://github.com/llvm/llvm-project/pull/108448
More information about the lldb-commits
mailing list