Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lldb/include/lldb/Target/Process.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ class ProcessProperties : public Properties {
void SetStopOnSharedLibraryEvents(bool stop);
bool GetDisableLangRuntimeUnwindPlans() const;
void SetDisableLangRuntimeUnwindPlans(bool disable);
void DisableLanguageRuntimeUnwindPlansCallback();
bool GetDetachKeepsStopped() const;
void SetDetachKeepsStopped(bool keep_stopped);
bool GetWarningsOptimization() const;
Expand Down
12 changes: 12 additions & 0 deletions lldb/source/Target/Process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ ProcessProperties::ProcessProperties(lldb_private::Process *process)
m_collection_sp->SetValueChangedCallback(
ePropertyPythonOSPluginPath,
[this] { m_process->LoadOperatingSystemPlugin(true); });
m_collection_sp->SetValueChangedCallback(
ePropertyDisableLangRuntimeUnwindPlans,
[this] { DisableLanguageRuntimeUnwindPlansCallback(); });
}

m_experimental_properties_up =
Expand Down Expand Up @@ -280,6 +283,15 @@ void ProcessProperties::SetDisableLangRuntimeUnwindPlans(bool disable) {
m_process->Flush();
}

void ProcessProperties::DisableLanguageRuntimeUnwindPlansCallback() {
if (!m_process)
return;
for (auto thread_sp : m_process->Threads()) {
thread_sp->ClearStackFrames();
thread_sp->DiscardThreadPlans(/*force*/ true);
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(In case you're curious: the Threads() method ensures the threads mutex is acquired for the scope of the range object)


bool ProcessProperties::GetDetachKeepsStopped() const {
const uint32_t idx = ePropertyDetachKeepsStopped;
return GetPropertyAtIndexAs<bool>(
Expand Down
Loading