]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: debug: store the caller's details in debug_count
authorWilly Tarreau <w@1wt.eu>
Tue, 11 Aug 2026 08:04:15 +0000 (10:04 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 13 Aug 2026 15:43:30 +0000 (17:43 +0200)
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

index 7b476dac4b920afb75d5e55dbf66b4db644355d9..93040ab2f715bdeb50473d0b2a9d00d3364d83e1 100644 (file)
@@ -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__ :                \