Allow scripted thread plans to modify the thread stop description when
they are completed.
This commit is contained in:
@@ -1743,7 +1743,7 @@ bool ScriptInterpreterPythonImpl::ScriptedThreadPlanIsStale(
|
||||
Locker py_lock(this,
|
||||
Locker::AcquireLock | Locker::InitSession | Locker::NoSTDIN);
|
||||
is_stale = LLDBSWIGPythonCallThreadPlan(generic->GetValue(), "is_stale",
|
||||
nullptr, script_error);
|
||||
(Event *) nullptr, script_error);
|
||||
if (script_error)
|
||||
return true;
|
||||
}
|
||||
@@ -1760,7 +1760,7 @@ lldb::StateType ScriptInterpreterPythonImpl::ScriptedThreadPlanGetRunState(
|
||||
Locker py_lock(this,
|
||||
Locker::AcquireLock | Locker::InitSession | Locker::NoSTDIN);
|
||||
should_step = LLDBSWIGPythonCallThreadPlan(
|
||||
generic->GetValue(), "should_step", nullptr, script_error);
|
||||
generic->GetValue(), "should_step", (Event *) nullptr, script_error);
|
||||
if (script_error)
|
||||
should_step = true;
|
||||
}
|
||||
@@ -1769,6 +1769,24 @@ lldb::StateType ScriptInterpreterPythonImpl::ScriptedThreadPlanGetRunState(
|
||||
return lldb::eStateRunning;
|
||||
}
|
||||
|
||||
bool
|
||||
ScriptInterpreterPythonImpl::ScriptedThreadPlanGetStopDescription(
|
||||
StructuredData::ObjectSP implementor_sp, lldb_private::Stream *stream,
|
||||
bool &script_error) {
|
||||
StructuredData::Generic *generic = nullptr;
|
||||
if (implementor_sp)
|
||||
generic = implementor_sp->GetAsGeneric();
|
||||
if (!generic) {
|
||||
script_error = true;
|
||||
return false;
|
||||
}
|
||||
Locker py_lock(this,
|
||||
Locker::AcquireLock | Locker::InitSession | Locker::NoSTDIN);
|
||||
return LLDBSWIGPythonCallThreadPlan(generic->GetValue(), "stop_description",
|
||||
stream, script_error);
|
||||
}
|
||||
|
||||
|
||||
StructuredData::GenericSP
|
||||
ScriptInterpreterPythonImpl::CreateScriptedBreakpointResolver(
|
||||
const char *class_name, const StructuredDataImpl &args_data,
|
||||
|
||||
Reference in New Issue
Block a user