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

Unified Diff: base/debug/debugger_posix.cc

Issue 5423002: Help make base compile under NaCl... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/debugger_posix.cc
===================================================================
--- base/debug/debugger_posix.cc (revision 67731)
+++ base/debug/debugger_posix.cc (working copy)
@@ -3,13 +3,16 @@
// found in the LICENSE file.
#include "base/debug/debugger.h"
+#include "build/build_config.h"
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
+#if !defined(OS_NACL)
#include <sys/sysctl.h>
+#endif
#include <sys/types.h>
#include <unistd.h>
@@ -125,6 +128,13 @@
return pid_index < status.size() && status[pid_index] != '0';
}
+#elif defined(OS_NACL)
+
+bool BeingDebugged() {
+ NOTIMPLEMENTED();
+ return false;
+}
+
#elif defined(OS_FREEBSD)
bool DebugUtil::BeingDebugged() {
@@ -151,6 +161,10 @@
#if defined(NDEBUG) && !defined(OS_MACOSX)
#define DEBUG_BREAK() abort()
+#elif defined(OS_NACL)
+// The NaCl verifier doesn't let use use int3. For now, we call abort(). We
+// should ask for advice from some NaCl experts about the optimum thing here.
+#define DEBUG_BREAK() abort()
#elif defined(ARCH_CPU_ARM_FAMILY)
#define DEBUG_BREAK() asm("bkpt 0")
#else
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698