]> git.kaiwu.me - haproxy.git/commit
MEDIUM: debug: add a new version of complain() that takes a debug_count struct
authorWilly Tarreau <w@1wt.eu>
Tue, 11 Aug 2026 09:21:50 +0000 (11:21 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 13 Aug 2026 15:43:30 +0000 (17:43 +0200)
commit1f374058be842b7d3464c224b8975626d0cfcb7b
treeeeba57f05677cb4c462be7fcd5e3d4e2030a0d38
parent18dd26fcdaa879bb07f6bbd10c7a4bdda9081d18
MEDIUM: debug: add a new version of complain() that takes a debug_count struct

complain_with_dbg() takes a debug_count struct in argument from which
it retrieves everything it needs:
  - details
  - type
  - file name
  - line number
  - description
  - vaargs

This is done by making the common _complain() able to decode such elements
from a debug_count when presented. complain() passes a NULL there and uses
its msg, while complain_with_dbg() passes the debug_count and no msg. This
allows us to get rid of all the pre-made redundant messages and to save
70 kB of code. We're now around 136 kB under the initial size.
include/haproxy/bug.h
src/debug.c