Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Moving breakpoints in gdb

Tags:

gdb

Is it possible to change the location of an existing GDB breakpoint?

I've set one on a particular line, and then added a condition to it. I would like to move it to a different line number, but retain the condition without having to destroy it and retype the condition.

I'm using GDB 7.5 on RedHat Enterprise Linux 5 64bit.

Any help much appreciated.

like image 852
RFairey Avatar asked Oct 19 '25 03:10

RFairey


1 Answers

It is not possible to do this.

It would be a nice addition, but nobody has implemented it yet.

You can use "save breakpoints" and then edit the result and source it. This may be handy if the condition is very complicated.

like image 150
Tom Tromey Avatar answered Oct 22 '25 07:10

Tom Tromey



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!