diff options
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
| -rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index 05c39f97fb5..00861951116 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -1671,99 +1671,6 @@ ProcessGDBRemote::DoHalt (bool &caused_stop) } Error -ProcessGDBRemote::InterruptIfRunning -( - bool discard_thread_plans, - bool catch_stop_event, - EventSP &stop_event_sp -) -{ - Error error; - - Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS)); - - bool paused_private_state_thread = false; - const bool is_running = m_gdb_comm.IsRunning(); - if (log) - log->Printf ("ProcessGDBRemote::InterruptIfRunning(discard_thread_plans=%i, catch_stop_event=%i) is_running=%i", - discard_thread_plans, - catch_stop_event, - is_running); - - if (discard_thread_plans) - { - if (log) - log->Printf ("ProcessGDBRemote::InterruptIfRunning() discarding all thread plans"); - m_thread_list.DiscardThreadPlans(); - } - if (is_running) - { - if (catch_stop_event) - { - if (log) - log->Printf ("ProcessGDBRemote::InterruptIfRunning() pausing private state thread"); - PausePrivateStateThread(); - paused_private_state_thread = true; - } - - bool timed_out = false; - Mutex::Locker locker; - - if (!m_gdb_comm.SendInterrupt (locker, 1, timed_out)) - { - if (timed_out) - error.SetErrorString("timed out sending interrupt packet"); - else - error.SetErrorString("unknown error sending interrupt packet"); - if (paused_private_state_thread) - ResumePrivateStateThread(); - return error; - } - - if (catch_stop_event) - { - // LISTEN HERE - TimeValue timeout_time; - timeout_time = TimeValue::Now(); - timeout_time.OffsetWithSeconds(5); - StateType state = WaitForStateChangedEventsPrivate (&timeout_time, stop_event_sp); - - timed_out = state == eStateInvalid; - if (log) - log->Printf ("ProcessGDBRemote::InterruptIfRunning() catch stop event: state = %s, timed-out=%i", StateAsCString(state), timed_out); - - if (timed_out) - error.SetErrorString("unable to verify target stopped"); - } - - if (paused_private_state_thread) - { - if (log) - log->Printf ("ProcessGDBRemote::InterruptIfRunning() resuming private state thread"); - ResumePrivateStateThread(); - } - } - return error; -} - -Error -ProcessGDBRemote::WillDetach () -{ - Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS)); - if (log) - log->Printf ("ProcessGDBRemote::WillDetach()"); - - bool discard_thread_plans = true; - bool catch_stop_event = true; - EventSP event_sp; - - // FIXME: InterruptIfRunning should be done in the Process base class, or better still make Halt do what is - // needed. This shouldn't be a feature of a particular plugin. - - return InterruptIfRunning (discard_thread_plans, catch_stop_event, event_sp); -} - -Error ProcessGDBRemote::DoDetach() { Error error; |

