Suspend/resume working.
This commit is contained in:
@@ -63,12 +63,12 @@ int Debugger::ResumeThread(uint32_t thread_id) {
|
||||
return result;
|
||||
}
|
||||
|
||||
int Debugger::ResumeAllThreads() {
|
||||
int Debugger::ResumeAllThreads(bool force) {
|
||||
int result = 0;
|
||||
LockMutex(threads_lock_);
|
||||
for (auto it = threads_.begin(); it != threads_.end(); ++it) {
|
||||
ThreadState* thread_state = it->second;
|
||||
if (thread_state->Resume()) {
|
||||
if (thread_state->Resume(force)) {
|
||||
result = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
|
||||
int SuspendAllThreads(uint32_t timeout_ms = UINT_MAX);
|
||||
int ResumeThread(uint32_t thread_id);
|
||||
int ResumeAllThreads();
|
||||
int ResumeAllThreads(bool force = false);
|
||||
|
||||
int AddBreakpoint(Breakpoint* breakpoint);
|
||||
int RemoveBreakpoint(Breakpoint* breakpoint);
|
||||
|
||||
@@ -32,8 +32,10 @@ public:
|
||||
void* backend_data() const { return backend_data_; }
|
||||
void* raw_context() const { return raw_context_; }
|
||||
|
||||
virtual volatile int* suspend_flag_address() const = 0;
|
||||
virtual int Suspend(uint32_t timeout_ms = UINT_MAX) = 0;
|
||||
virtual int Resume() = 0;
|
||||
virtual int Resume(bool force = false) = 0;
|
||||
virtual void EnterSuspend() = 0;
|
||||
|
||||
static void Bind(ThreadState* thread_state);
|
||||
static ThreadState* Get();
|
||||
|
||||
Reference in New Issue
Block a user