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

Commit 41a0654e authored by Christopher Ferris's avatar Christopher Ferris Committed by Gerrit Code Review
Browse files

Merge "Replace all _LOG error calls with ALOGE."

parents c9aeae27 b36b5923
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -77,12 +77,12 @@ include $(BUILD_EXECUTABLE)

debuggerd_test_src_files := \
    utility.cpp \
    test/dump_maps_test.cpp \
    test/dump_memory_test.cpp \
    test/elf_fake.cpp \
    test/log_fake.cpp \
    test/property_fake.cpp \
    test/ptrace_fake.cpp \
    test/tombstone_test.cpp \
    test/selinux_fake.cpp \

debuggerd_shared_libraries := \
+6 −3
Original line number Diff line number Diff line
@@ -15,12 +15,15 @@
 * limitations under the License.
 */

#define LOG_TAG "DEBUG"

#include <errno.h>
#include <stdint.h>
#include <string.h>
#include <sys/ptrace.h>

#include <backtrace/Backtrace.h>
#include <log/log.h>

#include "machine.h"
#include "utility.h"
@@ -28,7 +31,7 @@
void dump_memory_and_code(log_t* log, Backtrace* backtrace) {
  pt_regs regs;
  if (ptrace(PTRACE_GETREGS, backtrace->Tid(), 0, &regs)) {
    _LOG(log, logtype::ERROR, "cannot get registers: %s\n", strerror(errno));
    ALOGE("cannot get registers: %s\n", strerror(errno));
    return;
  }

@@ -48,7 +51,7 @@ void dump_memory_and_code(log_t* log, Backtrace* backtrace) {
void dump_registers(log_t* log, pid_t tid) {
  pt_regs r;
  if (ptrace(PTRACE_GETREGS, tid, 0, &r)) {
    _LOG(log, logtype::ERROR, "cannot get registers: %s\n", strerror(errno));
    ALOGE("cannot get registers: %s\n", strerror(errno));
    return;
  }

@@ -68,7 +71,7 @@ void dump_registers(log_t* log, pid_t tid) {

  user_vfp vfp_regs;
  if (ptrace(PTRACE_GETVFPREGS, tid, 0, &vfp_regs)) {
    _LOG(log, logtype::ERROR, "cannot get FP registers: %s\n", strerror(errno));
    ALOGE("cannot get FP registers: %s\n", strerror(errno));
    return;
  }

+6 −4
Original line number Diff line number Diff line
@@ -15,6 +15,8 @@
 * limitations under the License.
 */

#define LOG_TAG "DEBUG"

#include <elf.h>
#include <errno.h>
#include <stdint.h>
@@ -23,6 +25,7 @@
#include <sys/uio.h>

#include <backtrace/Backtrace.h>
#include <log/log.h>

#include "machine.h"
#include "utility.h"
@@ -34,8 +37,7 @@ void dump_memory_and_code(log_t* log, Backtrace* backtrace) {
  io.iov_len = sizeof(regs);

  if (ptrace(PTRACE_GETREGSET, backtrace->Tid(), reinterpret_cast<void*>(NT_PRSTATUS), &io) == -1) {
    _LOG(log, logtype::ERROR, "%s: ptrace failed to get registers: %s",
         __func__, strerror(errno));
    ALOGE("ptrace failed to get registers: %s", strerror(errno));
    return;
  }

@@ -57,7 +59,7 @@ void dump_registers(log_t* log, pid_t tid) {
  io.iov_len = sizeof(r);

  if (ptrace(PTRACE_GETREGSET, tid, (void*) NT_PRSTATUS, (void*) &io) == -1) {
    _LOG(log, logtype::ERROR, "ptrace error: %s\n", strerror(errno));
    ALOGE("ptrace error: %s\n", strerror(errno));
    return;
  }

@@ -81,7 +83,7 @@ void dump_registers(log_t* log, pid_t tid) {
  io.iov_len = sizeof(f);

  if (ptrace(PTRACE_GETREGSET, tid, (void*) NT_PRFPREG, (void*) &io) == -1) {
    _LOG(log, logtype::ERROR, "ptrace error: %s\n", strerror(errno));
    ALOGE("ptrace error: %s\n", strerror(errno));
    return;
  }

+1 −1
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@ static void dump_thread(
  }

  if (!attached && ptrace(PTRACE_DETACH, tid, 0, 0) != 0) {
    _LOG(log, logtype::ERROR, "ptrace detach from %d failed: %s\n", tid, strerror(errno));
    ALOGE("ptrace detach from %d failed: %s\n", tid, strerror(errno));
    *detach_failed = true;
  }
}
+5 −2
Original line number Diff line number Diff line
@@ -14,6 +14,8 @@
 * limitations under the License.
 */

#define LOG_TAG "DEBUG"

#include <errno.h>
#include <inttypes.h>
#include <stdint.h>
@@ -21,6 +23,7 @@
#include <sys/ptrace.h>

#include <backtrace/Backtrace.h>
#include <log/log.h>

#include "machine.h"
#include "utility.h"
@@ -32,7 +35,7 @@
void dump_memory_and_code(log_t* log, Backtrace* backtrace) {
  pt_regs r;
  if (ptrace(PTRACE_GETREGS, backtrace->Tid(), 0, &r)) {
    _LOG(log, logtype::ERROR, "cannot get registers: %s\n", strerror(errno));
    ALOGE("cannot get registers: %s\n", strerror(errno));
    return;
  }

@@ -61,7 +64,7 @@ void dump_memory_and_code(log_t* log, Backtrace* backtrace) {
void dump_registers(log_t* log, pid_t tid) {
  pt_regs r;
  if(ptrace(PTRACE_GETREGS, tid, 0, &r)) {
    _LOG(log, logtype::ERROR, "cannot get registers: %s\n", strerror(errno));
    ALOGE("cannot get registers: %s\n", strerror(errno));
    return;
  }

Loading