From c73d05326ed3a9d8356b8ca652dfe7f57e5dc8ba Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 11 Aug 2026 10:04:15 +0200 Subject: [PATCH] MINOR: debug: store the caller's details in debug_count There's a 8-bit hole left in the struct and that's exactly what we'll need to store the details. In fact we're only using 6 bits now and they're a bit wasted, so we could even compact them to be merged with the type later if needed. --- include/haproxy/bug.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/haproxy/bug.h b/include/haproxy/bug.h index 7b476dac4..93040ab2f 100644 --- a/include/haproxy/bug.h +++ b/include/haproxy/bug.h @@ -142,7 +142,7 @@ struct debug_count { const char *desc; uint16_t line; uint8_t type; - /* one-byte hole here */ + uint8_t details; uint32_t count; }; @@ -353,6 +353,7 @@ extern __attribute__((__weak__)) struct debug_count __stop_dbg_cnt HA_SECTION_S .func = __func__, \ .line = _line, \ .type = _type, \ + .details = _details, \ .desc = (sizeof("" #_cond) > 1) ? \ (sizeof("" __VA_ARGS__) > 1) ? \ "" #_cond "\x1e" __VA_ARGS__ : \ -- 2.47.3