diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fda8d5f3ab3..9ec56690736 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2018-08-06 Pedro Franco de Carvalho + + * remote.c (remote_target::download_tracepoint): Fix the has_more + predicate in the QTDP action list iteration. + 2018-08-06 Pedro Franco de Carvalho * remote.c (remote_target::download_tracepoint): Fix indentation diff --git a/gdb/remote.c b/gdb/remote.c index 088efaad12c..e3180923ee6 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -12932,7 +12932,7 @@ remote_target::download_tracepoint (struct bp_location *loc) { QUIT; /* Allow user to bail out with ^C. */ - bool has_more = (action_it != tdp_actions.end () + bool has_more = ((action_it + 1) != tdp_actions.end () || !stepping_actions.empty ()); xsnprintf (buf, BUF_SIZE, "QTDP:-%x:%s:%s%c", @@ -12951,7 +12951,7 @@ remote_target::download_tracepoint (struct bp_location *loc) QUIT; /* Allow user to bail out with ^C. */ bool is_first = action_it == stepping_actions.begin (); - bool has_more = action_it != stepping_actions.end (); + bool has_more = (action_it + 1) != stepping_actions.end (); xsnprintf (buf, BUF_SIZE, "QTDP:-%x:%s:%s%s%s", b->number, addrbuf, /* address */