diff --git a/gdb/NEWS b/gdb/NEWS index 64c48f6..94e54ca 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -20,6 +20,11 @@ ** New methods gdb.target_charset and gdb.target_wide_charset. +* Tracepoint actions were unified with breakpoint commands. In particular, +there are no longer differences in "info break" output for breakpoints and +tracepoints and the "commands" command can be used for both tracepoints and +regular breakpoints. + * New targets ARM Symbian arm*-*-symbianelf* diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 8d0977f..19707e8 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -744,10 +744,10 @@ breakpoint_set_commands (struct breakpoint *b, struct command_line *commands) { if (breakpoint_is_tracepoint (b)) { - /** We need to verify that each top-level element of commands - is valid for tracepoints, that there's at most one while-stepping - element, and that while-stepping's body has valid tracing commands - excluding nested while-stepping. */ + /* We need to verify that each top-level element of commands + is valid for tracepoints, that there's at most one while-stepping + element, and that while-stepping's body has valid tracing commands + excluding nested while-stepping. */ struct command_line *c; struct command_line *while_stepping = 0; for (c = commands; c; c = c->next) diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h index 3788b6e..3f194c6 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -1007,4 +1007,8 @@ extern VEC(breakpoint_p) *all_tracepoints (void); extern int breakpoint_is_tracepoint (const struct breakpoint *b); +/* Function that can be passed to read_command_line to validate + that each command is suitable for tracepoint command list. */ +extern void check_tracepoint_command (char *line, void *closure); + #endif /* !defined (BREAKPOINT_H) */ diff --git a/gdb/mi/mi-cmd-break.c b/gdb/mi/mi-cmd-break.c index 75dfd02..204565c 100644 --- a/gdb/mi/mi-cmd-break.c +++ b/gdb/mi/mi-cmd-break.c @@ -252,8 +252,6 @@ mi_cmd_break_commands (char *command, char **argv, int argc) int bnum; struct breakpoint *b; - extern void check_tracepoint_command (char *line, void *closure); - if (argc < 1) error ("USAGE: %s [ [...]]", command); diff --git a/gdb/testsuite/gdb.trace/while-stepping.exp b/gdb/testsuite/gdb.trace/while-stepping.exp index 6c156a1..7e422a5 100644 --- a/gdb/testsuite/gdb.trace/while-stepping.exp +++ b/gdb/testsuite/gdb.trace/while-stepping.exp @@ -74,13 +74,6 @@ gdb_test "info tracepoints" \ \[\t \]+while-stepping 12.*" \ "5.12: info trace shows \"while-stepping\"" - -#gdb_test "info tracepoints" \ -# "Num Type\[ \]+Disp Enb Address\[ \]+What.* -#.*while-stepping $stepcount.*" \ - - - # 5.13 step out of context while collecting local variable # [deferred to dynamic test section] diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 38f41b7..c713d7e 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -484,8 +484,6 @@ trace_actions_command (char *args, int from_tty) struct breakpoint *t; struct command_line *l; - extern void check_tracepoint_command (char *line, void *closure); - t = get_tracepoint_by_number (&args, 0, 1); if (t) {