1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html> 3<!-- Copyright (C) 1988-2021 Free Software Foundation, Inc. 4 5Permission is granted to copy, distribute and/or modify this document 6under the terms of the GNU Free Documentation License, Version 1.3 or 7any later version published by the Free Software Foundation; with the 8Invariant Sections being "Free Software" and "Free Software Needs 9Free Documentation", with the Front-Cover Texts being "A GNU Manual," 10and with the Back-Cover Texts as in (a) below. 11 12(a) The FSF's Back-Cover Text is: "You are free to copy and modify 13this GNU Manual. Buying copies from GNU Press supports the FSF in 14developing GNU and promoting software freedom." --> 15<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ --> 16<head> 17<title>Debugging with GDB: Delete Breaks</title> 18 19<meta name="description" content="Debugging with GDB: Delete Breaks"> 20<meta name="keywords" content="Debugging with GDB: Delete Breaks"> 21<meta name="resource-type" content="document"> 22<meta name="distribution" content="global"> 23<meta name="Generator" content="makeinfo"> 24<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 25<link href="index.html#Top" rel="start" title="Top"> 26<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index"> 27<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> 28<link href="Breakpoints.html#Breakpoints" rel="up" title="Breakpoints"> 29<link href="Disabling.html#Disabling" rel="next" title="Disabling"> 30<link href="Set-Catchpoints.html#Set-Catchpoints" rel="previous" title="Set Catchpoints"> 31<style type="text/css"> 32<!-- 33a.summary-letter {text-decoration: none} 34blockquote.smallquotation {font-size: smaller} 35div.display {margin-left: 3.2em} 36div.example {margin-left: 3.2em} 37div.indentedblock {margin-left: 3.2em} 38div.lisp {margin-left: 3.2em} 39div.smalldisplay {margin-left: 3.2em} 40div.smallexample {margin-left: 3.2em} 41div.smallindentedblock {margin-left: 3.2em; font-size: smaller} 42div.smalllisp {margin-left: 3.2em} 43kbd {font-style:oblique} 44pre.display {font-family: inherit} 45pre.format {font-family: inherit} 46pre.menu-comment {font-family: serif} 47pre.menu-preformatted {font-family: serif} 48pre.smalldisplay {font-family: inherit; font-size: smaller} 49pre.smallexample {font-size: smaller} 50pre.smallformat {font-family: inherit; font-size: smaller} 51pre.smalllisp {font-size: smaller} 52span.nocodebreak {white-space:nowrap} 53span.nolinebreak {white-space:nowrap} 54span.roman {font-family:serif; font-weight:normal} 55span.sansserif {font-family:sans-serif; font-weight:normal} 56ul.no-bullet {list-style: none} 57--> 58</style> 59 60 61</head> 62 63<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> 64<a name="Delete-Breaks"></a> 65<div class="header"> 66<p> 67Next: <a href="Disabling.html#Disabling" accesskey="n" rel="next">Disabling</a>, Previous: <a href="Set-Catchpoints.html#Set-Catchpoints" accesskey="p" rel="previous">Set Catchpoints</a>, Up: <a href="Breakpoints.html#Breakpoints" accesskey="u" rel="up">Breakpoints</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p> 68</div> 69<hr> 70<a name="Deleting-Breakpoints"></a> 71<h4 class="subsection">5.1.4 Deleting Breakpoints</h4> 72 73<a name="index-clearing-breakpoints_002c-watchpoints_002c-catchpoints"></a> 74<a name="index-deleting-breakpoints_002c-watchpoints_002c-catchpoints"></a> 75<p>It is often necessary to eliminate a breakpoint, watchpoint, or 76catchpoint once it has done its job and you no longer want your program 77to stop there. This is called <em>deleting</em> the breakpoint. A 78breakpoint that has been deleted no longer exists; it is forgotten. 79</p> 80<p>With the <code>clear</code> command you can delete breakpoints according to 81where they are in your program. With the <code>delete</code> command you can 82delete individual breakpoints, watchpoints, or catchpoints by specifying 83their breakpoint numbers. 84</p> 85<p>It is not necessary to delete a breakpoint to proceed past it. <small>GDB</small> 86automatically ignores breakpoints on the first instruction to be executed 87when you continue execution without changing the execution address. 88</p> 89<dl compact="compact"> 90<dd><a name="index-clear"></a> 91</dd> 92<dt><code>clear</code></dt> 93<dd><p>Delete any breakpoints at the next instruction to be executed in the 94selected stack frame (see <a href="Selection.html#Selection">Selecting a Frame</a>). When 95the innermost frame is selected, this is a good way to delete a 96breakpoint where your program just stopped. 97</p> 98</dd> 99<dt><code>clear <var>location</var></code></dt> 100<dd><p>Delete any breakpoints set at the specified <var>location</var>. 101See <a href="Specify-Location.html#Specify-Location">Specify Location</a>, for the various forms of <var>location</var>; the 102most useful ones are listed below: 103</p> 104<dl compact="compact"> 105<dt><code>clear <var>function</var></code></dt> 106<dt><code>clear <var>filename</var>:<var>function</var></code></dt> 107<dd><p>Delete any breakpoints set at entry to the named <var>function</var>. 108</p> 109</dd> 110<dt><code>clear <var>linenum</var></code></dt> 111<dt><code>clear <var>filename</var>:<var>linenum</var></code></dt> 112<dd><p>Delete any breakpoints set at or within the code of the specified 113<var>linenum</var> of the specified <var>filename</var>. 114</p></dd> 115</dl> 116 117<a name="index-delete-breakpoints"></a> 118<a name="index-delete"></a> 119<a name="index-d-_0028delete_0029"></a> 120</dd> 121<dt><code>delete <span class="roman">[</span>breakpoints<span class="roman">]</span> <span class="roman">[</span><var>list</var>…<span class="roman">]</span></code></dt> 122<dd><p>Delete the breakpoints, watchpoints, or catchpoints of the breakpoint 123list specified as argument. If no argument is specified, delete all 124breakpoints (<small>GDB</small> asks confirmation, unless you have <code>set 125confirm off</code>). You can abbreviate this command as <code>d</code>. 126</p></dd> 127</dl> 128 129<hr> 130<div class="header"> 131<p> 132Next: <a href="Disabling.html#Disabling" accesskey="n" rel="next">Disabling</a>, Previous: <a href="Set-Catchpoints.html#Set-Catchpoints" accesskey="p" rel="previous">Set Catchpoints</a>, Up: <a href="Breakpoints.html#Breakpoints" accesskey="u" rel="up">Breakpoints</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p> 133</div> 134 135 136 137</body> 138</html> 139