From: Willy Tarreau Date: Mon, 16 Feb 2026 10:07:23 +0000 (+0100) Subject: DEV: gdb: use unsigned longs to display pools memory usage X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d2490c5ae5d52fb2d30ad377b7c531b4f938d6c;p=thirdparty%2Fhaproxy.git DEV: gdb: use unsigned longs to display pools memory usage The pools memory usage calculation was done using ints by default, making it harder to identify large ones. Let's switch to unsigned long for the size calculations. --- diff --git a/dev/gdb/pools.gdb b/dev/gdb/pools.gdb index 795432e41..04e11a963 100644 --- a/dev/gdb/pools.gdb +++ b/dev/gdb/pools.gdb @@ -14,8 +14,8 @@ define pools_dump set $idx=$idx + 1 end - set $mem = $total * $e->size - printf "list=%#lx pool_head=%p name=%s size=%u alloc=%u used=%u mem=%u\n", $p, $e, $e->name, $e->size, $total, $used, $mem + set $mem = (unsigned long)$total * $e->size + printf "list=%#lx pool_head=%p name=%s size=%u alloc=%u used=%u mem=%lu\n", $p, $e, $e->name, $e->size, $total, $used, $mem set $p = *(void **)$p end end