]> git.ipfire.org Git - thirdparty/haproxy.git/commit
DEV: gdb: add a number of gdb scripts to navigate in core dumps
authorWilly Tarreau <w@1wt.eu>
Mon, 28 Oct 2024 16:51:29 +0000 (17:51 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 28 Oct 2024 16:55:08 +0000 (17:55 +0100)
commite240be549509c3f68e6963862ed4e035c26ad536
tree54469f19227a02ae1f9206b6903f69a27ce07bf0
parent52240680f1d98cc7eb1e762a04becaf54660e96b
DEV: gdb: add a number of gdb scripts to navigate in core dumps

These is a collection of functions I'm occasionally using to navigate
in core dumps. Only working ones were extracted.

Those requiring knowledge of global variables (e.g. pools, proxy list)
use the one extracted from the post_mortem struct. That one is defined
in post-mortem.gdb and needs to be initialized using "pm_init post_mortem"
or "pm_init <pointer>". From this point a number of global variables are
accessible even if symbols are missing; those ones are then used by other
functions to dump streams, threads, pools, proxies etc.

The files can be sourced or copy-pasted into a gdb session. It's worth
trying to keep them up-to-date, as the old ones used to navigate through
tasks are no longer usable due to massive changes.
dev/gdb/ebtree.gdb [new file with mode: 0644]
dev/gdb/list.gdb [new file with mode: 0644]
dev/gdb/pools.gdb [new file with mode: 0644]
dev/gdb/post-mortem.gdb [new file with mode: 0644]
dev/gdb/proxies.gdb [new file with mode: 0644]
dev/gdb/servers.gdb [new file with mode: 0644]
dev/gdb/stream.gdb [new file with mode: 0644]