Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ember.js/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C 我该如何使用命令“;“命令”;在里面?_C_Gdb - Fatal编程技术网

C 我该如何使用命令“;“命令”;在里面?

C 我该如何使用命令“;“命令”;在里面?,c,gdb,C,Gdb,如何将命令“commands break#”放入.gdbinit中?我试过了,但失败了。多谢各位 define macro1 b func1 commands p func1_var end # gdb complaints that "This command cannot be used at the top level." end 这对我来说很好。您可能有一个较旧版本的gdb。升级将修复它。如果这对您很重要,您可以尝试查看gdb bugzilla中的错误是何

如何将命令“commands break#”放入.gdbinit中?我试过了,但失败了。多谢各位

define macro1
   b func1
   commands
      p func1_var
   end # gdb complaints that "This command cannot be used at the top level."
end

这对我来说很好。您可能有一个较旧版本的gdb。升级将修复它。如果这对您很重要,您可以尝试查看gdb bugzilla中的错误是何时修复的。

确保您将
命令
s
一起使用,而不是
命令
(是的,我知道您的帖子有
s

对我来说,这就是问题的原因,但我不明白为什么

GDB7.11,Ubuntu 16.10