GDB 17.1 / Linux setting limits for the debugged process?
Simon Marchi
simark@simark.ca
Mon Jan 26 15:49:28 GMT 2026
On 1/26/26 9:08 AM, Basile Starynkevitch wrote:
> Hello all,
>
> (this is motivated by https://github.com/RefPerSys/RefPerSys/issues/30 - a bug in a GPL licensed inference engine project coded in C++)
>
> Using GDB 17.1 on an open source software compiled by GCC 16 snapshot (or latest GCC 15) on a Debian/Linux desktop (or laptop),
> how can I set limits (in the https://man7.org/linux/man-pages/man2/getrlimit.2.html sense, for elapsed CPU time limit)
> on the debugged process, but not on the GDB 17.1 debugging process?
Try to set "prlimit" as the exec-wrapper:
(gdb) set exec-wrapper prlimit --cpu=1234
(gdb) run
Simon
More information about the Gdb
mailing list