aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index 419ebf9..ef6c54e 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -9623,10 +9623,7 @@ remote_add_target_side_condition (struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt, char *buf,
char *buf_end)
{
- struct agent_expr *aexpr = NULL;
- int i, ix;
-
- if (VEC_empty (agent_expr_p, bp_tgt->conditions))
+ if (bp_tgt->conditions.empty ())
return 0;
buf += strlen (buf);
@@ -9634,13 +9631,13 @@ remote_add_target_side_condition (struct gdbarch *gdbarch,
buf++;
/* Send conditions to the target and free the vector. */
- for (ix = 0;
- VEC_iterate (agent_expr_p, bp_tgt->conditions, ix, aexpr);
- ix++)
+ for (int ix = 0; ix < bp_tgt->conditions.size (); ix++)
{
+ struct agent_expr *aexpr = bp_tgt->conditions[ix];
+
xsnprintf (buf, buf_end - buf, "X%x,", aexpr->len);
buf += strlen (buf);
- for (i = 0; i < aexpr->len; ++i)
+ for (int i = 0; i < aexpr->len; ++i)
buf = pack_hex_byte (buf, aexpr->buf[i]);
*buf = '\0';
}
@@ -9651,10 +9648,7 @@ static void
remote_add_target_side_commands (struct gdbarch *gdbarch,
struct bp_target_info *bp_tgt, char *buf)
{
- struct agent_expr *aexpr = NULL;
- int i, ix;
-
- if (VEC_empty (agent_expr_p, bp_tgt->tcommands))
+ if (bp_tgt->tcommands.empty ())
return;
buf += strlen (buf);
@@ -9664,13 +9658,13 @@ remote_add_target_side_commands (struct gdbarch *gdbarch,
/* Concatenate all the agent expressions that are commands into the
cmds parameter. */
- for (ix = 0;
- VEC_iterate (agent_expr_p, bp_tgt->tcommands, ix, aexpr);
- ix++)
+ for (int ix = 0; ix < bp_tgt->tcommands.size (); ix++)
{
+ struct agent_expr *aexpr = bp_tgt->tcommands[ix];
+
sprintf (buf, "X%x,", aexpr->len);
buf += strlen (buf);
- for (i = 0; i < aexpr->len; ++i)
+ for (int i = 0; i < aexpr->len; ++i)
buf = pack_hex_byte (buf, aexpr->buf[i]);
*buf = '\0';
}
@@ -9735,7 +9729,7 @@ remote_insert_breakpoint (struct target_ops *ops,
/* If this breakpoint has target-side commands but this stub doesn't
support Z0 packets, throw error. */
- if (!VEC_empty (agent_expr_p, bp_tgt->tcommands))
+ if (!bp_tgt->tcommands.empty ())
throw_error (NOT_SUPPORTED_ERROR, _("\
Target doesn't support breakpoints that have target side commands."));