chzht001 发表于 2013-12-26 21:00

gdb的shell中能访问程序变量吗?

本帖最后由 chzht001 于 2013-12-26 21:02 编辑

gdb命令行的shell能不能访问程序中的字符符串变量? 我想访问,用shell 命令执行一些操作,需要用程序中的变量作参数
程序中代码
char cpath;
gdb > shell echo $cpath 这样显示是空的,怎么样弄呢?

井蛙夏虫 发表于 2013-12-27 10:28

回复 1# chzht001
http://stackoverflow.com/questions/17215004/pass-gdb-variable-to-a-shell-command-excuted-from-gdb
程序变量去掉'$'符号

   
页: [1]
查看完整版本: gdb的shell中能访问程序变量吗?