From d6600e075fa8c19dc8e865b5c8dfc668fae4edda Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 20 May 2015 13:06:31 +0300 Subject: [PATCH] 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 --- include/bluetooth/bluetooth.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/bluetooth/bluetooth.h b/include/bluetooth/bluetooth.h index 6288e6166ec..291492a9742 100644 --- a/include/bluetooth/bluetooth.h +++ b/include/bluetooth/bluetooth.h @@ -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 */