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

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

Issue 6525058: Reverting: Several changes to fix debug_stub:... (issue6489005)... (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 9 years, 10 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
« no previous file with comments | « src/trusted/service_runtime/nacl_all_modules.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/service_runtime/nacl_debug.cc
===================================================================
--- src/trusted/service_runtime/nacl_debug.cc (revision 4321)
+++ src/trusted/service_runtime/nacl_debug.cc (working copy)
@@ -26,7 +26,7 @@
#include "native_client/src/trusted/service_runtime/sel_ldr.h"
/* To enable debuggging */
-// #define NACL_DEBUG_STUB 1
+/* #define NACL_DEBUG_STUB 1 */
using port::IPlatform;
using port::IThread;
@@ -176,7 +176,7 @@
Target* targ = static_cast<Target*>(cookie);
/* Signal the target that we caught something */
- IPlatform::LogWarning("<huh-b-4> Caught signal %d on thread %Xh.\n", sig, id);
+ IPlatform::LogWarning("Caught signal %d on thread %Xh.\n", sig, id);
targ->Signal(id, sig, true);
#else
UNREFERENCED_PARAMETER(id);
@@ -240,7 +240,6 @@
NaClDebugState *state = NaClDebugGetState();
uint32_t id = IPlatform::GetCurrentThread();
IThread* thread = IThread::Acquire(id, true);
- state->target_->SetMemoryBase(natp->nap->mem_start);
state->target_->TrackThread(thread);
/*
@@ -280,9 +279,11 @@
if (NULL == thread) return false;
NaClDebugState *state = NaClDebugGetState();
- /* Add a temp breakpoint. */
- struct NaClApp* app = state->app_;
- state->target_->AddTemporaryBreakpoint(app->entry_pt + app->mem_start);
+ /* If break on start has been requested, add a temp breakpoint. */
+ if (state->break_) {
+ struct NaClApp* app = state->app_;
+ state->target_->AddTemporaryBreakpoint(app->entry_pt + app->mem_start);
+ }
NaClLog(LOG_WARNING, "nacl_debug(%d) : Debugging started.\n", __LINE__);
IThread::SetExceptionCatch(NaClExceptionCatcher, state->target_);
« no previous file with comments | « src/trusted/service_runtime/nacl_all_modules.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698