]> granicus.if.org Git - gc/commit
Define GC_caller_func_offset only if HAVE_DLADDR and GC_RETURN_ADDR_PARENT
authorIvan Maidanski <ivmai@mail.ru>
Sat, 24 Aug 2013 14:43:29 +0000 (18:43 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Sat, 24 Aug 2013 16:12:27 +0000 (20:12 +0400)
commit5d94f182226909f8918b314e4c093375539f4ec3
treeb5605451f1a8b530467bfad8f0684941a199d6d1
parentd16f57acfeece01ae316be5c4b9f29e0ae35c3a0
Define GC_caller_func_offset only if HAVE_DLADDR and GC_RETURN_ADDR_PARENT

* dbg_mlc.c (GC_caller_func_offset): Do not define (and do not include
dlfcn.h) unless GC_ADD_CALLER; test HAVE_DLADDR (and
GC_RETURN_ADDR_PARENT) instead of FREEBSD macro.
* dbg_mlc.c (GC_caller_func_offset): Use STATIC; replace the K&R-style
function definition with the ANSI C one; remove unnecessary "const" in
type casts; do not call dladdr() if address is 0.
* dbg_mlc.c (GC_debug_malloc, GC_debug_realloc): Move assignment of
"s" argument to "unknown" to GC_caller_func_offset (if GC_ADD_CALLER).
* dbg_mlc.c (GC_debug_realloc): Do not call GC_caller_func_offset if
"p" argument is NULL (i.e., if redirected to GC_debug_malloc)..
* include/private/gcconfig.h (HAVE_DLADDR): Define for FREEBSD.
dbg_mlc.c
include/private/gcconfig.h