Skip to content
  • Simon McVittie's avatar
    Provide a hook to allow refcounting to be traced · 566a8416
    Simon McVittie authored
    This is designed to be used from a wrapper function, partly to supply
    the same arguments every time for a particular class of object, and partly
    to provide a more specific gdb breakpoint. It has several purposes:
    
    * when under gdb, provide a function which can be used in breakpoints
    * when not under valgrind and DBUS_MESSAGE_TRACE=1 is set, emit a
      _dbus_verbose when a message's refcount changes
    * when under valgrind and DBUS_MESSAGE_TRACE=1 is set, emit a
      VALGRIND_PRINTF_BACKTRACE when a message's refcount changes,
      which lets you see the complete history of each message to track down
      reference leaks
    
    Compile-time support is currently conditional on DBUS_ENABLE_VERBOSE_MODE,
    but could be separated out if desired.
    
    Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37286
    
    
    Signed-off-by: default avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
    Reviewed-by: default avatarLennart Poettering <lennart@poettering.net>
    566a8416