forked from Imagelibrary/binutils-gdb
2010-04-04 Stan Shebs <stan@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com> * breakpoint.c (breakpoint_1): Add filter argument, return number of breakpoints printed. (is_hardware_watchpoint): Make argument const. (is_watchpoint): Ditto. (is_tracepoint): Merge of tracepoint_type and breakpoint_is_tracepoint, use it everywhere. (breakpoints_info): Pass NULL to breakpoint_1. (maintenance_info_breakpoints): Ditto. (watchpoints_info): New function. (tracepoints_info): Use breakpoint_1 filter. (set_ignore_count): Warn that tracepoint ignore count will be ignored. (_initialize_breakpoint): Make "info watchpoints" its own command. * breakpoint.h (is_tracepoint): Rename from breakpoint_is_tracepoint. * mi/mi-cmd-break.c (mi_cmd_break_commands): Use is_tracepoint. * gdb.texinfo (Setting Breakpoints): "info watch" no longer a synonym. (Setting Watchpoints): Update description of "info watch". (Disabling Breakpoints): Only "info break" lists all. * gdb.base/completion.exp: Update for new "info watchpoints". * gdb.base/default.exp: Ditto. * gdb.base/help.exp: Ditto. * gdb.base/watchpoint.exp: Ditto. * gdb.trace/infotrace.exp: Update "info tracpoints" output.
This commit is contained in:
@@ -1,3 +1,21 @@
|
|||||||
|
2010-04-04 Stan Shebs <stan@codesourcery.com>
|
||||||
|
Nathan Sidwell <nathan@codesourcery.com>
|
||||||
|
|
||||||
|
* breakpoint.c (breakpoint_1): Add filter argument, return number of
|
||||||
|
breakpoints printed.
|
||||||
|
(is_hardware_watchpoint): Make argument const.
|
||||||
|
(is_watchpoint): Ditto.
|
||||||
|
(is_tracepoint): Merge of tracepoint_type and breakpoint_is_tracepoint,
|
||||||
|
use it everywhere.
|
||||||
|
(breakpoints_info): Pass NULL to breakpoint_1.
|
||||||
|
(maintenance_info_breakpoints): Ditto.
|
||||||
|
(watchpoints_info): New function.
|
||||||
|
(tracepoints_info): Use breakpoint_1 filter.
|
||||||
|
(set_ignore_count): Warn that tracepoint ignore count will be ignored.
|
||||||
|
(_initialize_breakpoint): Make "info watchpoints" its own command.
|
||||||
|
* breakpoint.h (is_tracepoint): Rename from breakpoint_is_tracepoint.
|
||||||
|
* mi/mi-cmd-break.c (mi_cmd_break_commands): Use is_tracepoint.
|
||||||
|
|
||||||
2010-04-04 Stan Shebs <stan@codesourcery.com>
|
2010-04-04 Stan Shebs <stan@codesourcery.com>
|
||||||
|
|
||||||
* tracepoint.c (tfile_fetch_registers): Add fallback case.
|
* tracepoint.c (tfile_fetch_registers): Add fallback case.
|
||||||
|
|||||||
148
gdb/breakpoint.c
148
gdb/breakpoint.c
@@ -130,7 +130,9 @@ static int watchpoint_locations_match (struct bp_location *loc1,
|
|||||||
|
|
||||||
static void breakpoints_info (char *, int);
|
static void breakpoints_info (char *, int);
|
||||||
|
|
||||||
static void breakpoint_1 (int, int);
|
static void watchpoints_info (char *, int);
|
||||||
|
|
||||||
|
static int breakpoint_1 (int, int, int (*) (const struct breakpoint *));
|
||||||
|
|
||||||
static bpstat bpstat_alloc (const struct bp_location *, bpstat);
|
static bpstat bpstat_alloc (const struct bp_location *, bpstat);
|
||||||
|
|
||||||
@@ -204,9 +206,9 @@ static void update_global_location_list (int);
|
|||||||
|
|
||||||
static void update_global_location_list_nothrow (int);
|
static void update_global_location_list_nothrow (int);
|
||||||
|
|
||||||
static int is_hardware_watchpoint (struct breakpoint *bpt);
|
static int is_hardware_watchpoint (const struct breakpoint *bpt);
|
||||||
|
|
||||||
static int is_watchpoint (struct breakpoint *bpt);
|
static int is_watchpoint (const struct breakpoint *bpt);
|
||||||
|
|
||||||
static void insert_breakpoint_locations (void);
|
static void insert_breakpoint_locations (void);
|
||||||
|
|
||||||
@@ -366,7 +368,7 @@ static int overlay_events_enabled;
|
|||||||
|
|
||||||
#define ALL_TRACEPOINTS(B) \
|
#define ALL_TRACEPOINTS(B) \
|
||||||
for (B = breakpoint_chain; B; B = B->next) \
|
for (B = breakpoint_chain; B; B = B->next) \
|
||||||
if (tracepoint_type (B))
|
if (is_tracepoint (B))
|
||||||
|
|
||||||
/* Chains of all breakpoints defined. */
|
/* Chains of all breakpoints defined. */
|
||||||
|
|
||||||
@@ -464,14 +466,6 @@ clear_breakpoint_hit_counts (void)
|
|||||||
b->hit_count = 0;
|
b->hit_count = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Encapsulate tests for different types of tracepoints. */
|
|
||||||
|
|
||||||
static int
|
|
||||||
tracepoint_type (const struct breakpoint *b)
|
|
||||||
{
|
|
||||||
return (b->type == bp_tracepoint || b->type == bp_fast_tracepoint);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Allocate a new counted_command_line with reference count of 1.
|
/* Allocate a new counted_command_line with reference count of 1.
|
||||||
The new structure owns COMMANDS. */
|
The new structure owns COMMANDS. */
|
||||||
|
|
||||||
@@ -817,18 +811,12 @@ check_no_tracepoint_commands (struct command_line *commands)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
/* Encapsulate tests for different types of tracepoints. */
|
||||||
breakpoint_is_tracepoint (const struct breakpoint *b)
|
|
||||||
{
|
|
||||||
switch (b->type)
|
|
||||||
{
|
|
||||||
case bp_tracepoint:
|
|
||||||
case bp_fast_tracepoint:
|
|
||||||
return 1;
|
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
}
|
int
|
||||||
|
is_tracepoint (const struct breakpoint *b)
|
||||||
|
{
|
||||||
|
return (b->type == bp_tracepoint || b->type == bp_fast_tracepoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* A helper function that validsates that COMMANDS are valid for a
|
/* A helper function that validsates that COMMANDS are valid for a
|
||||||
@@ -839,7 +827,7 @@ static void
|
|||||||
validate_commands_for_breakpoint (struct breakpoint *b,
|
validate_commands_for_breakpoint (struct breakpoint *b,
|
||||||
struct command_line *commands)
|
struct command_line *commands)
|
||||||
{
|
{
|
||||||
if (breakpoint_is_tracepoint (b))
|
if (is_tracepoint (b))
|
||||||
{
|
{
|
||||||
/* We need to verify that each top-level element of commands
|
/* We need to verify that each top-level element of commands
|
||||||
is valid for tracepoints, that there's at most one while-stepping
|
is valid for tracepoints, that there's at most one while-stepping
|
||||||
@@ -949,7 +937,7 @@ do_map_commands_command (struct breakpoint *b, void *data)
|
|||||||
|
|
||||||
l = read_command_lines (str,
|
l = read_command_lines (str,
|
||||||
info->from_tty, 1,
|
info->from_tty, 1,
|
||||||
(breakpoint_is_tracepoint (b)
|
(is_tracepoint (b)
|
||||||
? check_tracepoint_command : 0),
|
? check_tracepoint_command : 0),
|
||||||
b);
|
b);
|
||||||
|
|
||||||
@@ -1175,7 +1163,7 @@ insert_catchpoint (struct ui_out *uo, void *args)
|
|||||||
/* Return true if BPT is of any hardware watchpoint kind. */
|
/* Return true if BPT is of any hardware watchpoint kind. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
is_hardware_watchpoint (struct breakpoint *bpt)
|
is_hardware_watchpoint (const struct breakpoint *bpt)
|
||||||
{
|
{
|
||||||
return (bpt->type == bp_hardware_watchpoint
|
return (bpt->type == bp_hardware_watchpoint
|
||||||
|| bpt->type == bp_read_watchpoint
|
|| bpt->type == bp_read_watchpoint
|
||||||
@@ -1186,7 +1174,7 @@ is_hardware_watchpoint (struct breakpoint *bpt)
|
|||||||
software. */
|
software. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
is_watchpoint (struct breakpoint *bpt)
|
is_watchpoint (const struct breakpoint *bpt)
|
||||||
{
|
{
|
||||||
return (is_hardware_watchpoint (bpt)
|
return (is_hardware_watchpoint (bpt)
|
||||||
|| bpt->type == bp_watchpoint);
|
|| bpt->type == bp_watchpoint);
|
||||||
@@ -1589,7 +1577,7 @@ should_be_inserted (struct bp_location *bpt)
|
|||||||
|
|
||||||
/* Tracepoints are inserted by the target at a time of its choosing,
|
/* Tracepoints are inserted by the target at a time of its choosing,
|
||||||
not by us. */
|
not by us. */
|
||||||
if (tracepoint_type (bpt->owner))
|
if (is_tracepoint (bpt->owner))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
@@ -3703,7 +3691,7 @@ bpstat_check_location (const struct bp_location *bl,
|
|||||||
|
|
||||||
/* By definition, the inferior does not report stops at
|
/* By definition, the inferior does not report stops at
|
||||||
tracepoints. */
|
tracepoints. */
|
||||||
if (tracepoint_type (b))
|
if (is_tracepoint (b))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (b->type != bp_watchpoint
|
if (b->type != bp_watchpoint
|
||||||
@@ -4758,7 +4746,7 @@ print_one_breakpoint_location (struct breakpoint *b,
|
|||||||
because the condition is an internal implementation detail
|
because the condition is an internal implementation detail
|
||||||
that we do not want to expose to the user. */
|
that we do not want to expose to the user. */
|
||||||
annotate_field (7);
|
annotate_field (7);
|
||||||
if (tracepoint_type (b))
|
if (is_tracepoint (b))
|
||||||
ui_out_text (uiout, "\ttrace only if ");
|
ui_out_text (uiout, "\ttrace only if ");
|
||||||
else
|
else
|
||||||
ui_out_text (uiout, "\tstop only if ");
|
ui_out_text (uiout, "\tstop only if ");
|
||||||
@@ -4938,7 +4926,7 @@ user_settable_breakpoint (const struct breakpoint *b)
|
|||||||
return (b->type == bp_breakpoint
|
return (b->type == bp_breakpoint
|
||||||
|| b->type == bp_catchpoint
|
|| b->type == bp_catchpoint
|
||||||
|| b->type == bp_hardware_breakpoint
|
|| b->type == bp_hardware_breakpoint
|
||||||
|| tracepoint_type (b)
|
|| is_tracepoint (b)
|
||||||
|| b->type == bp_watchpoint
|
|| b->type == bp_watchpoint
|
||||||
|| b->type == bp_read_watchpoint
|
|| b->type == bp_read_watchpoint
|
||||||
|| b->type == bp_access_watchpoint
|
|| b->type == bp_access_watchpoint
|
||||||
@@ -4946,11 +4934,14 @@ user_settable_breakpoint (const struct breakpoint *b)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Print information on user settable breakpoint (watchpoint, etc)
|
/* Print information on user settable breakpoint (watchpoint, etc)
|
||||||
number BNUM. If BNUM is -1 print all user settable breakpoints.
|
number BNUM. If BNUM is -1 print all user-settable breakpoints.
|
||||||
If ALLFLAG is non-zero, include non- user settable breakpoints. */
|
If ALLFLAG is non-zero, include non-user-settable breakpoints. If
|
||||||
|
FILTER is non-NULL, call it on each breakpoint and only include the
|
||||||
|
ones for which it returns non-zero. Return the total number of
|
||||||
|
breakpoints listed. */
|
||||||
|
|
||||||
static void
|
static int
|
||||||
breakpoint_1 (int bnum, int allflag)
|
breakpoint_1 (int bnum, int allflag, int (*filter) (const struct breakpoint *))
|
||||||
{
|
{
|
||||||
struct breakpoint *b;
|
struct breakpoint *b;
|
||||||
struct bp_location *last_loc = NULL;
|
struct bp_location *last_loc = NULL;
|
||||||
@@ -4968,6 +4959,10 @@ breakpoint_1 (int bnum, int allflag)
|
|||||||
if (bnum == -1
|
if (bnum == -1
|
||||||
|| bnum == b->number)
|
|| bnum == b->number)
|
||||||
{
|
{
|
||||||
|
/* If we have a filter, only list the breakpoints it accepts. */
|
||||||
|
if (filter && !filter (b))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (allflag || user_settable_breakpoint (b))
|
if (allflag || user_settable_breakpoint (b))
|
||||||
{
|
{
|
||||||
int addr_bit = breakpoint_address_bits (b);
|
int addr_bit = breakpoint_address_bits (b);
|
||||||
@@ -5023,6 +5018,10 @@ breakpoint_1 (int bnum, int allflag)
|
|||||||
if (bnum == -1
|
if (bnum == -1
|
||||||
|| bnum == b->number)
|
|| bnum == b->number)
|
||||||
{
|
{
|
||||||
|
/* If we have a filter, only list the breakpoints it accepts. */
|
||||||
|
if (filter && !filter (b))
|
||||||
|
continue;
|
||||||
|
|
||||||
/* We only print out user settable breakpoints unless the
|
/* We only print out user settable breakpoints unless the
|
||||||
allflag is set. */
|
allflag is set. */
|
||||||
if (allflag || user_settable_breakpoint (b))
|
if (allflag || user_settable_breakpoint (b))
|
||||||
@@ -5033,6 +5032,9 @@ breakpoint_1 (int bnum, int allflag)
|
|||||||
do_cleanups (bkpttbl_chain);
|
do_cleanups (bkpttbl_chain);
|
||||||
|
|
||||||
if (nr_printable_breakpoints == 0)
|
if (nr_printable_breakpoints == 0)
|
||||||
|
{
|
||||||
|
/* If there's a filter, let the caller decide how to report empty list. */
|
||||||
|
if (!filter)
|
||||||
{
|
{
|
||||||
if (bnum == -1)
|
if (bnum == -1)
|
||||||
ui_out_message (uiout, 0, "No breakpoints or watchpoints.\n");
|
ui_out_message (uiout, 0, "No breakpoints or watchpoints.\n");
|
||||||
@@ -5040,6 +5042,7 @@ breakpoint_1 (int bnum, int allflag)
|
|||||||
ui_out_message (uiout, 0, "No breakpoint or watchpoint number %d.\n",
|
ui_out_message (uiout, 0, "No breakpoint or watchpoint number %d.\n",
|
||||||
bnum);
|
bnum);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (last_loc && !server_command)
|
if (last_loc && !server_command)
|
||||||
@@ -5049,6 +5052,8 @@ breakpoint_1 (int bnum, int allflag)
|
|||||||
/* FIXME? Should this be moved up so that it is only called when
|
/* FIXME? Should this be moved up so that it is only called when
|
||||||
there have been breakpoints? */
|
there have been breakpoints? */
|
||||||
annotate_breakpoints_table_end ();
|
annotate_breakpoints_table_end ();
|
||||||
|
|
||||||
|
return nr_printable_breakpoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -5059,7 +5064,26 @@ breakpoints_info (char *bnum_exp, int from_tty)
|
|||||||
if (bnum_exp)
|
if (bnum_exp)
|
||||||
bnum = parse_and_eval_long (bnum_exp);
|
bnum = parse_and_eval_long (bnum_exp);
|
||||||
|
|
||||||
breakpoint_1 (bnum, 0);
|
breakpoint_1 (bnum, 0, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
watchpoints_info (char *wpnum_exp, int from_tty)
|
||||||
|
{
|
||||||
|
int wpnum = -1, num_printed;
|
||||||
|
|
||||||
|
if (wpnum_exp)
|
||||||
|
wpnum = parse_and_eval_long (wpnum_exp);
|
||||||
|
|
||||||
|
num_printed = breakpoint_1 (wpnum, 0, is_watchpoint);
|
||||||
|
|
||||||
|
if (num_printed == 0)
|
||||||
|
{
|
||||||
|
if (wpnum == -1)
|
||||||
|
ui_out_message (uiout, 0, "No watchpoints.\n");
|
||||||
|
else
|
||||||
|
ui_out_message (uiout, 0, "No watchpoint number %d.\n", wpnum);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -5070,7 +5094,7 @@ maintenance_info_breakpoints (char *bnum_exp, int from_tty)
|
|||||||
if (bnum_exp)
|
if (bnum_exp)
|
||||||
bnum = parse_and_eval_long (bnum_exp);
|
bnum = parse_and_eval_long (bnum_exp);
|
||||||
|
|
||||||
breakpoint_1 (bnum, 1);
|
breakpoint_1 (bnum, 1, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -5399,7 +5423,7 @@ set_breakpoint_location_function (struct bp_location *loc)
|
|||||||
{
|
{
|
||||||
if (loc->owner->type == bp_breakpoint
|
if (loc->owner->type == bp_breakpoint
|
||||||
|| loc->owner->type == bp_hardware_breakpoint
|
|| loc->owner->type == bp_hardware_breakpoint
|
||||||
|| tracepoint_type (loc->owner))
|
|| is_tracepoint (loc->owner))
|
||||||
{
|
{
|
||||||
find_pc_partial_function (loc->address, &(loc->function_name),
|
find_pc_partial_function (loc->address, &(loc->function_name),
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
@@ -5686,7 +5710,7 @@ disable_breakpoints_in_shlibs (void)
|
|||||||
if (((b->type == bp_breakpoint)
|
if (((b->type == bp_breakpoint)
|
||||||
|| (b->type == bp_jit_event)
|
|| (b->type == bp_jit_event)
|
||||||
|| (b->type == bp_hardware_breakpoint)
|
|| (b->type == bp_hardware_breakpoint)
|
||||||
|| (tracepoint_type (b)))
|
|| (is_tracepoint (b)))
|
||||||
&& loc->pspace == current_program_space
|
&& loc->pspace == current_program_space
|
||||||
&& !loc->shlib_disabled
|
&& !loc->shlib_disabled
|
||||||
#ifdef PC_SOLIB
|
#ifdef PC_SOLIB
|
||||||
@@ -9042,7 +9066,7 @@ update_global_location_list (int should_insert)
|
|||||||
|| !loc->enabled
|
|| !loc->enabled
|
||||||
|| loc->shlib_disabled
|
|| loc->shlib_disabled
|
||||||
|| !breakpoint_address_is_meaningful (b)
|
|| !breakpoint_address_is_meaningful (b)
|
||||||
|| tracepoint_type (b))
|
|| is_tracepoint (b))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Permanent breakpoint should always be inserted. */
|
/* Permanent breakpoint should always be inserted. */
|
||||||
@@ -9702,6 +9726,14 @@ set_ignore_count (int bptnum, int count, int from_tty)
|
|||||||
ALL_BREAKPOINTS (b)
|
ALL_BREAKPOINTS (b)
|
||||||
if (b->number == bptnum)
|
if (b->number == bptnum)
|
||||||
{
|
{
|
||||||
|
if (is_tracepoint (b))
|
||||||
|
{
|
||||||
|
if (from_tty && count != 0)
|
||||||
|
printf_filtered (_("Ignore count ignored for tracepoint %d."),
|
||||||
|
bptnum);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
b->ignore_count = count;
|
b->ignore_count = count;
|
||||||
if (from_tty)
|
if (from_tty)
|
||||||
{
|
{
|
||||||
@@ -10421,31 +10453,22 @@ create_tracepoint_from_upload (struct uploaded_tp *utp)
|
|||||||
static void
|
static void
|
||||||
tracepoints_info (char *tpnum_exp, int from_tty)
|
tracepoints_info (char *tpnum_exp, int from_tty)
|
||||||
{
|
{
|
||||||
struct breakpoint *b;
|
int tpnum = -1, num_printed;
|
||||||
int tps_to_list = 0;
|
|
||||||
|
|
||||||
/* In the no-arguments case, say "No tracepoints" if none found. */
|
if (tpnum_exp)
|
||||||
if (tpnum_exp == 0)
|
tpnum = parse_and_eval_long (tpnum_exp);
|
||||||
{
|
|
||||||
ALL_TRACEPOINTS (b)
|
num_printed = breakpoint_1 (tpnum, 0, is_tracepoint);
|
||||||
{
|
|
||||||
if (b->number >= 0)
|
if (num_printed == 0)
|
||||||
{
|
|
||||||
tps_to_list = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!tps_to_list)
|
|
||||||
{
|
{
|
||||||
|
if (tpnum == -1)
|
||||||
ui_out_message (uiout, 0, "No tracepoints.\n");
|
ui_out_message (uiout, 0, "No tracepoints.\n");
|
||||||
return;
|
else
|
||||||
|
ui_out_message (uiout, 0, "No tracepoint number %d.\n", tpnum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Otherwise be the same as "info break". */
|
|
||||||
breakpoints_info (tpnum_exp, from_tty);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The 'enable trace' command enables tracepoints.
|
/* The 'enable trace' command enables tracepoints.
|
||||||
Not supported by all targets. */
|
Not supported by all targets. */
|
||||||
static void
|
static void
|
||||||
@@ -10492,7 +10515,7 @@ delete_trace_command (char *arg, int from_tty)
|
|||||||
{
|
{
|
||||||
ALL_BREAKPOINTS_SAFE (b, temp)
|
ALL_BREAKPOINTS_SAFE (b, temp)
|
||||||
{
|
{
|
||||||
if (tracepoint_type (b)
|
if (is_tracepoint (b)
|
||||||
&& b->number >= 0)
|
&& b->number >= 0)
|
||||||
delete_breakpoint (b);
|
delete_breakpoint (b);
|
||||||
}
|
}
|
||||||
@@ -11134,8 +11157,9 @@ A watchpoint stops execution of your program whenever the value of\n\
|
|||||||
an expression is either read or written."));
|
an expression is either read or written."));
|
||||||
set_cmd_completer (c, expression_completer);
|
set_cmd_completer (c, expression_completer);
|
||||||
|
|
||||||
add_info ("watchpoints", breakpoints_info,
|
add_info ("watchpoints", watchpoints_info, _("\
|
||||||
_("Synonym for ``info breakpoints''."));
|
Status of watchpoints, or watchpoint number NUMBER."));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* XXX: cagney/2005-02-23: This should be a boolean, and should
|
/* XXX: cagney/2005-02-23: This should be a boolean, and should
|
||||||
|
|||||||
@@ -1030,7 +1030,7 @@ extern struct breakpoint *get_tracepoint_by_number (char **arg, int multi_p,
|
|||||||
is newly allocated; the caller should free when done with it. */
|
is newly allocated; the caller should free when done with it. */
|
||||||
extern VEC(breakpoint_p) *all_tracepoints (void);
|
extern VEC(breakpoint_p) *all_tracepoints (void);
|
||||||
|
|
||||||
extern int breakpoint_is_tracepoint (const struct breakpoint *b);
|
extern int is_tracepoint (const struct breakpoint *b);
|
||||||
|
|
||||||
/* Function that can be passed to read_command_line to validate
|
/* Function that can be passed to read_command_line to validate
|
||||||
that each command is suitable for tracepoint command list. */
|
that each command is suitable for tracepoint command list. */
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
2010-04-04 Stan Shebs <stan@codesourcery.com>
|
2010-04-04 Stan Shebs <stan@codesourcery.com>
|
||||||
|
|
||||||
|
* gdb.texinfo (Setting Breakpoints): "info watch" no longer a synonym.
|
||||||
|
(Setting Watchpoints): Update description of "info watch".
|
||||||
|
(Disabling Breakpoints): Only "info break" lists all.
|
||||||
|
|
||||||
* gdb.texinfo (Tracepoint Restrictions): Document PC inference.
|
* gdb.texinfo (Tracepoint Restrictions): Document PC inference.
|
||||||
(tdump): Explain how tdump works.
|
(tdump): Explain how tdump works.
|
||||||
|
|
||||||
|
|||||||
@@ -3388,7 +3388,6 @@ The @code{rbreak} command can be used to set breakpoints in
|
|||||||
@cindex @code{$_} and @code{info breakpoints}
|
@cindex @code{$_} and @code{info breakpoints}
|
||||||
@item info breakpoints @r{[}@var{n}@r{]}
|
@item info breakpoints @r{[}@var{n}@r{]}
|
||||||
@itemx info break @r{[}@var{n}@r{]}
|
@itemx info break @r{[}@var{n}@r{]}
|
||||||
@itemx info watchpoints @r{[}@var{n}@r{]}
|
|
||||||
Print a table of all breakpoints, watchpoints, and catchpoints set and
|
Print a table of all breakpoints, watchpoints, and catchpoints set and
|
||||||
not deleted. Optional argument @var{n} means print information only
|
not deleted. Optional argument @var{n} means print information only
|
||||||
about the specified breakpoint (or watchpoint or catchpoint). For
|
about the specified breakpoint (or watchpoint or catchpoint). For
|
||||||
@@ -3705,8 +3704,8 @@ or written into by the program.
|
|||||||
|
|
||||||
@kindex info watchpoints @r{[}@var{n}@r{]}
|
@kindex info watchpoints @r{[}@var{n}@r{]}
|
||||||
@item info watchpoints
|
@item info watchpoints
|
||||||
This command prints a list of watchpoints, breakpoints, and catchpoints;
|
This command prints a list of watchpoints, using the same format as
|
||||||
it is the same as @code{info break} (@pxref{Set Breaks}).
|
@code{info break} (@pxref{Set Breaks}).
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@value{GDBN} sets a @dfn{hardware watchpoint} if possible. Hardware
|
@value{GDBN} sets a @dfn{hardware watchpoint} if possible. Hardware
|
||||||
@@ -4135,10 +4134,10 @@ it had been deleted, but remembers the information on the breakpoint so
|
|||||||
that you can @dfn{enable} it again later.
|
that you can @dfn{enable} it again later.
|
||||||
|
|
||||||
You disable and enable breakpoints, watchpoints, and catchpoints with
|
You disable and enable breakpoints, watchpoints, and catchpoints with
|
||||||
the @code{enable} and @code{disable} commands, optionally specifying one
|
the @code{enable} and @code{disable} commands, optionally specifying
|
||||||
or more breakpoint numbers as arguments. Use @code{info break} or
|
one or more breakpoint numbers as arguments. Use @code{info break} to
|
||||||
@code{info watch} to print a list of breakpoints, watchpoints, and
|
print a list of all breakpoints, watchpoints, and catchpoints if you
|
||||||
catchpoints if you do not know which numbers to use.
|
do not know which numbers to use.
|
||||||
|
|
||||||
Disabling and enabling a breakpoint that has multiple locations
|
Disabling and enabling a breakpoint that has multiple locations
|
||||||
affects all of its locations.
|
affects all of its locations.
|
||||||
|
|||||||
@@ -303,7 +303,7 @@ mi_cmd_break_commands (char *command, char **argv, int argc)
|
|||||||
mi_command_line_array_ptr = 1;
|
mi_command_line_array_ptr = 1;
|
||||||
mi_command_line_array_cnt = argc;
|
mi_command_line_array_cnt = argc;
|
||||||
|
|
||||||
if (breakpoint_is_tracepoint (b))
|
if (is_tracepoint (b))
|
||||||
break_command = read_command_lines_1 (mi_read_next_line, 1,
|
break_command = read_command_lines_1 (mi_read_next_line, 1,
|
||||||
check_tracepoint_command, b);
|
check_tracepoint_command, b);
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
|
2010-04-04 Stan Shebs <stan@codesourcery.com>
|
||||||
|
|
||||||
|
* gdb.base/completion.exp: Update for new "info watchpoints".
|
||||||
|
* gdb.base/default.exp: Ditto.
|
||||||
|
* gdb.base/help.exp: Ditto.
|
||||||
|
* gdb.base/watchpoint.exp: Ditto.
|
||||||
|
* gdb.trace/infotrace.exp: Update "info tracpoints" output.
|
||||||
|
|
||||||
2010-04-04 Stan Shebs <stan@codesourcery.com>
|
2010-04-04 Stan Shebs <stan@codesourcery.com>
|
||||||
|
|
||||||
* gdb.trace/tfile.exp: Sharpen tfind test.
|
* gdb.trace/tfile.exp: Sharpen tfind test.
|
||||||
|
|||||||
@@ -354,7 +354,7 @@ gdb_expect {
|
|||||||
-re "^help info watchpoints $"\
|
-re "^help info watchpoints $"\
|
||||||
{ send_gdb "\n"
|
{ send_gdb "\n"
|
||||||
gdb_expect {
|
gdb_expect {
|
||||||
-re "Synonym for .*\r\n.*$gdb_prompt $"\
|
-re "Status of watchpoints, .*\r\n.*$gdb_prompt $"\
|
||||||
{ pass "complete help info wat" }
|
{ pass "complete help info wat" }
|
||||||
-re ".*$gdb_prompt $" { fail "complete help info wat"}
|
-re ".*$gdb_prompt $" { fail "complete help info wat"}
|
||||||
timeout {fail "(timeout) complete help info wat"}
|
timeout {fail "(timeout) complete help info wat"}
|
||||||
|
|||||||
@@ -353,7 +353,7 @@ gdb_test "info vector" "The program has no registers now." "info vector"
|
|||||||
#test info warranty
|
#test info warranty
|
||||||
gdb_test "info warranty" "15. *Disclaimer of Warranty.*" "info warranty"
|
gdb_test "info warranty" "15. *Disclaimer of Warranty.*" "info warranty"
|
||||||
#test info watchpoints
|
#test info watchpoints
|
||||||
gdb_test "info watchpoints" "No breakpoints or watchpoints." "info watchpoints"
|
gdb_test "info watchpoints" "No watchpoints." "info watchpoints"
|
||||||
#test inspect
|
#test inspect
|
||||||
gdb_test "inspect" "The history is empty." "inspect"
|
gdb_test "inspect" "The history is empty." "inspect"
|
||||||
#test jump
|
#test jump
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ gdb_test "help info variables" "All global and static variable names, or those m
|
|||||||
# test help info warranty
|
# test help info warranty
|
||||||
gdb_test "help info warranty" "Various kinds of warranty you do not have\." "help info warranty"
|
gdb_test "help info warranty" "Various kinds of warranty you do not have\." "help info warranty"
|
||||||
# test help info watchpoints
|
# test help info watchpoints
|
||||||
gdb_test "help info watchpoints" "Synonym for ``info breakpoints''\." "help info watchpoints"
|
gdb_test "help info watchpoints" "Status of watchpoints, or watchpoint number NUMBER\." "help info watchpoints"
|
||||||
# test help inspect
|
# test help inspect
|
||||||
gdb_test "help inspect" "Same as \"print\" command, except that if you are running in the epoch\[\r\n\]+environment, the value is printed in its own window\." "help inspect"
|
gdb_test "help inspect" "Same as \"print\" command, except that if you are running in the epoch\[\r\n\]+environment, the value is printed in its own window\." "help inspect"
|
||||||
# test help jump
|
# test help jump
|
||||||
|
|||||||
@@ -102,9 +102,7 @@ proc initialize {} {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# "info watch" is the same as "info break"
|
if [gdb_test "info watch" "3\[ \]*.*watchpoint.*ival3" "watchpoint found in watchpoint/breakpoint table" ] {
|
||||||
|
|
||||||
if [gdb_test "info watch" "1\[ \]*breakpoint.*marker1.*\r\n2\[ \]*breakpoint.*marker2.*\r\n3\[ \]*.*watchpoint.*ival3" "watchpoint found in watchpoint/breakpoint table" ] {
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -176,11 +174,9 @@ proc test_simple_watchpoint {} {
|
|||||||
|
|
||||||
set wp_set 1
|
set wp_set 1
|
||||||
|
|
||||||
# "info watch" is the same as "info break"
|
|
||||||
|
|
||||||
send_gdb "info watch\n"
|
send_gdb "info watch\n"
|
||||||
gdb_expect {
|
gdb_expect {
|
||||||
-re "1\[ \]*breakpoint.*marker1.*\r\n2\[ \]*breakpoint.*marker2.*\r\n3\[ \]*.*watchpoint.*ival3\r\n$gdb_prompt $" {
|
-re "3\[ \]*.*watchpoint.*ival3\r\n$gdb_prompt $" {
|
||||||
pass "watchpoint found in watchpoint/breakpoint table"
|
pass "watchpoint found in watchpoint/breakpoint table"
|
||||||
}
|
}
|
||||||
-re ".*$gdb_prompt $" {
|
-re ".*$gdb_prompt $" {
|
||||||
@@ -297,7 +293,7 @@ proc test_disabling_watchpoints {} {
|
|||||||
global hex
|
global hex
|
||||||
|
|
||||||
# "info watch" is the same as "info break"
|
# "info watch" is the same as "info break"
|
||||||
gdb_test "info watch" "\[0-9\]+\[ \]*breakpoint.*marker1.*\r\n\[0-9\]+\[ \]*breakpoint.*marker2.*\r\n\[0-9]+\[ \]*.*watchpoint.*ival3\r\n\.*\[0-9\]+ times.*" "watchpoints found in watchpoint/breakpoint table"
|
gdb_test "info watch" "\[0-9]+\[ \]*.*watchpoint.*ival3\r\n\.*\[0-9\]+ times.*" "watchpoints found in watchpoint/breakpoint table"
|
||||||
|
|
||||||
# Ensure that the watchpoint is disabled when we startup.
|
# Ensure that the watchpoint is disabled when we startup.
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ gdb_test "info tracepoint $asm_test_num" \
|
|||||||
|
|
||||||
# 2.3 info tracepoint (invalid tracepoint number)
|
# 2.3 info tracepoint (invalid tracepoint number)
|
||||||
gdb_test "info tracepoint [expr $c_test_num + $asm_test_num]" \
|
gdb_test "info tracepoint [expr $c_test_num + $asm_test_num]" \
|
||||||
"No breakpoint or watchpoint number [expr $c_test_num + $asm_test_num]." \
|
"No tracepoint number [expr $c_test_num + $asm_test_num]." \
|
||||||
"2.3: info tracepoint (invalid tracepoint number)"
|
"2.3: info tracepoint (invalid tracepoint number)"
|
||||||
|
|
||||||
# 2.4 info tracepoints (list of numbers)
|
# 2.4 info tracepoints (list of numbers)
|
||||||
|
|||||||
Reference in New Issue
Block a user