/// The stop event corresponding to stop ID.
lldb::SBEvent GetStopEventForStopID(uint32_t stop_id);
- /// If the process is a scripted process, changes its private state.
- /// No-op otherwise.
- ///
- /// \param [in] new_state
- /// The new private state that the scripted process should be set to.
- ///
- void ForceScriptedState(StateType new_state);
-
size_t ReadMemory(addr_t addr, void *buf, size_t size, lldb::SBError &error);
size_t WriteMemory(addr_t addr, const void *buf, size_t size,
virtual void *GetImplementation() { return nullptr; }
- virtual void ForceScriptedState(lldb::StateType state) {}
-
protected:
friend class Trace;
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);
void *GetImplementation() override;
- void ForceScriptedState(lldb::StateType state) override {
- SetPrivateState(state);
- }
-
protected:
ScriptedProcess(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp,
const ScriptedMetadata &scripted_metadata, Status &error);