Skip to content

Commit

Permalink
MINOR: debug: also add a pointer to struct global to post_mortem
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
wtarreau committed Oct 26, 2024
1 parent dc1c0a1 commit 2f04ebe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,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:
Expand Down Expand Up @@ -2564,6 +2565,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;
}
Expand Down

0 comments on commit 2f04ebe

Please sign in to comment.