diff options
Diffstat (limited to 'malloc/mtrace.c')
-rw-r--r-- | malloc/mtrace.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/malloc/mtrace.c b/malloc/mtrace.c index 5c82e1d1e4..171eb5a570 100644 --- a/malloc/mtrace.c +++ b/malloc/mtrace.c @@ -59,10 +59,12 @@ __libc_lock_define_initialized (static, lock); /* Address to breakpoint on accesses to... */ __ptr_t mallwatch; +#ifdef USE_MTRACE_FILE /* File name and line number information, for callers that had the foresight to call through a macro. */ -char *_mtrace_file attribute_hidden; -int _mtrace_line attribute_hidden; +char *_mtrace_file; +int _mtrace_line; +#endif /* Old hook values. */ static void (*tr_old_free_hook) __P ((__ptr_t ptr, const __ptr_t)); @@ -89,12 +91,15 @@ internal_function tr_where (caller) const __ptr_t caller; { +#ifdef USE_MTRACE_FILE if (_mtrace_file) { fprintf (mallstream, "@ %s:%d ", _mtrace_file, _mtrace_line); _mtrace_file = NULL; } - else if (caller != NULL) + else +#endif + if (caller != NULL) { #ifdef HAVE_ELF Dl_info info; |