Bluetooth: Include context ID in debug logs

Including the context ID in debug logs can help track down various
issues, e.g. stack corruption.

Change-Id: I3cd70edd5bfd1d726f6d35e7331afb313cf3cacb
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2015-05-20 13:06:31 +03:00 committed by Anas Nashif
commit d6600e075f

View file

@ -38,7 +38,8 @@
/* Bluetooth subsystem logging helpers */
#if defined(CONFIG_BLUETOOTH_DEBUG)
#define BT_DBG(fmt, ...) printf("bt: %s: " fmt, __func__, ##__VA_ARGS__)
#define BT_DBG(fmt, ...) printf("bt: %s (%x): " fmt, __func__, \
context_self_get(), ##__VA_ARGS__)
#else
#define BT_DBG(fmt, ...)
#endif /* CONFIG_BLUETOOTH_DEBUG */