如何使用gdb中的参数运行程序?

如何使用gdb中的参数运行程序?,gdb,Gdb,假设我在gdb memcached中,但希望以memcached-d-u root-m 50-c 1024-p 11051运行它 如何执行此操作?在gdb提示符上,只需键入 run-d-u root-m50-c1024-p11051 或者,您也可以使用args参数: (gdb) help set args Set argument list to give program being debugged when it is started. Follow this command with an

假设我在
gdb memcached
中,但希望以
memcached-d-u root-m 50-c 1024-p 11051运行它


如何执行此操作?

在gdb提示符上,只需键入

run-d-u root-m50-c1024-p11051


或者,您也可以使用
args
参数:

(gdb) help set args
Set argument list to give program being debugged when it is started.
Follow this command with any number of args, to be passed to the program.
因此,在你的情况下:

set args -d -u root -m 50 -c 1024 -p 11051
run (or) start