diff options
author | leozwang <leozwang@google.com> | 2014-08-15 09:51:27 -0700 |
---|---|---|
committer | Leo Wang <leozwang@google.com> | 2014-08-22 16:11:58 +0000 |
commit | adb09fa01a16d8c5c92c2f8d325e1678c531223f (patch) | |
tree | 000b627a588bba1b23020eca9560956078a4da6a /adb/adb_trace.h | |
parent | 541a7d796aae220e631d2416e4aab4d31293219f (diff) | |
download | system_core-adb09fa01a16d8c5c92c2f8d325e1678c531223f.zip system_core-adb09fa01a16d8c5c92c2f8d325e1678c531223f.tar.gz system_core-adb09fa01a16d8c5c92c2f8d325e1678c531223f.tar.bz2 |
Add more debug information.
Re-commit https://googleplex-android-review.googlesource.com/#/c/519430/
Add fix for win_sdk build.
Add socketpair debug log.
Also output thread information in log on host side.
Change-Id: I21021bc111a3f7362a91b70593e3738125878118
Diffstat (limited to 'adb/adb_trace.h')
-rw-r--r-- | adb/adb_trace.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/adb/adb_trace.h b/adb/adb_trace.h index 8a5d9f8..b8a2f4c 100644 --- a/adb/adb_trace.h +++ b/adb/adb_trace.h @@ -73,8 +73,9 @@ void adb_trace_init(void); if (ADB_TRACING) { \ int save_errno = errno; \ adb_mutex_lock(&D_lock); \ - fprintf(stderr, "%s::%s():", \ - __FILE__, __FUNCTION__); \ + fprintf(stderr, "%16s: %5d:%5lu | ", \ + __FUNCTION__, \ + getpid(), adb_thread_id()); \ errno = save_errno; \ fprintf(stderr, __VA_ARGS__ ); \ fflush(stderr); \ @@ -96,15 +97,16 @@ void adb_trace_init(void); } while (0) # define DD(...) \ do { \ - int save_errno = errno; \ - adb_mutex_lock(&D_lock); \ - fprintf(stderr, "%s::%s():", \ - __FILE__, __FUNCTION__); \ - errno = save_errno; \ - fprintf(stderr, __VA_ARGS__ ); \ - fflush(stderr); \ - adb_mutex_unlock(&D_lock); \ - errno = save_errno; \ + int save_errno = errno; \ + adb_mutex_lock(&D_lock); \ + fprintf(stderr, "%16s: %5d:%5lu | ", \ + __FUNCTION__, \ + getpid(), adb_thread_id()); \ + errno = save_errno; \ + fprintf(stderr, __VA_ARGS__ ); \ + fflush(stderr); \ + adb_mutex_unlock(&D_lock); \ + errno = save_errno; \ } while (0) #else # define D(...) \ |