*** Changes since GDB 12
+* "info breakpoints" now displays enabled breakpoint locations of
+ disabled breakpoints as in the "y-" state. For example:
+
+ (gdb) info breakpoints
+ Num Type Disp Enb Address What
+ 1 breakpoint keep n <MULTIPLE>
+ 1.1 y- 0x00000000000011b6 in ...
+ 1.2 y- 0x00000000000011c2 in ...
+ 1.3 n 0x00000000000011ce in ...
+
* Support for Thread Local Storage (TLS) variables on FreeBSD arm and
aarch64 architectures.
/* 4 */
annotate_field (3);
- /* For locations that are disabled because of an invalid condition,
- display "N*" on CLI, where "*" refers to a footnote below the
- table. For MI, simply display a "N" without a footnote. */
- const char *N = (uiout->is_mi_like_p ()) ? "N" : "N*";
if (part_of_multiple)
- uiout->field_string ("enabled", (loc->disabled_by_cond ? N
- : (loc->enabled ? "y" : "n")));
+ {
+ /* For locations that are disabled because of an invalid
+ condition, display "N*" on the CLI, where "*" refers to a
+ footnote below the table. For MI, simply display a "N"
+ without a footnote. On the CLI, for enabled locations whose
+ breakpoint is disabled, display "y-". */
+ auto get_enable_state = [uiout, loc] () -> const char *
+ {
+ if (uiout->is_mi_like_p ())
+ {
+ if (loc->disabled_by_cond)
+ return "N";
+ else if (!loc->enabled)
+ return "n";
+ else
+ return "y";
+ }
+ else
+ {
+ if (loc->disabled_by_cond)
+ return "N*";
+ else if (!loc->enabled)
+ return "n";
+ else if (!breakpoint_enabled (loc->owner))
+ return "y-";
+ else
+ return "y";
+ }
+ };
+ uiout->field_string ("enabled", get_enable_state ());
+ }
else
uiout->field_fmt ("enabled", "%c", bpenables[(int) b->enable_state]);
Disabling or enabling the parent breakpoint (@pxref{Disabling}) affects
all of the locations that belong to that breakpoint.
+Locations that are enabled while their parent breakpoint is disabled
+won't trigger a break, and are denoted by @code{y-} in the @code{Enb}
+column. For example:
+
+@smallexample
+(@value{GDBP}) info breakpoints
+Num Type Disp Enb Address What
+1 breakpoint keep n <MULTIPLE>
+1.1 y- 0x00000000000011b6 in ...
+1.2 y- 0x00000000000011c2 in ...
+1.3 n 0x00000000000011ce in ...
+@end smallexample
+
@cindex pending breakpoints
It's quite common to have a breakpoint inside a shared library.
Shared libraries can be loaded and unloaded explicitly,
"1${ws}breakpoint keep ${b1}${ws}.* in marker\\(\\) at .*" \
"${ws}breakpoint already hit 1 time.*" \
"2${ws}breakpoint${ws}keep${ws}${b2}${ws}<MULTIPLE>.*" \
- "2.1${ws}${b21}.*" \
- "2.2${ws}${b22}.*" \
- "2.3${ws}${b23}.*" \
- "2.4${ws}${b24}.*" \
+ "2.1${ws}${b21}${ws}.*" \
+ "2.2${ws}${b22}${ws}.*" \
+ "2.3${ws}${b23}${ws}.*" \
+ "2.4${ws}${b24}${ws}.*" \
]
}
test_enable_disable "disable 1" n y y y y y
test_enable_disable "enable 1" y y y y y y
-# Check that we can disable/disable a breakpoint with multiple
+# Check that we can disable/enable a breakpoint with multiple
# locations.
-test_enable_disable "disable 2" y n y y y y
-test_enable_disable "enable 2" y y y y y y
+test_enable_disable "disable 2" y n y- y- y- y-
+test_enable_disable "enable 2" y y y y y y
-# Check that we can disable/disable a range of breakpoints.
-test_enable_disable "disable 1-2" n n y y y y
-test_enable_disable "enable 1-2" y y y y y y
+# Check that we can disable/enable a range of breakpoints.
+test_enable_disable "disable 1-2" n n y- y- y- y-
+test_enable_disable "enable 1-2" y y y y y y
-# Check that we can disable/disable a list of breakpoints.
-test_enable_disable "disable 1 2" n n y y y y
-test_enable_disable "enable 1 2" y y y y y y
+# Check that we can disable/enable a list of breakpoints.
+test_enable_disable "disable 1 2" n n y- y- y- y-
+test_enable_disable "enable 1 2" y y y y y y
# Check that we can disable/enable a single location breakpoint.
test_enable_disable "disable 2.2" y y y n y y
test_enable_disable "disable 2.2-2" y y y n y y
test_enable_disable "enable 2.2-2" y y y y y y
-# Check that we can disable/disable a list of breakpoints that
+# Check that we can disable/enable a list of breakpoints that
# includes some elements with location ranges and others without.
test_enable_disable "disable 1 2.1 2.3-4" n y n y n n
test_enable_disable "enable 1 2.1 2.3-4" y y y y y y