libio-include = -I$(..)libio
# List of non-library modules that we build.
-built-modules = iconvprogs iconvdata ldconfig lddlibc4 libmemusage \
+built-modules = iconvprogs iconvdata ldconfig lddlibc4 libmemusage libmtracectl \
libSegFault libpcprofile librpcsvc locale-programs \
memusagestat nonlib nscd extramodules libnldbl
non-lib.a := libmcheck.a
# Additional library.
-extra-libs = libmemusage
+extra-libs = libmemusage libmtracectl
extra-libs-others = $(extra-libs)
libmemusage-routines = memusage
libmemusage-inhibit-o = $(filter-out .os,$(object-suffixes))
+libmtracectl-routines = mtrace-ctl
+libmtracectl-inhibit-o = $(filter-out .os,$(object-suffixes))
+
$(objpfx)tst-malloc-backtrace: $(shared-thread-library)
$(objpfx)tst-malloc-thread-exit: $(shared-thread-library)
$(objpfx)tst-malloc-thread-fail: $(shared-thread-library)
}
void __attribute__((constructor))
-djmain()
+djmain(void)
{
- char *e;
+ const char *e;
size_t sz;
e = getenv("MTRACE_CTL_COUNT");
};
void __attribute__((destructor))
-djend()
+djend(void)
{
char *e;
FILE *outf;
case __MTB_TYPE_UNUSED:
break;
default:
- fprintf (outf, "%08x %s %c%c%c%c%c%c%c%c %016x %016x %016x\n",
+ fprintf (outf, "%08x %s %c%c%c%c%c%c%c%c %016llx %016llx %016llx\n",
t->thread,
typenames[t->type],
t->path_thread_cache ? 'T' : '-',
t->path_munmap ? 'U' : '-',
t->path_m_f_realloc ? 'R' : '-',
t->path_hook ? 'H' : '-',
- t->ptr1,
- t->size,
- t->ptr2);
+ (long long unsigned int) t->ptr1,
+ (long long unsigned int) t->size,
+ (long long unsigned int) t->ptr2);
break;
}
}