Replace all _LOG error calls with ALOGE.
The debuggerd code sometimes calls _LOG(..., logtype::ERROR, ...)
and sometimes ALOGE(). Standardize on ALOGE since the _LOG message
will wind up in the tombstone in weird places, but using ALOGE
will wind up in the logcat portion of the tombstone.
Bug: 21467089
Change-Id: Ie893f5e91d45b48ef3f5864c3a714e60ac848fb3
diff --git a/debuggerd/arm64/machine.cpp b/debuggerd/arm64/machine.cpp
index 2e097da..e7bf79a 100644
--- a/debuggerd/arm64/machine.cpp
+++ b/debuggerd/arm64/machine.cpp
@@ -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 @@
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 @@
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 @@
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;
}