diff options
author | Tom Tromey <tromey@redhat.com> | 2011-03-10 18:33:59 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2011-03-10 18:33:59 +0000 |
commit | 197f0a605dde6bdc173692d9a8272940263ac108 (patch) | |
tree | 643b953d725128e11acd5e0c741576ed4bb7dbcc /gdb/printcmd.c | |
parent | 5652b4915ceb5be161b5735d68ff7909a33a7db3 (diff) | |
download | gdb-197f0a605dde6bdc173692d9a8272940263ac108.zip gdb-197f0a605dde6bdc173692d9a8272940263ac108.tar.gz gdb-197f0a605dde6bdc173692d9a8272940263ac108.tar.bz2 |
* tracepoint.c (trace_actions_command): Update.
* thread.c (thread_apply_command): Update.
* reverse.c (delete_bookmark_command): Update.
(bookmarks_info): Update.
* printcmd.c (undisplay_command): Update.
* memattr.c (mem_enable_command): Update.
(mem_disable_command): Update.
(mem_delete_command): Update.
* inferior.c (detach_inferior_command): Update.
(kill_inferior_command): Update.
(remove_inferior_command): Update.
* cli/cli-utils.h (struct get_number_or_range_state): New.
(init_number_or_range): Declare.
(get_number_or_range): Update.
* cli/cli-utils.c (init_number_or_range): New function.
(get_number_or_range): Change 'pp' parameter to 'state'. Remove
static variables.
(number_is_in_list): Update.
* breakpoint.h (get_tracepoint_by_number): Update.
* breakpoint.c (map_breakpoint_numbers): Update for change to
get_number_or_range.
(find_location_by_number): Use get_number, not
get_number_or_range.
(trace_pass_set_count): New function.
(trace_pass_command): Update for change to get_number_or_range.
Rework loop logic.
(get_tracepoint_by_number): Remove 'multi_p' parameter; add
'state' parameter.
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r-- | gdb/printcmd.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 12249a0..efc89cf 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -1589,9 +1589,8 @@ delete_display (struct display *display) static void undisplay_command (char *args, int from_tty) { - char *p = args; - char *p1; int num; + struct get_number_or_range_state state; if (args == 0) { @@ -1601,11 +1600,12 @@ undisplay_command (char *args, int from_tty) return; } - while (*p) + init_number_or_range (&state, args); + while (!state.finished) { - p1 = p; + char *p = state.string; - num = get_number_or_range (&p1); + num = get_number_or_range (&state); if (num == 0) warning (_("bad display number at or near '%s'"), p); else @@ -1620,8 +1620,6 @@ undisplay_command (char *args, int from_tty) else delete_display (d); } - - p = p1; } dont_repeat (); } |