Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c3706668 authored by Josh Gao's avatar Josh Gao
Browse files

libdebuggerd: cleanup.

Move libdebuggerd headers into their own directory for namespacing,
move some includes to the top of their implementing files, delete some
dead code.

Test: mma, treehugger
Change-Id: Ie4c44e32e2ab3bc678092899d257fd4ed634aa34
parent 287e8348
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -47,13 +47,14 @@
#define ATRACE_TAG ATRACE_TAG_BIONIC
#include <utils/Trace.h>

#include "backtrace.h"
#include "tombstone.h"
#include "utility.h"
#include "libdebuggerd/backtrace.h"
#include "libdebuggerd/tombstone.h"
#include "libdebuggerd/utility.h"

#include "debuggerd/handler.h"
#include "protocol.h"
#include "tombstoned/tombstoned.h"

#include "protocol.h"
#include "util.h"

using android::base::unique_fd;
+2 −2
Original line number Diff line number Diff line
@@ -45,8 +45,8 @@
#include "tombstoned/tombstoned.h"
#include "util.h"

#include "backtrace.h"
#include "tombstone.h"
#include "libdebuggerd/backtrace.h"
#include "libdebuggerd/tombstone.h"

using android::base::unique_fd;

+3 −2
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@

#define LOG_TAG "DEBUG"

#include "libdebuggerd/machine.h"

#include <errno.h>
#include <stdint.h>
#include <string.h>
@@ -25,8 +27,7 @@
#include <backtrace/Backtrace.h>
#include <log/log.h>

#include "machine.h"
#include "utility.h"
#include "libdebuggerd/utility.h"

void dump_memory_and_code(log_t* log, Backtrace* backtrace) {
  pt_regs regs;
+3 −2
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@

#define LOG_TAG "DEBUG"

#include "libdebuggerd/machine.h"

#include <elf.h>
#include <errno.h>
#include <stdint.h>
@@ -27,8 +29,7 @@
#include <backtrace/Backtrace.h>
#include <log/log.h>

#include "machine.h"
#include "utility.h"
#include "libdebuggerd/utility.h"

void dump_memory_and_code(log_t* log, Backtrace* backtrace) {
  struct user_pt_regs regs;
+3 −3
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

#define LOG_TAG "DEBUG"

#include "libdebuggerd/backtrace.h"

#include <errno.h>
#include <dirent.h>
#include <limits.h>
@@ -34,9 +36,7 @@
#include <backtrace/Backtrace.h>
#include <log/log.h>

#include "backtrace.h"

#include "utility.h"
#include "libdebuggerd/utility.h"

static void dump_process_header(log_t* log, pid_t pid, const char* process_name) {
  time_t t = time(NULL);
Loading