summaryrefslogtreecommitdiffstats
path: root/chromium/base/debug/debugger_posix.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/base/debug/debugger_posix.cc')
-rw-r--r--chromium/base/debug/debugger_posix.cc22
1 files changed, 3 insertions, 19 deletions
diff --git a/chromium/base/debug/debugger_posix.cc b/chromium/base/debug/debugger_posix.cc
index 60ad5218308..48393f4f415 100644
--- a/chromium/base/debug/debugger_posix.cc
+++ b/chromium/base/debug/debugger_posix.cc
@@ -14,7 +14,6 @@
#include <sys/types.h>
#include <unistd.h>
-#include <string>
#include <vector>
#if defined(__GLIBCXX__)
@@ -41,7 +40,6 @@
#include "base/posix/eintr_wrapper.h"
#include "base/safe_strerror_posix.h"
#include "base/strings/string_piece.h"
-#include "base/strings/stringprintf.h"
#if defined(USE_SYMBOLIZE)
#include "base/third_party/symbolize/symbolize.h"
@@ -54,22 +52,6 @@
namespace base {
namespace debug {
-bool SpawnDebuggerOnProcess(unsigned process_id) {
-#if OS_ANDROID || OS_NACL
- NOTIMPLEMENTED();
- return false;
-#else
- const std::string debug_cmd =
- StringPrintf("xterm -e 'gdb --pid=%u' &", process_id);
- LOG(WARNING) << "Starting debugger on pid " << process_id
- << " with command `" << debug_cmd << "`";
- int ret = system(debug_cmd.c_str());
- if (ret == -1)
- return false;
- return true;
-#endif
-}
-
#if defined(OS_MACOSX) || defined(OS_BSD)
// Based on Apple's recommended method as described in
@@ -199,8 +181,10 @@ bool BeingDebugged() {
// SIGABRT
// Mac: Always send SIGTRAP.
-#if defined(ARCH_CPU_ARM_FAMILY)
+#if defined(ARCH_CPU_ARMEL)
#define DEBUG_BREAK_ASM() asm("bkpt 0")
+#elif defined(ARCH_CPU_ARM64)
+#define DEBUG_BREAK_ASM() asm("brk 0")
#elif defined(ARCH_CPU_MIPS_FAMILY)
#define DEBUG_BREAK_ASM() asm("break 2")
#elif defined(ARCH_CPU_X86_FAMILY)