(gdb) Delete a location in a breakpoint
-
Basics:
d[el[ete]] <BREAKPOINT_INDEX>
- Situation where a breakpoint has multiple locations:
e.g. given multiple overloads of function
foo
, break onfoo
(i.e.b foo
)- A representative index (say
x
) is assigned for the breakpoint - Each specific overload of
foo
occurs in a different location, hence a sub-indexx.y
is assigned (y=1,2,...
)
- A representative index (say
- Deleting a single location of occurrence of the breakpoint is not allowed (i.e.
d x.y
doesn’t work).- Since there is still only a single breakpoint, only multiple locations of it
- Instead, each location can be independently disabled:
disable x.y
-
Multiple locations in a breakpoint can be disabled simultaneously by specifying a range in their indices:
disable x.y-z
disablesx.y
,x.(y+1)
, …,x.z
- To disable/delete ALL breakpoints: run
disable
ordelete
without arguments
References:
Written on March 23, 2021