Loading debuggerd/utility.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,8 @@ bool is_allowed_in_logcat(enum logtype ltype) { void _LOG(log_t* log, enum logtype ltype, const char* fmt, ...) { bool write_to_tombstone = (log->tfd != -1); bool write_to_logcat = is_allowed_in_logcat(ltype) && log->crashed_tid != -1 && log->current_tid != -1 && (log->crashed_tid == log->current_tid); bool write_to_activitymanager = (log->amfd != -1); Loading debuggerd/utility.h +5 −2 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ #endif typedef struct { struct log_t{ /* tombstone file descriptor */ int tfd; /* Activity Manager socket file descriptor */ Loading @@ -46,7 +46,10 @@ typedef struct { pid_t crashed_tid; // The tid of the thread we are currently working with. pid_t current_tid; } log_t; log_t() : tfd(-1), amfd(-1), crashed_tid(-1), current_tid(-1) {} }; // List of types of logs to simplify the logging decision in _LOG enum logtype { Loading Loading
debuggerd/utility.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,8 @@ bool is_allowed_in_logcat(enum logtype ltype) { void _LOG(log_t* log, enum logtype ltype, const char* fmt, ...) { bool write_to_tombstone = (log->tfd != -1); bool write_to_logcat = is_allowed_in_logcat(ltype) && log->crashed_tid != -1 && log->current_tid != -1 && (log->crashed_tid == log->current_tid); bool write_to_activitymanager = (log->amfd != -1); Loading
debuggerd/utility.h +5 −2 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ #endif typedef struct { struct log_t{ /* tombstone file descriptor */ int tfd; /* Activity Manager socket file descriptor */ Loading @@ -46,7 +46,10 @@ typedef struct { pid_t crashed_tid; // The tid of the thread we are currently working with. pid_t current_tid; } log_t; log_t() : tfd(-1), amfd(-1), crashed_tid(-1), current_tid(-1) {} }; // List of types of logs to simplify the logging decision in _LOG enum logtype { Loading