MINOR: debug: add the ability to enter components in the post_mortem struct
authorWilly Tarreau <w@1wt.eu>
Thu, 23 Nov 2023 10:25:34 +0000 (11:25 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 23 Nov 2023 14:39:21 +0000 (15:39 +0100)
commit6455fd502407e60de0f6988a9d00303b43c46ca7
tree5af73b0ddb193b8b27ed7abb1b85fc1deac07434
parenta88a3482b5a6315258761b9f80fd6a7e086c1462
MINOR: debug: add the ability to enter components in the post_mortem struct

Here the idea is to collect components' versions and build options. The
main component is haproxy, but the API is made so that any sub-system
can easily add a component there (for example the detailed version of a
device detection lib, or some info about a lib loaded from Lua).

The elements are stored as a pointer to an array of structs and its count
so that it's sufficient to issue this in gdb to list them all at once:

  print *post_mortem.components@post_mortem.nb_components

For now we collect name, version, toolchain, toolchain options, build
options and path. Maybe more could be useful in the future.
include/haproxy/debug.h
src/debug.c