mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-04-06 15:00:40 +08:00
LDAP_THREAD_DEBUG revamping, cleanup, bug fixes.
Expand usage struct with magic numbers and state info. Add options "noreinit", "nosync", "nomem", "threadID". Remove "dupinit". Detect address changes. Turn off thread ID tracking by default.
This commit is contained in:
parent
3462baf8bc
commit
ca4a4456e8
@ -247,9 +247,25 @@ LDAP_BEGIN_DECL
|
||||
#define LDAP_UINTPTR_T unsigned long
|
||||
#endif
|
||||
|
||||
typedef union {
|
||||
unsigned char *ptr;
|
||||
LDAP_UINTPTR_T num;
|
||||
typedef enum {
|
||||
ldap_debug_magic = -(int) (((unsigned)-1)/19)
|
||||
} ldap_debug_magic_t;
|
||||
|
||||
typedef enum {
|
||||
/* Could fill in "locked" etc here later */
|
||||
ldap_debug_state_inited = (int) (((unsigned)-1)/11),
|
||||
ldap_debug_state_destroyed
|
||||
} ldap_debug_state_t;
|
||||
|
||||
typedef struct {
|
||||
/* Enclosed in magic numbers in the hope of catching overwrites */
|
||||
ldap_debug_magic_t magic; /* bit pattern to recognize usages */
|
||||
LDAP_UINTPTR_T self; /* ~(LDAP_UINTPTR_T)&(this struct) */
|
||||
union ldap_debug_mem_u { /* Dummy memory reference */
|
||||
unsigned char *ptr;
|
||||
LDAP_UINTPTR_T num;
|
||||
} mem;
|
||||
ldap_debug_state_t state; /* doubles as another magic number */
|
||||
} ldap_debug_usage_info_t;
|
||||
|
||||
typedef struct {
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user