mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 18:08:24 +08:00
Use range-based for loop in remote_add_target_side_condition
Using a range based for loop makes this code a bit more clean and readable. The comment above is clearly erroneous, so I've updated it. gdb/ChangeLog: * remote.c (remote_add_target_side_condition): Use range-based for loop. Update comment.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
|
||||||
|
|
||||||
|
* remote.c (remote_add_target_side_condition): Use range-based
|
||||||
|
for loop. Update comment.
|
||||||
|
|
||||||
2017-02-27 Yao Qi <yao.qi@linaro.org>
|
2017-02-27 Yao Qi <yao.qi@linaro.org>
|
||||||
|
|
||||||
* f-typeprint.c (f_print_type): Check "varstring" is empty first.
|
* f-typeprint.c (f_print_type): Check "varstring" is empty first.
|
||||||
|
@ -9664,11 +9664,9 @@ remote_add_target_side_condition (struct gdbarch *gdbarch,
|
|||||||
xsnprintf (buf, buf_end - buf, "%s", ";");
|
xsnprintf (buf, buf_end - buf, "%s", ";");
|
||||||
buf++;
|
buf++;
|
||||||
|
|
||||||
/* Send conditions to the target and free the vector. */
|
/* Send conditions to the target. */
|
||||||
for (int ix = 0; ix < bp_tgt->conditions.size (); ix++)
|
for (struct agent_expr *aexpr : bp_tgt->conditions)
|
||||||
{
|
{
|
||||||
struct agent_expr *aexpr = bp_tgt->conditions[ix];
|
|
||||||
|
|
||||||
xsnprintf (buf, buf_end - buf, "X%x,", aexpr->len);
|
xsnprintf (buf, buf_end - buf, "X%x,", aexpr->len);
|
||||||
buf += strlen (buf);
|
buf += strlen (buf);
|
||||||
for (int i = 0; i < aexpr->len; ++i)
|
for (int i = 0; i < aexpr->len; ++i)
|
||||||
|
Reference in New Issue
Block a user