trace: Show eloop unregistered handler function name/file/line

This commit is contained in:
Jouni Malinen 2009-12-22 01:52:48 +02:00
parent 94caf8cd62
commit 5e5223bf29
3 changed files with 25 additions and 4 deletions

View File

@ -230,11 +230,14 @@ static void eloop_sock_table_destroy(struct eloop_sock_table *table)
for (i = 0; i < table->count && table->table; i++) {
wpa_printf(MSG_INFO, "ELOOP: remaining socket: "
"sock=%d eloop_data=%p user_data=%p "
"handler=%p\n",
"handler=%p",
table->table[i].sock,
table->table[i].eloop_data,
table->table[i].user_data,
table->table[i].handler);
wpa_trace_dump_funcname("eloop unregistered socket "
"handler",
table->table[i].handler);
wpa_trace_dump("eloop sock", &table->table[i]);
}
os_free(table->table);
@ -577,6 +580,8 @@ void eloop_destroy(void)
"eloop_data=%p user_data=%p handler=%p",
sec, usec, timeout->eloop_data, timeout->user_data,
timeout->handler);
wpa_trace_dump_funcname("eloop unregistered timeout handler",
timeout->handler);
wpa_trace_dump("eloop timeout", timeout);
dl_list_del(&timeout->list);
eloop_remove_timeout(timeout);

View File

@ -113,8 +113,6 @@ static void read_syms(bfd *abfd)
syms = NULL;
return;
}
wpa_printf(MSG_INFO, "BFD: Read %ld symbols (%ld bytes)",
symcount, storage);
}
@ -223,7 +221,6 @@ static void wpa_trace_bfd_init(void)
get_prg_fname();
if (!prg_fname)
return;
wpa_printf(MSG_INFO, "BFD[%s]", prg_fname);
}
if (!cached_abfd) {
@ -241,6 +238,14 @@ static void wpa_trace_bfd_init(void)
}
}
void wpa_trace_dump_funcname(const char *title, void *pc)
{
wpa_printf(MSG_INFO, "WPA_TRACE: %s: %p", title, pc);
wpa_trace_bfd_init();
wpa_trace_bfd_addr(pc);
}
#else /* WPA_TRACE_BFD */
#define wpa_trace_bfd_init() do { } while (0)

View File

@ -60,4 +60,15 @@ void wpa_trace_check_ref(const void *addr);
#endif /* WPA_TRACE */
#ifdef WPA_TRACE_BFD
void wpa_trace_dump_funcname(const char *title, void *pc);
#else /* WPA_TRACE_BFD */
#define wpa_trace_dump_funcname(title, pc) do { } while (0)
#endif /* WPA_TRACE_BFD */
#endif /* TRACE_H */