diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2017-03-03 12:58:24 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2017-03-03 12:58:24 -0500 |
commit | df97be551faa262732128493c8ac159ae4b7f6d3 (patch) | |
tree | 24658cc3fc30b74313cdaa81687bf36c629fd600 /gdb/remote.c | |
parent | 7d45f3df96ca108f6d7d0c5e4279e22b820145fa (diff) | |
download | gdb-df97be551faa262732128493c8ac159ae4b7f6d3.zip gdb-df97be551faa262732128493c8ac159ae4b7f6d3.tar.gz gdb-df97be551faa262732128493c8ac159ae4b7f6d3.tar.bz2 |
Use range-based for loop in remote_add_target_side_commands
gdb/ChangeLog:
* remote.c (remote_add_target_side_commands): Use range-based
for loop.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r-- | gdb/remote.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gdb/remote.c b/gdb/remote.c index 5da8319..2f34c4c 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -9690,10 +9690,8 @@ remote_add_target_side_commands (struct gdbarch *gdbarch, /* Concatenate all the agent expressions that are commands into the cmds parameter. */ - for (int ix = 0; ix < bp_tgt->tcommands.size (); ix++) + for (agent_expr *aexpr : bp_tgt->tcommands) { - struct agent_expr *aexpr = bp_tgt->tcommands[ix]; - sprintf (buf, "X%x,", aexpr->len); buf += strlen (buf); for (int i = 0; i < aexpr->len; ++i) |