Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: experimental/linux_debug_server/debugger/core/debuggee_thread.cc

Issue 10928195: First round of dead file removal (Closed) Base URL: https://github.com/samclegg/nativeclient-sdk.git@master
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Native Client Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 #include "debugger/core/debuggee_thread.h"
5 #include "debugger/core/debug_api.h"
6 #include <signal.h>
7
8 namespace debug {
9 DebuggeeThread::DebuggeeThread(int id, DebugAPI* debug_api)
10 : id_(id),
11 state_(RUNNING),
12 debug_api_(debug_api) {
13 }
14
15 DebugAPI& DebuggeeThread::debug_api() {
16 return *debug_api_;
17 }
18
19 bool DebuggeeThread::Continue() {
20 if (RUNNING == state_)
21 return false;
22
23 int signal_to_pass = last_debug_event_.signal_no_;
24 if (SIGTRAP == signal_to_pass) // TODO: shall we pass 0 for SIGSTOP too?
25 signal_to_pass = 0;
26
27 bool res = debug_api().ContinueDebugEvent(id_, signal_to_pass);
28 if (res)
29 state_ = RUNNING;
30 return res;
31 }
32
33 void DebuggeeThread::OnDebugEvent(const DebugEvent& debug_event) {
34 last_debug_event_ = debug_event;
35 state_ = debug_event.process_state_;
36 }
37
38 } // namespace debug
39
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698