debian 查看进程:(Linux)很多程序在运行时需要指定运行时参数,那么如何在gdb中设置和察看运行时参数?

来源:百度文库 编辑:中科新闻网 时间:2024/04/28 06:26:28

运行gdb
拍入help,可得到帮助的类别.

如何设置和察看运行时参数,拍入
help data 得到帮助的命令表,其中有你关心的"set variable" 等
-----------------------------------------------
call -- Call a function in the program
delete display -- Cancel some expressions to be displayed when program stops
disable display -- Disable some expressions to be displayed when program stops
disassemble -- Disassemble a specified section of memory
display -- Print value of expression EXP each time the program stops
enable display -- Enable some expressions to be displayed when program stops
inspect -- Same as "print" command
output -- Like "print" but don't put in value history and don't print newline
print -- Print value of expression EXP
printf -- Printf "printf format string"
ptype -- Print definition of type TYPE
set -- Evaluate expression EXP and assign result to variable VAR
set variable -- Evaluate expression EXP and assign result to variable VAR
undisplay -- Cancel some expressions to be displayed when program stops
whatis -- Print data type of expression EXP
x -- Examine memory: x/FMT ADDRESS
------------------------------------------------

help set variable
阅读详细的如何设置参数和结果存放