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: Set Breaks</title> 18 19<meta name="description" content="Debugging with GDB: Set Breaks"> 20<meta name="keywords" content="Debugging with GDB: Set 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="Set-Watchpoints.html#Set-Watchpoints" rel="next" title="Set Watchpoints"> 30<link href="Breakpoints.html#Breakpoints" rel="previous" title="Breakpoints"> 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="Set-Breaks"></a> 65<div class="header"> 66<p> 67Next: <a href="Set-Watchpoints.html#Set-Watchpoints" accesskey="n" rel="next">Set Watchpoints</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="Setting-Breakpoints"></a> 71<h4 class="subsection">5.1.1 Setting Breakpoints</h4> 72 73 74<a name="index-break"></a> 75<a name="index-b-_0028break_0029"></a> 76<a name="index-_0024bpnum_002c-convenience-variable"></a> 77<a name="index-latest-breakpoint"></a> 78<p>Breakpoints are set with the <code>break</code> command (abbreviated 79<code>b</code>). The debugger convenience variable ‘<samp>$bpnum</samp>’ records the 80number of the breakpoint you’ve set most recently; see <a href="Convenience-Vars.html#Convenience-Vars">Convenience Variables</a>, for a discussion of what you can do with 81convenience variables. 82</p> 83<dl compact="compact"> 84<dt><code>break <var>location</var></code></dt> 85<dd><p>Set a breakpoint at the given <var>location</var>, which can specify a 86function name, a line number, or an address of an instruction. 87(See <a href="Specify-Location.html#Specify-Location">Specify Location</a>, for a list of all the possible ways to 88specify a <var>location</var>.) The breakpoint will stop your program just 89before it executes any of the code in the specified <var>location</var>. 90</p> 91<p>When using source languages that permit overloading of symbols, such as 92C<tt>++</tt>, a function name may refer to more than one possible place to break. 93See <a href="Ambiguous-Expressions.html#Ambiguous-Expressions">Ambiguous Expressions</a>, for a discussion of 94that situation. 95</p> 96<p>It is also possible to insert a breakpoint that will stop the program 97only if a specific thread (see <a href="Thread_002dSpecific-Breakpoints.html#Thread_002dSpecific-Breakpoints">Thread-Specific Breakpoints</a>) 98or a specific task (see <a href="Ada-Tasks.html#Ada-Tasks">Ada Tasks</a>) hits that breakpoint. 99</p> 100</dd> 101<dt><code>break</code></dt> 102<dd><p>When called without any arguments, <code>break</code> sets a breakpoint at 103the next instruction to be executed in the selected stack frame 104(see <a href="Stack.html#Stack">Examining the Stack</a>). In any selected frame but the 105innermost, this makes your program stop as soon as control 106returns to that frame. This is similar to the effect of a 107<code>finish</code> command in the frame inside the selected frame—except 108that <code>finish</code> does not leave an active breakpoint. If you use 109<code>break</code> without an argument in the innermost frame, <small>GDB</small> stops 110the next time it reaches the current location; this may be useful 111inside loops. 112</p> 113<p><small>GDB</small> normally ignores breakpoints when it resumes execution, until at 114least one instruction has been executed. If it did not do this, you 115would be unable to proceed past a breakpoint without first disabling the 116breakpoint. This rule applies whether or not the breakpoint already 117existed when your program stopped. 118</p> 119</dd> 120<dt><code>break … if <var>cond</var></code></dt> 121<dd><p>Set a breakpoint with condition <var>cond</var>; evaluate the expression 122<var>cond</var> each time the breakpoint is reached, and stop only if the 123value is nonzero—that is, if <var>cond</var> evaluates as true. 124‘<samp>…</samp>’ stands for one of the possible arguments described 125above (or no argument) specifying where to break. See <a href="Conditions.html#Conditions">Break Conditions</a>, for more information on breakpoint conditions. 126</p> 127<a name="index-tbreak"></a> 128</dd> 129<dt><code>tbreak <var>args</var></code></dt> 130<dd><p>Set a breakpoint enabled only for one stop. The <var>args</var> are the 131same as for the <code>break</code> command, and the breakpoint is set in the same 132way, but the breakpoint is automatically deleted after the first time your 133program stops there. See <a href="Disabling.html#Disabling">Disabling Breakpoints</a>. 134</p> 135<a name="index-hbreak"></a> 136<a name="index-hardware-breakpoints"></a> 137</dd> 138<dt><code>hbreak <var>args</var></code></dt> 139<dd><p>Set a hardware-assisted breakpoint. The <var>args</var> are the same as for the 140<code>break</code> command and the breakpoint is set in the same way, but the 141breakpoint requires hardware support and some target hardware may not 142have this support. The main purpose of this is EPROM/ROM code 143debugging, so you can set a breakpoint at an instruction without 144changing the instruction. This can be used with the new trap-generation 145provided by SPARClite DSU and most x86-based targets. These targets 146will generate traps when a program accesses some data or instruction 147address that is assigned to the debug registers. However the hardware 148breakpoint registers can take a limited number of breakpoints. For 149example, on the DSU, only two data breakpoints can be set at a time, and 150<small>GDB</small> will reject this command if more than two are used. Delete 151or disable unused hardware breakpoints before setting new ones 152(see <a href="Disabling.html#Disabling">Disabling Breakpoints</a>). 153See <a href="Conditions.html#Conditions">Break Conditions</a>. 154For remote targets, you can restrict the number of hardware 155breakpoints <small>GDB</small> will use, see <a href="Remote-Configuration.html#set-remote-hardware_002dbreakpoint_002dlimit">set remote hardware-breakpoint-limit</a>. 156</p> 157<a name="index-thbreak"></a> 158</dd> 159<dt><code>thbreak <var>args</var></code></dt> 160<dd><p>Set a hardware-assisted breakpoint enabled only for one stop. The <var>args</var> 161are the same as for the <code>hbreak</code> command and the breakpoint is set in 162the same way. However, like the <code>tbreak</code> command, 163the breakpoint is automatically deleted after the 164first time your program stops there. Also, like the <code>hbreak</code> 165command, the breakpoint requires hardware support and some target hardware 166may not have this support. See <a href="Disabling.html#Disabling">Disabling Breakpoints</a>. 167See also <a href="Conditions.html#Conditions">Break Conditions</a>. 168</p> 169<a name="index-rbreak"></a> 170<a name="index-regular-expression"></a> 171<a name="index-breakpoints-at-functions-matching-a-regexp"></a> 172<a name="index-set-breakpoints-in-many-functions"></a> 173</dd> 174<dt><code>rbreak <var>regex</var></code></dt> 175<dd><p>Set breakpoints on all functions matching the regular expression 176<var>regex</var>. This command sets an unconditional breakpoint on all 177matches, printing a list of all breakpoints it set. Once these 178breakpoints are set, they are treated just like the breakpoints set with 179the <code>break</code> command. You can delete them, disable them, or make 180them conditional the same way as any other breakpoint. 181</p> 182<p>In programs using different languages, <small>GDB</small> chooses the syntax 183to print the list of all breakpoints it sets according to the 184‘<samp>set language</samp>’ value: using ‘<samp>set language auto</samp>’ 185(see <a href="Automatically.html#Automatically">Set Language Automatically</a>) means to use the 186language of the breakpoint’s function, other values mean to use 187the manually specified language (see <a href="Manually.html#Manually">Set Language Manually</a>). 188</p> 189<p>The syntax of the regular expression is the standard one used with tools 190like <samp>grep</samp>. Note that this is different from the syntax used by 191shells, so for instance <code>foo*</code> matches all functions that include 192an <code>fo</code> followed by zero or more <code>o</code>s. There is an implicit 193<code>.*</code> leading and trailing the regular expression you supply, so to 194match only functions that begin with <code>foo</code>, use <code>^foo</code>. 195</p> 196<a name="index-non_002dmember-C_002b_002b-functions_002c-set-breakpoint-in"></a> 197<p>When debugging C<tt>++</tt> programs, <code>rbreak</code> is useful for setting 198breakpoints on overloaded functions that are not members of any special 199classes. 200</p> 201<a name="index-set-breakpoints-on-all-functions"></a> 202<p>The <code>rbreak</code> command can be used to set breakpoints in 203<strong>all</strong> the functions in a program, like this: 204</p> 205<div class="smallexample"> 206<pre class="smallexample">(gdb) rbreak . 207</pre></div> 208 209</dd> 210<dt><code>rbreak <var>file</var>:<var>regex</var></code></dt> 211<dd><p>If <code>rbreak</code> is called with a filename qualification, it limits 212the search for functions matching the given regular expression to the 213specified <var>file</var>. This can be used, for example, to set breakpoints on 214every function in a given file: 215</p> 216<div class="smallexample"> 217<pre class="smallexample">(gdb) rbreak file.c:. 218</pre></div> 219 220<p>The colon separating the filename qualifier from the regex may 221optionally be surrounded by spaces. 222</p> 223<a name="index-info-breakpoints"></a> 224<a name="index-_0024_005f-and-info-breakpoints"></a> 225</dd> 226<dt><code>info breakpoints <span class="roman">[</span><var>list</var>…<span class="roman">]</span></code></dt> 227<dt><code>info break <span class="roman">[</span><var>list</var>…<span class="roman">]</span></code></dt> 228<dd><p>Print a table of all breakpoints, watchpoints, and catchpoints set and 229not deleted. Optional argument <var>n</var> means print information only 230about the specified breakpoint(s) (or watchpoint(s) or catchpoint(s)). 231For each breakpoint, following columns are printed: 232</p> 233<dl compact="compact"> 234<dt><em>Breakpoint Numbers</em></dt> 235<dt><em>Type</em></dt> 236<dd><p>Breakpoint, watchpoint, or catchpoint. 237</p></dd> 238<dt><em>Disposition</em></dt> 239<dd><p>Whether the breakpoint is marked to be disabled or deleted when hit. 240</p></dd> 241<dt><em>Enabled or Disabled</em></dt> 242<dd><p>Enabled breakpoints are marked with ‘<samp>y</samp>’. ‘<samp>n</samp>’ marks breakpoints 243that are not enabled. 244</p></dd> 245<dt><em>Address</em></dt> 246<dd><p>Where the breakpoint is in your program, as a memory address. For a 247pending breakpoint whose address is not yet known, this field will 248contain ‘<samp><PENDING></samp>’. Such breakpoint won’t fire until a shared 249library that has the symbol or line referred by breakpoint is loaded. 250See below for details. A breakpoint with several locations will 251have ‘<samp><MULTIPLE></samp>’ in this field—see below for details. 252</p></dd> 253<dt><em>What</em></dt> 254<dd><p>Where the breakpoint is in the source for your program, as a file and 255line number. For a pending breakpoint, the original string passed to 256the breakpoint command will be listed as it cannot be resolved until 257the appropriate shared library is loaded in the future. 258</p></dd> 259</dl> 260 261<p>If a breakpoint is conditional, there are two evaluation modes: “host” and 262“target”. If mode is “host”, breakpoint condition evaluation is done by 263<small>GDB</small> on the host’s side. If it is “target”, then the condition 264is evaluated by the target. The <code>info break</code> command shows 265the condition on the line following the affected breakpoint, together with 266its condition evaluation mode in between parentheses. 267</p> 268<p>Breakpoint commands, if any, are listed after that. A pending breakpoint is 269allowed to have a condition specified for it. The condition is not parsed for 270validity until a shared library is loaded that allows the pending 271breakpoint to resolve to a valid location. 272</p> 273<p><code>info break</code> with a breakpoint 274number <var>n</var> as argument lists only that breakpoint. The 275convenience variable <code>$_</code> and the default examining-address for 276the <code>x</code> command are set to the address of the last breakpoint 277listed (see <a href="Memory.html#Memory">Examining Memory</a>). 278</p> 279<p><code>info break</code> displays a count of the number of times the breakpoint 280has been hit. This is especially useful in conjunction with the 281<code>ignore</code> command. You can ignore a large number of breakpoint 282hits, look at the breakpoint info to see how many times the breakpoint 283was hit, and then run again, ignoring one less than that number. This 284will get you quickly to the last hit of that breakpoint. 285</p> 286<p>For a breakpoints with an enable count (xref) greater than 1, 287<code>info break</code> also displays that count. 288</p> 289</dd> 290</dl> 291 292<p><small>GDB</small> allows you to set any number of breakpoints at the same place in 293your program. There is nothing silly or meaningless about this. When 294the breakpoints are conditional, this is even useful 295(see <a href="Conditions.html#Conditions">Break Conditions</a>). 296</p> 297<a name="index-multiple-locations_002c-breakpoints"></a> 298<a name="index-breakpoints_002c-multiple-locations"></a> 299<p>It is possible that a breakpoint corresponds to several locations 300in your program. Examples of this situation are: 301</p> 302<ul> 303<li> Multiple functions in the program may have the same name. 304 305</li><li> For a C<tt>++</tt> constructor, the <small>GCC</small> compiler generates several 306instances of the function body, used in different cases. 307 308</li><li> For a C<tt>++</tt> template function, a given line in the function can 309correspond to any number of instantiations. 310 311</li><li> For an inlined function, a given source line can correspond to 312several places where that function is inlined. 313</li></ul> 314 315<p>In all those cases, <small>GDB</small> will insert a breakpoint at all 316the relevant locations. 317</p> 318<p>A breakpoint with multiple locations is displayed in the breakpoint 319table using several rows—one header row, followed by one row for 320each breakpoint location. The header row has ‘<samp><MULTIPLE></samp>’ in the 321address column. The rows for individual locations contain the actual 322addresses for locations, and show the functions to which those 323locations belong. The number column for a location is of the form 324<var>breakpoint-number</var>.<var>location-number</var>. 325</p> 326<p>For example: 327</p> 328<div class="smallexample"> 329<pre class="smallexample">Num Type Disp Enb Address What 3301 breakpoint keep y <MULTIPLE> 331 stop only if i==1 332 breakpoint already hit 1 time 3331.1 y 0x080486a2 in void foo<int>() at t.cc:8 3341.2 y 0x080486ca in void foo<double>() at t.cc:8 335</pre></div> 336 337<p>You cannot delete the individual locations from a breakpoint. However, 338each location can be individually enabled or disabled by passing 339<var>breakpoint-number</var>.<var>location-number</var> as argument to the 340<code>enable</code> and <code>disable</code> commands. It’s also possible to 341<code>enable</code> and <code>disable</code> a range of <var>location-number</var> 342locations using a <var>breakpoint-number</var> and two <var>location-number</var>s, 343in increasing order, separated by a hyphen, like 344<kbd><var>breakpoint-number</var>.<var>location-number1</var>-<var>location-number2</var></kbd>, 345in which case <small>GDB</small> acts on all the locations in the range (inclusive). 346Disabling or enabling the parent breakpoint (see <a href="Disabling.html#Disabling">Disabling</a>) affects 347all of the locations that belong to that breakpoint. 348</p> 349<a name="index-pending-breakpoints"></a> 350<p>It’s quite common to have a breakpoint inside a shared library. 351Shared libraries can be loaded and unloaded explicitly, 352and possibly repeatedly, as the program is executed. To support 353this use case, <small>GDB</small> updates breakpoint locations whenever 354any shared library is loaded or unloaded. Typically, you would 355set a breakpoint in a shared library at the beginning of your 356debugging session, when the library is not loaded, and when the 357symbols from the library are not available. When you try to set 358breakpoint, <small>GDB</small> will ask you if you want to set 359a so called <em>pending breakpoint</em>—breakpoint whose address 360is not yet resolved. 361</p> 362<p>After the program is run, whenever a new shared library is loaded, 363<small>GDB</small> reevaluates all the breakpoints. When a newly loaded 364shared library contains the symbol or line referred to by some 365pending breakpoint, that breakpoint is resolved and becomes an 366ordinary breakpoint. When a library is unloaded, all breakpoints 367that refer to its symbols or source lines become pending again. 368</p> 369<p>This logic works for breakpoints with multiple locations, too. For 370example, if you have a breakpoint in a C<tt>++</tt> template function, and 371a newly loaded shared library has an instantiation of that template, 372a new location is added to the list of locations for the breakpoint. 373</p> 374<p>Except for having unresolved address, pending breakpoints do not 375differ from regular breakpoints. You can set conditions or commands, 376enable and disable them and perform other breakpoint operations. 377</p> 378<p><small>GDB</small> provides some additional commands for controlling what 379happens when the ‘<samp>break</samp>’ command cannot resolve breakpoint 380address specification to an address: 381</p> 382<a name="index-set-breakpoint-pending"></a> 383<a name="index-show-breakpoint-pending"></a> 384<dl compact="compact"> 385<dt><code>set breakpoint pending auto</code></dt> 386<dd><p>This is the default behavior. When <small>GDB</small> cannot find the breakpoint 387location, it queries you whether a pending breakpoint should be created. 388</p> 389</dd> 390<dt><code>set breakpoint pending on</code></dt> 391<dd><p>This indicates that an unrecognized breakpoint location should automatically 392result in a pending breakpoint being created. 393</p> 394</dd> 395<dt><code>set breakpoint pending off</code></dt> 396<dd><p>This indicates that pending breakpoints are not to be created. Any 397unrecognized breakpoint location results in an error. This setting does 398not affect any pending breakpoints previously created. 399</p> 400</dd> 401<dt><code>show breakpoint pending</code></dt> 402<dd><p>Show the current behavior setting for creating pending breakpoints. 403</p></dd> 404</dl> 405 406<p>The settings above only affect the <code>break</code> command and its 407variants. Once breakpoint is set, it will be automatically updated 408as shared libraries are loaded and unloaded. 409</p> 410<a name="index-automatic-hardware-breakpoints"></a> 411<p>For some targets, <small>GDB</small> can automatically decide if hardware or 412software breakpoints should be used, depending on whether the 413breakpoint address is read-only or read-write. This applies to 414breakpoints set with the <code>break</code> command as well as to internal 415breakpoints set by commands like <code>next</code> and <code>finish</code>. For 416breakpoints set with <code>hbreak</code>, <small>GDB</small> will always use hardware 417breakpoints. 418</p> 419<p>You can control this automatic behaviour with the following commands: 420</p> 421<a name="index-set-breakpoint-auto_002dhw"></a> 422<a name="index-show-breakpoint-auto_002dhw"></a> 423<dl compact="compact"> 424<dt><code>set breakpoint auto-hw on</code></dt> 425<dd><p>This is the default behavior. When <small>GDB</small> sets a breakpoint, it 426will try to use the target memory map to decide if software or hardware 427breakpoint must be used. 428</p> 429</dd> 430<dt><code>set breakpoint auto-hw off</code></dt> 431<dd><p>This indicates <small>GDB</small> should not automatically select breakpoint 432type. If the target provides a memory map, <small>GDB</small> will warn when 433trying to set software breakpoint at a read-only address. 434</p></dd> 435</dl> 436 437<p><small>GDB</small> normally implements breakpoints by replacing the program code 438at the breakpoint address with a special instruction, which, when 439executed, given control to the debugger. By default, the program 440code is so modified only when the program is resumed. As soon as 441the program stops, <small>GDB</small> restores the original instructions. This 442behaviour guards against leaving breakpoints inserted in the 443target should gdb abrubptly disconnect. However, with slow remote 444targets, inserting and removing breakpoint can reduce the performance. 445This behavior can be controlled with the following commands:: 446</p> 447<a name="index-set-breakpoint-always_002dinserted"></a> 448<a name="index-show-breakpoint-always_002dinserted"></a> 449<dl compact="compact"> 450<dt><code>set breakpoint always-inserted off</code></dt> 451<dd><p>All breakpoints, including newly added by the user, are inserted in 452the target only when the target is resumed. All breakpoints are 453removed from the target when it stops. This is the default mode. 454</p> 455</dd> 456<dt><code>set breakpoint always-inserted on</code></dt> 457<dd><p>Causes all breakpoints to be inserted in the target at all times. If 458the user adds a new breakpoint, or changes an existing breakpoint, the 459breakpoints in the target are updated immediately. A breakpoint is 460removed from the target only when breakpoint itself is deleted. 461</p></dd> 462</dl> 463 464<p><small>GDB</small> handles conditional breakpoints by evaluating these conditions 465when a breakpoint breaks. If the condition is true, then the process being 466debugged stops, otherwise the process is resumed. 467</p> 468<p>If the target supports evaluating conditions on its end, <small>GDB</small> may 469download the breakpoint, together with its conditions, to it. 470</p> 471<p>This feature can be controlled via the following commands: 472</p> 473<a name="index-set-breakpoint-condition_002devaluation"></a> 474<a name="index-show-breakpoint-condition_002devaluation"></a> 475<dl compact="compact"> 476<dt><code>set breakpoint condition-evaluation host</code></dt> 477<dd><p>This option commands <small>GDB</small> to evaluate the breakpoint 478conditions on the host’s side. Unconditional breakpoints are sent to 479the target which in turn receives the triggers and reports them back to GDB 480for condition evaluation. This is the standard evaluation mode. 481</p> 482</dd> 483<dt><code>set breakpoint condition-evaluation target</code></dt> 484<dd><p>This option commands <small>GDB</small> to download breakpoint conditions 485to the target at the moment of their insertion. The target 486is responsible for evaluating the conditional expression and reporting 487breakpoint stop events back to <small>GDB</small> whenever the condition 488is true. Due to limitations of target-side evaluation, some conditions 489cannot be evaluated there, e.g., conditions that depend on local data 490that is only known to the host. Examples include 491conditional expressions involving convenience variables, complex types 492that cannot be handled by the agent expression parser and expressions 493that are too long to be sent over to the target, specially when the 494target is a remote system. In these cases, the conditions will be 495evaluated by <small>GDB</small>. 496</p> 497</dd> 498<dt><code>set breakpoint condition-evaluation auto</code></dt> 499<dd><p>This is the default mode. If the target supports evaluating breakpoint 500conditions on its end, <small>GDB</small> will download breakpoint conditions to 501the target (limitations mentioned previously apply). If the target does 502not support breakpoint condition evaluation, then <small>GDB</small> will fallback 503to evaluating all these conditions on the host’s side. 504</p></dd> 505</dl> 506 507 508<a name="index-negative-breakpoint-numbers"></a> 509<a name="index-internal-GDB-breakpoints"></a> 510<p><small>GDB</small> itself sometimes sets breakpoints in your program for 511special purposes, such as proper handling of <code>longjmp</code> (in C 512programs). These internal breakpoints are assigned negative numbers, 513starting with <code>-1</code>; ‘<samp>info breakpoints</samp>’ does not display them. 514You can see these breakpoints with the <small>GDB</small> maintenance command 515‘<samp>maint info breakpoints</samp>’ (see <a href="Maintenance-Commands.html#maint-info-breakpoints">maint info breakpoints</a>). 516</p> 517 518<hr> 519<div class="header"> 520<p> 521Next: <a href="Set-Watchpoints.html#Set-Watchpoints" accesskey="n" rel="next">Set Watchpoints</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> 522</div> 523 524 525 526</body> 527</html> 528