Reputation: 9183
Is there any way in gdb to redefine the location of a breakpoint without having to disable/delete it and make another one, say, two lines above it which is invariably assigned a different number even if we delete the previous one?
Upvotes: 1
Views: 106
Reputation: 213636
Is there any way in gdb to redefine the location of a breakpoint without having to disable/delete it and make another one
No.
Presumably you care about keeping the old breakpoint number because you've attached commands to disable and enable that breakpoint to other breakpoints. If so, you can use save breakpoints
command to save breakpoint definitions to a file, adjust the location of the breakpoint there with an editor, then restart GDB and use source
command to reload the breakpoints.
Upvotes: 2