Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do i put the command "commands" inside gdbinit?

Tags:

c

gdb

How do I put the command "commands break#" inside .gdbinit? I tried this but failed. Thank you

define macro1
   b func1
   commands
      p func1_var
   end # gdb complaints that "This command cannot be used at the top level."
end
like image 825
cody Avatar asked Mar 15 '26 21:03

cody


1 Answers

Make sure you are using commands with s instead of command (yes, I know your post has the s).

That was the cause of the problem for me, but I don't understand why.

GDB 7.11, Ubuntu 16.10.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!