]> git.kaiwu.me - haproxy.git/commit
DEV: dev/gdb: add fdtab dump
authorWilly Tarreau <w@1wt.eu>
Wed, 27 May 2026 16:51:28 +0000 (18:51 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 1 Jun 2026 17:08:42 +0000 (19:08 +0200)
commit83634a4c9a2721c90411bd232e6d947c9171d0b5
tree5dfd758473b72dbd28da720a823344f24297fb07
parentca5f6cd053cb180b146447b245caed852c394fcc
DEV: dev/gdb: add fdtab dump

Three functions are provided here:
  fd_dump: lists all FDs
  fd_dump_conn: lists all FDs holding a connection
  fd_dump_listener: lists all FDs holding a listener

They take no argument, and dump some of the known info. E.g. for
a connection, ctrl, xprt, flags, mux, sessions, frontend's name
and session's age are reported. Example:

  (gdb) fd_dump_conn
  fd    31: rm=0 tm=0x2 um=0 st=0x21 refc=0x1 tkov=0 gen=0 conn=0x7fffe803b600: flg=0x300 err=0 ctrl=0xdf51c0 xprt=0xdf5c80 mux=0xbaeee0 sess=0x7ffff003b570: fe=0x1e45b00 id=foo age=0ms

They are particularly slow because they iterate over all possible FDs,
so better limit them to the desired types.
dev/gdb/fd.gdb [new file with mode: 0644]