-struct connman_device *connman_device_ref(struct connman_device *device);
-void connman_device_unref(struct connman_device *device);
+
+#define connman_device_ref(device) \
+ connman_device_ref_debug(device, __FILE__, __LINE__, __func__)
+
+#define connman_device_unref(device) \
+ connman_device_unref_debug(device, __FILE__, __LINE__, __func__)
+
+struct connman_device *
+connman_device_ref_debug(struct connman_device *device,
+ const char *file, int line, const char *caller);
+void connman_device_unref_debug(struct connman_device *device,
+ const char *file, int line, const char *caller);