]> git.ipfire.org Git - thirdparty/haproxy.git/commit
DEV: dev/gdb: add simple thread dump
authorWilly Tarreau <w@1wt.eu>
Wed, 27 May 2026 16:50:11 +0000 (18:50 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 1 Jun 2026 17:08:42 +0000 (19:08 +0200)
commitca5f6cd053cb180b146447b245caed852c394fcc
tree76ae2cfb668ed677758445e2c0c8d6a13d0c75d2
parentc82ac139f43938b5692d768bc9c2b530164d67a3
DEV: dev/gdb: add simple thread dump

The thread_dump function dumps the list of known threads and a few info
on them (pointer, current run queue, flags etc). This should help more
easily spot a particular one and find stuck ones.

E.g:

  (gdb) thread_dump
  Tid    0: pth=0x7ffff7e797c0 mono=2222322327950732 now_ms=4294947291 fl=0x38 rq=-1 cq=0 current=(nil)
  Tid    1: pth=0x7ffff78d8640 mono=2222322327928085 now_ms=4294947291 fl=0x38 rq=-1 cq=0 current=(nil)
  Tid    2: pth=0x7ffff6b7e640 mono=2222322327927150 now_ms=4294947291 fl=0x38 rq=-1 cq=0 current=(nil)
  Tid    3: pth=0x7ffff637d640 mono=2222322327924878 now_ms=4294947291 fl=0x38 rq=-1 cq=0 current=(nil)
  Tid    4: pth=0x7ffff5b7c640 mono=2222322327925676 now_ms=4294947291 fl=0x38 rq=-1 cq=0 current=(nil)
  Tid    5: pth=0x7ffff537b640 mono=2222322327929524 now_ms=4294947291 fl=0x38 rq=-1 cq=0 current=(nil)
  Tid    6: pth=0x7ffff4b7a640 mono=2222322327926817 now_ms=4294947291 fl=0x38 rq=-1 cq=0 current=(nil)
  Tid    7: pth=0x7fffdffff640 mono=2222322327947960 now_ms=4294947291 fl=0x38 rq=-1 cq=0 current=(nil)
dev/gdb/thread.gdb [new file with mode: 0644]