aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2021-04-21 16:42:39 +0200
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2021-04-21 16:47:16 +0200
commit85c88e2a79973660719be21dbec920fe32f285c1 (patch)
tree2187cc4c28be962e8863b9816a5c0e40e28fa54e /gdb/breakpoint.c
parent047c3dbf5541b14a6fb562c2d847784f4b06de78 (diff)
downloadgdb-85c88e2a79973660719be21dbec920fe32f285c1.zip
gdb-85c88e2a79973660719be21dbec920fe32f285c1.tar.gz
gdb-85c88e2a79973660719be21dbec920fe32f285c1.tar.bz2
gdb/breakpoint: display "N" on MI for disabled-by-condition locations
For breakpoint locations that are disabled because of an invalid condition, CLI displays "N*" in the 'enabled' field, where '*' refers to the footnote below the table: (*): Breakpoint condition is invalid at this location. This is not necessary for MI, where we shall simply print "N" without the footnote. Update the document to mention the "N" value for the MI. Also remove the line about the 'enable' field, because there is no such field for locations. gdb/ChangeLog: 2021-04-21 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> * breakpoint.c (print_one_breakpoint_location): Display "N" for disabled-by-condition locations on MI-like output. (breakpoint_1): Do not display the disabled-by-condition footnote if the output is MI-like. gdb/doc/ChangeLog: 2021-04-21 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> * gdb.texinfo (GDB/MI Breakpoint Information): Update the description for the 'enabled' field of breakpoint locations.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 16cf797..0136019 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -6190,8 +6190,12 @@ print_one_breakpoint_location (struct breakpoint *b,
/* 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*"
+ uiout->field_string ("enabled", (loc->disabled_by_cond ? N
: (loc->enabled ? "y" : "n")));
else
uiout->field_fmt ("enabled", "%c", bpenables[(int) b->enable_state]);
@@ -6716,7 +6720,7 @@ breakpoint_1 (const char *bp_num_list, bool show_internal,
if (last_loc && !server_command)
set_next_address (last_loc->gdbarch, last_loc->address);
- if (has_disabled_by_cond_location)
+ if (has_disabled_by_cond_location && !uiout->is_mi_like_p ())
uiout->message (_("(*): Breakpoint condition is invalid at this "
"location.\n"));
}