aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>2010-04-06 17:47:40 +0000
committerStan Shebs <shebs@codesourcery.com>2010-04-06 17:47:40 +0000
commit3149d8c1150e24222c6c41e2c0fdde42f202d750 (patch)
treec5b828d10249cebf688eb64c3b23a4e72207d23a /gdb/breakpoint.c
parent4cc23edeb96576c3bea1a99c32cb9c83c471ac17 (diff)
downloadgdb-3149d8c1150e24222c6c41e2c0fdde42f202d750.zip
gdb-3149d8c1150e24222c6c41e2c0fdde42f202d750.tar.gz
gdb-3149d8c1150e24222c6c41e2c0fdde42f202d750.tar.bz2
2010-04-06 Stan Shebs <stan@codesourcery.com>
* defs.h (char_ptr): Move typedef here from... * ada-lang.c (char_ptr): Remove. * charset.c (char_ptr): Remove. * tracepoint.h (struct uploaded_string): Remove. (struct uploaded_tp): Use vectors for string arrays. * tracepoint.c (trace_save): Use vectors of actions. (parse_tracepoint_definition): Ditto. (get_uploaded_tp): Clear vectors. * breakpoint.c (create_tracepoint_from_upload): Use vectors. (next_cmd): Change to an int. (read_next_cmd): Use vector of command strings.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 36a28f6..c1c8b97 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -10348,18 +10348,16 @@ ftrace_command (char *arg, int from_tty)
list that was acquired during tracepoint uploading. */
static struct uploaded_tp *this_utp;
-static struct uploaded_string *next_cmd;
+static int next_cmd;
static char *
read_uploaded_action (void)
{
char *rslt;
- if (!next_cmd)
- return NULL;
+ VEC_iterate (char_ptr, this_utp->cmd_strings, next_cmd, rslt);
- rslt = next_cmd->str;
- next_cmd = next_cmd->next;
+ next_cmd++;
return rslt;
}
@@ -10425,18 +10423,19 @@ create_tracepoint_from_upload (struct uploaded_tp *utp)
special-purpose "reader" function and call the usual command line
reader, then pass the result to the breakpoint command-setting
function. */
- if (utp->cmd_strings)
+ if (!VEC_empty (char_ptr, utp->cmd_strings))
{
struct command_line *cmd_list;
this_utp = utp;
- next_cmd = utp->cmd_strings;
+ next_cmd = 0;
cmd_list = read_command_lines_1 (read_uploaded_action, 1, NULL, NULL);
breakpoint_set_commands (tp, cmd_list);
}
- else if (utp->numactions > 0 || utp->num_step_actions > 0)
+ else if (!VEC_empty (char_ptr, utp->actions)
+ || !VEC_empty (char_ptr, utp->step_actions))
warning (_("Uploaded tracepoint %d actions have no source form, ignoring them"),
utp->number);