Enhance granularity on what I want to debug for the moment by changing
LEVITTE_DEBUG to LEVITTE_DEBUG_MEM.
This commit is contained in:
parent
f6a8898fc3
commit
3d6001f7b9
1 changed files with 11 additions and 11 deletions
|
@ -266,7 +266,7 @@ static APP_INFO *pop_info()
|
||||||
next->references++;
|
next->references++;
|
||||||
lh_insert(amih,(char *)next);
|
lh_insert(amih,(char *)next);
|
||||||
}
|
}
|
||||||
#ifdef LEVITTE_DEBUG
|
#ifdef LEVITTE_DEBUG_MEM
|
||||||
if (ret->thread != tmp.thread)
|
if (ret->thread != tmp.thread)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "pop_info(): deleted info has other thread ID (%lu) than the current thread (%lu)!!!!\n",
|
fprintf(stderr, "pop_info(): deleted info has other thread ID (%lu) than the current thread (%lu)!!!!\n",
|
||||||
|
@ -319,7 +319,7 @@ int CRYPTO_push_info_(const char *info, const char *file, int line)
|
||||||
|
|
||||||
if ((amim=(APP_INFO *)lh_insert(amih,(char *)ami)) != NULL)
|
if ((amim=(APP_INFO *)lh_insert(amih,(char *)ami)) != NULL)
|
||||||
{
|
{
|
||||||
#ifdef LEVITTE_DEBUG
|
#ifdef LEVITTE_DEBUG_MEM
|
||||||
if (ami->thread != amim->thread)
|
if (ami->thread != amim->thread)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "CRYPTO_push_info(): previous info has other thread ID (%lu) than the current thread (%lu)!!!!\n",
|
fprintf(stderr, "CRYPTO_push_info(): previous info has other thread ID (%lu) than the current thread (%lu)!!!!\n",
|
||||||
|
@ -418,8 +418,8 @@ void CRYPTO_dbg_malloc(void *addr, int num, const char *file, int line,
|
||||||
m->order=order;
|
m->order=order;
|
||||||
}
|
}
|
||||||
m->order=order++;
|
m->order=order++;
|
||||||
#ifdef LEVITTE_DEBUG
|
#ifdef LEVITTE_DEBUG_MEM
|
||||||
fprintf(stderr, "LEVITTE_DEBUG: [%5d] %c 0x%p (%d)\n",
|
fprintf(stderr, "LEVITTE_DEBUG_MEM: [%5d] %c 0x%p (%d)\n",
|
||||||
m->order,
|
m->order,
|
||||||
(before_p & 128) ? '*' : '+',
|
(before_p & 128) ? '*' : '+',
|
||||||
m->addr, m->num);
|
m->addr, m->num);
|
||||||
|
@ -473,8 +473,8 @@ void CRYPTO_dbg_free(void *addr, int before_p)
|
||||||
mp=(MEM *)lh_delete(mh,(char *)&m);
|
mp=(MEM *)lh_delete(mh,(char *)&m);
|
||||||
if (mp != NULL)
|
if (mp != NULL)
|
||||||
{
|
{
|
||||||
#ifdef LEVITTE_DEBUG
|
#ifdef LEVITTE_DEBUG_MEM
|
||||||
fprintf(stderr, "LEVITTE_DEBUG: [%5d] - 0x%p (%d)\n",
|
fprintf(stderr, "LEVITTE_DEBUG_MEM: [%5d] - 0x%p (%d)\n",
|
||||||
mp->order, mp->addr, mp->num);
|
mp->order, mp->addr, mp->num);
|
||||||
#endif
|
#endif
|
||||||
if (mp->app_info != NULL)
|
if (mp->app_info != NULL)
|
||||||
|
@ -497,8 +497,8 @@ void CRYPTO_dbg_realloc(void *addr1, void *addr2, int num,
|
||||||
{
|
{
|
||||||
MEM m,*mp;
|
MEM m,*mp;
|
||||||
|
|
||||||
#ifdef LEVITTE_DEBUG
|
#ifdef LEVITTE_DEBUG_MEM
|
||||||
fprintf(stderr, "LEVITTE_DEBUG: --> CRYPTO_dbg_malloc(addr1 = %p, addr2 = %p, num = %d, file = \"%s\", line = %d, before_p = %d)\n",
|
fprintf(stderr, "LEVITTE_DEBUG_MEM: --> CRYPTO_dbg_malloc(addr1 = %p, addr2 = %p, num = %d, file = \"%s\", line = %d, before_p = %d)\n",
|
||||||
addr1, addr2, num, file, line, before_p);
|
addr1, addr2, num, file, line, before_p);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -524,8 +524,8 @@ void CRYPTO_dbg_realloc(void *addr1, void *addr2, int num,
|
||||||
mp=(MEM *)lh_delete(mh,(char *)&m);
|
mp=(MEM *)lh_delete(mh,(char *)&m);
|
||||||
if (mp != NULL)
|
if (mp != NULL)
|
||||||
{
|
{
|
||||||
#ifdef LEVITTE_DEBUG
|
#ifdef LEVITTE_DEBUG_MEM
|
||||||
fprintf(stderr, "LEVITTE_DEBUG: [%5d] * 0x%p (%d) -> 0x%p (%d)\n",
|
fprintf(stderr, "LEVITTE_DEBUG_MEM: [%5d] * 0x%p (%d) -> 0x%p (%d)\n",
|
||||||
mp->order,
|
mp->order,
|
||||||
mp->addr, mp->num,
|
mp->addr, mp->num,
|
||||||
addr2, num);
|
addr2, num);
|
||||||
|
@ -626,7 +626,7 @@ static void print_leak(MEM *m, MEM_LEAK *l)
|
||||||
}
|
}
|
||||||
while(amip && amip->thread == ti);
|
while(amip && amip->thread == ti);
|
||||||
|
|
||||||
#ifdef LEVITTE_DEBUG
|
#ifdef LEVITTE_DEBUG_MEM
|
||||||
if (amip)
|
if (amip)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Thread switch detected in backtrace!!!!\n");
|
fprintf(stderr, "Thread switch detected in backtrace!!!!\n");
|
||||||
|
|
Loading…
Reference in a new issue