mirror of
https://github.com/intel/llvm.git
synced 2026-01-13 19:08:21 +08:00
[lldb/API] Introduce SBProcess::ForceScriptedState method
This patch introduces a new method to the SBProcess API called ForceScriptedState. As the name suggests, this affordance will allow the user to alter the state of the scripted process programatically. This is necessary to update the scripted process state when perform interactive debugging. Differential Revision: https://reviews.llvm.org/D145294 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
This commit is contained in:
@@ -466,6 +466,16 @@ SBEvent SBProcess::GetStopEventForStopID(uint32_t stop_id) {
|
||||
return sb_event;
|
||||
}
|
||||
|
||||
void SBProcess::ForceScriptedState(StateType new_state) {
|
||||
LLDB_INSTRUMENT_VA(this, new_state);
|
||||
|
||||
if (ProcessSP process_sp = GetSP()) {
|
||||
std::lock_guard<std::recursive_mutex> guard(
|
||||
process_sp->GetTarget().GetAPIMutex());
|
||||
process_sp->ForceScriptedState(new_state);
|
||||
}
|
||||
}
|
||||
|
||||
StateType SBProcess::GetState() {
|
||||
LLDB_INSTRUMENT_VA(this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user