mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
More detailed message in case of libevent self-debugging failure.
This commit is contained in:
parent
5e42202d59
commit
9e6a4efa51
24
event.c
24
event.c
@ -239,8 +239,10 @@ HT_GENERATE(event_debug_map, event_debug_entry, node, hash_debug_entry,
|
||||
dent->added = 1; \
|
||||
} else { \
|
||||
event_errx(_EVENT_ERR_ABORT, \
|
||||
"%s: noting an add on a non-setup event %p", \
|
||||
__func__, (ev)); \
|
||||
"%s: noting an add on a non-setup event %p" \
|
||||
" (events: 0x%x, fd: %d, flags: 0x%x)", \
|
||||
__func__, (ev), (ev)->ev_events, \
|
||||
(ev)->ev_fd, (ev)->ev_flags); \
|
||||
} \
|
||||
EVLOCK_UNLOCK(_event_debug_map_lock, 0); \
|
||||
} \
|
||||
@ -257,8 +259,10 @@ HT_GENERATE(event_debug_map, event_debug_entry, node, hash_debug_entry,
|
||||
dent->added = 0; \
|
||||
} else { \
|
||||
event_errx(_EVENT_ERR_ABORT, \
|
||||
"%s: noting a del on a non-setup event %p", \
|
||||
__func__, (ev)); \
|
||||
"%s: noting a del on a non-setup event %p" \
|
||||
" (events: 0x%x, fd: %d, flags: 0x%x)", \
|
||||
__func__, (ev), (ev)->ev_events, \
|
||||
(ev)->ev_fd, (ev)->ev_flags); \
|
||||
} \
|
||||
EVLOCK_UNLOCK(_event_debug_map_lock, 0); \
|
||||
} \
|
||||
@ -273,8 +277,10 @@ HT_GENERATE(event_debug_map, event_debug_entry, node, hash_debug_entry,
|
||||
dent = HT_FIND(event_debug_map, &global_debug_map, &find); \
|
||||
if (!dent) { \
|
||||
event_errx(_EVENT_ERR_ABORT, \
|
||||
"%s called on a non-initialized event %p", \
|
||||
__func__, (ev)); \
|
||||
"%s called on a non-initialized event %p" \
|
||||
" (events: 0x%x, fd: %d, flags: 0x%x)", \
|
||||
__func__, (ev), (ev)->ev_events, \
|
||||
(ev)->ev_fd, (ev)->ev_flags); \
|
||||
} \
|
||||
EVLOCK_UNLOCK(_event_debug_map_lock, 0); \
|
||||
} \
|
||||
@ -289,8 +295,10 @@ HT_GENERATE(event_debug_map, event_debug_entry, node, hash_debug_entry,
|
||||
dent = HT_FIND(event_debug_map, &global_debug_map, &find); \
|
||||
if (dent && dent->added) { \
|
||||
event_errx(_EVENT_ERR_ABORT, \
|
||||
"%s called on an already added event %p", \
|
||||
__func__, (ev)); \
|
||||
"%s called on an already added event %p" \
|
||||
" (events: 0x%x, fd: %d, flags: 0x%x)", \
|
||||
__func__, (ev), (ev)->ev_events, \
|
||||
(ev)->ev_fd, (ev)->ev_flags); \
|
||||
} \
|
||||
EVLOCK_UNLOCK(_event_debug_map_lock, 0); \
|
||||
} \
|
||||
|
Loading…
x
Reference in New Issue
Block a user