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

Unified Diff: src/trusted/debug_stub/nacl_debug.cc

Issue 10365028: Debug stub: associate NaClAppThread with IThread (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: src/trusted/debug_stub/nacl_debug.cc
diff --git a/src/trusted/debug_stub/nacl_debug.cc b/src/trusted/debug_stub/nacl_debug.cc
index 648749d306b7777dbc03d803ad72665386be676f..9717635daeec3b5c4b06b68d455914e0e4004320 100644
--- a/src/trusted/debug_stub/nacl_debug.cc
+++ b/src/trusted/debug_stub/nacl_debug.cc
@@ -180,14 +180,9 @@ void NaClDebugThreadPrepDebugging(struct NaClAppThread *natp) throw() {
if (NaClDebugIsEnabled()) {
uint32_t id = IPlatform::GetCurrentThread();
- IThread* thread = IThread::Acquire(id, true);
+ IThread* thread = IThread::Create(id, natp);
g_nacl_debug_state->target_->SetMemoryBase(natp->nap->mem_start);
g_nacl_debug_state->target_->TrackThread(thread);
-
- /*
- * TODO(noelallen) We need to associate the natp with this thread
- * so we can get to the untrusted context preserved on a syscall.
- */
}
}
@@ -196,15 +191,9 @@ void NaClDebugThreadStopDebugging(struct NaClAppThread *natp) throw() {
if (NaClDebugIsEnabled()) {
uint32_t id = IPlatform::GetCurrentThread();
- IThread* thread = IThread::Acquire(id, false);
+ IThread* thread = IThread::Acquire(id);
g_nacl_debug_state->target_->IgnoreThread(thread);
IThread::Release(thread);
-
- /*
- * TODO(noelallen) We need to associate the natp with this thread
- * so we can get to the thread once we support freeing a thread
- * from a different thread than the executing one.
- */
}
}
« no previous file with comments | « no previous file | src/trusted/debug_stub/posix/thread_impl.cc » ('j') | src/trusted/debug_stub/posix/thread_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698