【发布时间】:2011-08-19 00:23:44
【问题描述】:
今天晚上我在某个敏感点咬了我一口,想要澄清一下。正如 karlphillip 在this question 中所说,可执行文件将参数列表视为
Consider: ./program file.txt
argv[0] is "program"
argv[1] is "file.txt"
但是,在 gdb 调试器中,对于程序 ./lc1 f1.txt,arglist 显示为
arg[0] is "/home/jason/Project 6/lc1"
arg[1] is "lc1"
arg[2] is "f1.txt"
为什么两个 arglists 之间存在差异?
【问题讨论】:
标签: linux gdb command-line-arguments