diff options
author | Leo Wang <leozwang@google.com> | 2014-08-15 02:47:57 +0000 |
---|---|---|
committer | Leo Wang <leozwang@google.com> | 2014-08-15 02:47:57 +0000 |
commit | 2a0c93a8dd114af34b19fb45bc0fafd1cd4f52c5 (patch) | |
tree | 60ce37ef352a7f8ed67ae1a3b78a8911e31d23c1 /adb | |
parent | 8693bc7abd39f9dcd4b73bdd43054de450a45a03 (diff) | |
download | system_core-2a0c93a8dd114af34b19fb45bc0fafd1cd4f52c5.zip system_core-2a0c93a8dd114af34b19fb45bc0fafd1cd4f52c5.tar.gz system_core-2a0c93a8dd114af34b19fb45bc0fafd1cd4f52c5.tar.bz2 |
Revert "Add more debug information."
This reverts commit 8693bc7abd39f9dcd4b73bdd43054de450a45a03.
Change-Id: I7e6df6c155d9a7544c860b21bcb31c4e04d122e7
Diffstat (limited to 'adb')
-rw-r--r-- | adb/adb.h | 3 | ||||
-rw-r--r-- | adb/adb_client.c | 2 | ||||
-rw-r--r-- | adb/adb_trace.h | 24 | ||||
-rw-r--r-- | adb/fdevent.c | 2 | ||||
-rw-r--r-- | adb/jdwp_service.c | 1 | ||||
-rw-r--r-- | adb/services.c | 4 | ||||
-rw-r--r-- | adb/transport.c | 4 |
7 files changed, 14 insertions, 26 deletions
@@ -338,9 +338,6 @@ void put_apacket(apacket *p); int check_header(apacket *p); int check_data(apacket *p); -// Define it if you want to dump packets. -#define DEBUG_PACKETS 0 - #if !DEBUG_PACKETS #define print_packet(tag,p) do {} while (0) #endif diff --git a/adb/adb_client.c b/adb/adb_client.c index ac5e15a..eb1720d 100644 --- a/adb/adb_client.c +++ b/adb/adb_client.c @@ -279,7 +279,7 @@ int adb_connect(const char *service) fd = _adb_connect(service); if(fd == -1) { - D("_adb_connect error: %s", __adb_error); + D("_adb_connect error: %s\n", __adb_error); } else if(fd == -2) { fprintf(stderr,"** daemon still not running\n"); } diff --git a/adb/adb_trace.h b/adb/adb_trace.h index 6a429b9..8a5d9f8 100644 --- a/adb/adb_trace.h +++ b/adb/adb_trace.h @@ -73,9 +73,8 @@ void adb_trace_init(void); if (ADB_TRACING) { \ int save_errno = errno; \ adb_mutex_lock(&D_lock); \ - fprintf(stderr, "%16s: %5d:%5lu | ", \ - __FUNCTION__, \ - getpid(), pthread_self()); \ + fprintf(stderr, "%s::%s():", \ + __FILE__, __FUNCTION__); \ errno = save_errno; \ fprintf(stderr, __VA_ARGS__ ); \ fflush(stderr); \ @@ -97,16 +96,15 @@ void adb_trace_init(void); } while (0) # define DD(...) \ do { \ - int save_errno = errno; \ - adb_mutex_lock(&D_lock); \ - fprintf(stderr, "%16s: %5d:%5lu | ", \ - __FUNCTION__, \ - getpid(), pthread_self()); \ - 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, "%s::%s():", \ + __FILE__, __FUNCTION__); \ + errno = save_errno; \ + fprintf(stderr, __VA_ARGS__ ); \ + fflush(stderr); \ + adb_mutex_unlock(&D_lock); \ + errno = save_errno; \ } while (0) #else # define D(...) \ diff --git a/adb/fdevent.c b/adb/fdevent.c index f5ecd14..43e600c 100644 --- a/adb/fdevent.c +++ b/adb/fdevent.c @@ -661,8 +661,6 @@ void fdevent_subproc_setup() if(adb_socketpair(s)) { FATAL("cannot create shell-exit socket-pair\n"); } - D("socketpair: (%d,%d)", s[0], s[1]); - SHELL_EXIT_NOTIFY_FD = s[0]; fdevent *fde; fde = fdevent_create(s[1], fdevent_subproc_event_func, NULL); diff --git a/adb/jdwp_service.c b/adb/jdwp_service.c index 3074e42..cd62b55 100644 --- a/adb/jdwp_service.c +++ b/adb/jdwp_service.c @@ -415,7 +415,6 @@ FoundIt: __FUNCTION__, strerror(errno)); return -1; } - D("socketpair: (%d,%d)", fds[0], fds[1]); proc->out_fds[ proc->out_count ] = fds[1]; if (++proc->out_count == 1) diff --git a/adb/services.c b/adb/services.c index bf2f2c3..e61371a 100644 --- a/adb/services.c +++ b/adb/services.c @@ -164,7 +164,6 @@ static int create_service_thread(void (*func)(int, void *), void *cookie) printf("cannot create service socket pair\n"); return -1; } - D("socketpair: (%d,%d)", s[0], s[1]); sti = malloc(sizeof(stinfo)); if(sti == 0) fatal("cannot allocate stinfo"); @@ -265,11 +264,10 @@ static int create_subproc_raw(const char *cmd, const char *arg0, const char *arg // 0 is parent socket, 1 is child socket int sv[2]; - if (adb_socketpair(sv) < 0) { + if (unix_socketpair(AF_UNIX, SOCK_STREAM, 0, sv) < 0) { printf("[ cannot create socket pair - %s ]\n", strerror(errno)); return -1; } - D("socketpair: (%d,%d)", sv[0], sv[1]); *pid = fork(); if (*pid < 0) { diff --git a/adb/transport.c b/adb/transport.c index 4702df2..f35880c 100644 --- a/adb/transport.c +++ b/adb/transport.c @@ -629,7 +629,7 @@ static void transport_registration_func(int _fd, unsigned ev, void *data) fatal_errno("cannot open transport socketpair"); } - D("transport: %s socketpair: (%d,%d) starting", t->serial, s[0], s[1]); + D("transport: %s (%d,%d) starting\n", t->serial, s[0], s[1]); t->transport_socket = s[0]; t->fd = s[1]; @@ -674,8 +674,6 @@ void init_transport_registration(void) fatal_errno("cannot open transport registration socketpair"); } - D("socketpair: (%d,%d)", s[0], s[1]); - transport_registration_send = s[0]; transport_registration_recv = s[1]; |