From: Willy Tarreau Date: Sat, 26 Oct 2024 09:33:09 +0000 (+0200) Subject: MINOR: debug: also add a pointer to struct global to post_mortem X-Git-Tag: v3.0.6~12 X-Git-Url: http://git.haproxy.org/?a=commitdiff_plain;h=7f09a7a935a9b2c21ef590cfd3f41b7ea7e0b0cf;p=haproxy-3.0.git MINOR: debug: also add a pointer to struct global to post_mortem The pointer to struct global is also an important element to have in post_mortem given that it's used a lot to take decisions in the code. Let's just add it. It's worth noting that we could get rid of argc/argv at this point since they're also present in the global struct, but they don't cost much there anyway. (cherry picked from commit 2f04ebe14aca91f4a0fafcd03a0f310d98d97aaf) Signed-off-by: Willy Tarreau --- diff --git a/src/debug.c b/src/debug.c index a07337b..43c8ab4 100644 --- a/src/debug.c +++ b/src/debug.c @@ -138,6 +138,7 @@ struct post_mortem { struct thread_ctx *thread_ctx; // pointer to ha_thread_ctx struct list *pools; // pointer to the head of the pools list struct proxy **proxies; // pointer to the head of the proxies list + struct global *global; // pointer to the struct global /* info about identified distinct components (executable, shared libs, etc). * These can be all listed at once in gdb using: @@ -2375,6 +2376,7 @@ static int feed_post_mortem() post_mortem.thread_ctx = ha_thread_ctx; post_mortem.pools = &pools; post_mortem.proxies = &proxies_list; + post_mortem.global = &global; return ERR_NONE; }