Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove the commands from a gdb break point?

I know in gdb, I can set

break 14

To break at line 14, this is the "1" break point, then

commands 1
printf "%d\n",i
end

This will attach gdb commands to break point 1. No problem.

But my question is: seems commands are co-exist with break point, as I use "i b" to check its information. In the case above:

  1. How can I remove the commands from break point 1, and still keep the break point?

  2. How to list/filter all commands information, without search all break points information?

Thanks.

like image 735
Troskyvs Avatar asked Oct 28 '25 22:10

Troskyvs


1 Answers

You can remove the commands from a breakpoint by entering an empty command list:

commands 1
end

will remove the commands from breakpoint 1.

As far as I know there's no way to list or filter the breakpoint commands other than looking at the output of info breakpoints.

like image 92
Andrew Avatar answered Oct 30 '25 18:10

Andrew



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!