diff options
author | Mark Salyzyn <salyzyn@google.com> | 2014-01-28 13:51:46 -0800 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2014-01-28 13:51:46 -0800 |
commit | 8e4cdc1e8622f5c6ec1995f42b93489d58b982b9 (patch) | |
tree | 5a05b8db3d1a75f189efe71d535ff0b0bc03de4a /debuggerd | |
parent | 8ca9400c0a7a7ff30094a20d4dd72a17b1fbac3b (diff) | |
parent | 3a5f3050626c01c45ff487274a2399876d63a4eb (diff) | |
download | system_core-8e4cdc1e8622f5c6ec1995f42b93489d58b982b9.zip system_core-8e4cdc1e8622f5c6ec1995f42b93489d58b982b9.tar.gz system_core-8e4cdc1e8622f5c6ec1995f42b93489d58b982b9.tar.bz2 |
resolved conflicts for merge of 3a5f3050 to master
Change-Id: I87f51ba0dcc8187a3e620fab96c078e6614b28a2
Diffstat (limited to 'debuggerd')
-rw-r--r-- | debuggerd/tombstone.cpp | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/debuggerd/tombstone.cpp b/debuggerd/tombstone.cpp index d6e13ff..0f03ac8 100644 --- a/debuggerd/tombstone.cpp +++ b/debuggerd/tombstone.cpp @@ -486,7 +486,8 @@ static void dump_log_file( break; } } else if (actual == 0) { - _LOG(log, 0, "Got zero bytes while reading log: %s\n", strerror(errno)); + _LOG(log, 0, "Got zero bytes while reading log: %s\n", + strerror(errno)); break; } @@ -519,7 +520,7 @@ static void dump_log_file( // consume any trailing newlines char* nl = msg + strlen(msg) - 1; while (nl >= msg && *nl == '\n') { - *nl-- = '\0'; + *nl-- = '\0'; } char prioChar = (prio < strlen(kPrioChars) ? kPrioChars[prio] : '?'); @@ -534,16 +535,15 @@ static void dump_log_file( // Look for line breaks ('\n') and display each text line // on a separate line, prefixed with the header, like logcat does. do { - nl = strchr(msg, '\n'); - if (nl) { - *nl = '\0'; - ++nl; - } - - _LOG(log, 0, "%s.%03d %5d %5d %c %-8s: %s\n", - timeBuf, entry->nsec / 1000000, entry->pid, entry->tid, - prioChar, tag, msg); + nl = strchr(msg, '\n'); + if (nl) { + *nl = '\0'; + ++nl; + } + _LOG(log, 0, "%s.%03d %5d %5d %c %-8s: %s\n", + timeBuf, entry->nsec / 1000000, entry->pid, entry->tid, + prioChar, tag, msg); } while ((msg = nl)); } @@ -630,7 +630,6 @@ static bool dump_crash(log_t* log, pid_t pid, pid_t tid, int signal, uintptr_t a } if (want_logs) { - // Dump the last five lines of the logs for the given pid. dump_logs(log, pid, 5); } @@ -643,7 +642,6 @@ static bool dump_crash(log_t* log, pid_t pid, pid_t tid, int signal, uintptr_t a delete map; if (want_logs) { - // Dump the logs for the given pid. dump_logs(log, pid, 0); } |