Skip to content

Commit 9bddd55

Browse files
committed
Remove ThreadMinidump calculate stop info which was causing a hang in test, reset them to main. Run git clang format and run tests.
1 parent a265847 commit 9bddd55

File tree

3 files changed

+6
-24
lines changed

3 files changed

+6
-24
lines changed

lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -395,21 +395,17 @@ bool ProcessMinidump::DoUpdateThreadList(ThreadList &old_thread_list,
395395
for (const minidump::Thread &thread : m_thread_list) {
396396
LocationDescriptor context_location = thread.Context;
397397

398-
std::optional<minidump::Exception> exception;
399398
// If the minidump contains an exception context, use it
400-
if (m_exceptions_by_tid.count(thread.ThreadId) > 0) {
399+
if (m_exceptions_by_tid.count(thread.ThreadId) > 0)
401400
context_location = m_exceptions_by_tid[thread.ThreadId].ThreadContext;
402-
exception = m_exceptions_by_tid[thread.ThreadId].ExceptionRecord;
403-
}
404401

405402
llvm::ArrayRef<uint8_t> context;
406403
if (!m_is_wow64)
407404
context = m_minidump_parser->GetThreadContext(context_location);
408405
else
409406
context = m_minidump_parser->GetThreadContextWow64(thread);
410407

411-
lldb::ThreadSP thread_sp(
412-
new ThreadMinidump(*this, thread, context, exception));
408+
lldb::ThreadSP thread_sp(new ThreadMinidump(*this, thread, context));
413409
new_thread_list.AddThread(thread_sp);
414410
}
415411
return new_thread_list.GetSize(false) > 0;

lldb/source/Plugins/Process/minidump/ThreadMinidump.cpp

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@ using namespace lldb_private;
3434
using namespace minidump;
3535

3636
ThreadMinidump::ThreadMinidump(Process &process, const minidump::Thread &td,
37-
llvm::ArrayRef<uint8_t> gpregset_data,
38-
std::optional<minidump::Exception> exception)
37+
llvm::ArrayRef<uint8_t> gpregset_data)
3938
: Thread(process, td.ThreadId), m_thread_reg_ctx_sp(),
40-
m_gpregset_data(gpregset_data), m_exception(exception) {}
39+
m_gpregset_data(gpregset_data) {}
4140

4241
ThreadMinidump::~ThreadMinidump() = default;
4342

@@ -116,15 +115,4 @@ ThreadMinidump::CreateRegisterContextForFrame(StackFrame *frame) {
116115
return reg_ctx_sp;
117116
}
118117

119-
// This method doesn't end up getting called for minidump
120-
// because the stopinfo is set in `ProcessMinidump::RefreshStateAfterStop`
121-
bool ThreadMinidump::CalculateStopInfo() {
122-
if (!m_exception)
123-
return false;
124-
125-
minidump::Exception thread_exception = m_exception.value();
126-
SetStopInfo(StopInfo::CreateStopReasonWithSignal(
127-
*this, thread_exception.ExceptionCode, /*description=*/nullptr,
128-
thread_exception.ExceptionCode));
129-
return true;
130-
}
118+
bool ThreadMinidump::CalculateStopInfo() { return false; }

lldb/source/Plugins/Process/minidump/ThreadMinidump.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ namespace minidump {
2121
class ThreadMinidump : public Thread {
2222
public:
2323
ThreadMinidump(Process &process, const minidump::Thread &td,
24-
llvm::ArrayRef<uint8_t> gpregset_data,
25-
std::optional<minidump::Exception> exception);
24+
llvm::ArrayRef<uint8_t> gpregset_data);
2625

2726
~ThreadMinidump() override;
2827

@@ -36,7 +35,6 @@ class ThreadMinidump : public Thread {
3635
protected:
3736
lldb::RegisterContextSP m_thread_reg_ctx_sp;
3837
llvm::ArrayRef<uint8_t> m_gpregset_data;
39-
std::optional<minidump::Exception> m_exception;
4038

4139
bool CalculateStopInfo() override;
4240
};

0 commit comments

Comments
 (0)