aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPedro Franco de Carvalho <pedromfc@linux.ibm.com>2018-08-06 16:24:55 -0300
committerPedro Franco de Carvalho <pedromfc@linux.ibm.com>2018-08-06 16:30:17 -0300
commitaa6f3694ce867884e43d1c0406c64df08ea24bd3 (patch)
tree3868f100041f38b5196d4a195ae087c01427e8a9 /gdb
parent05abfc39c719e740530000059bb963ad33462479 (diff)
downloadgdb-aa6f3694ce867884e43d1c0406c64df08ea24bd3.zip
gdb-aa6f3694ce867884e43d1c0406c64df08ea24bd3.tar.gz
gdb-aa6f3694ce867884e43d1c0406c64df08ea24bd3.tar.bz2
Remove trailing '-' from the last QTDP action packet
The has_more predicate in remote_target::download_tracepoint always evaluates to true, so the last action packet will be sent with a trailing '-'. This patch changes the predicate to remove the last trailing '-'. gdb/ChangeLog: 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com> * remote.c (remote_target::download_tracepoint): Fix the has_more predicate in the QTDP action list iteration.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/remote.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fda8d5f..9ec5669 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
+ * remote.c (remote_target::download_tracepoint): Fix the has_more
+ predicate in the QTDP action list iteration.
+
+2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
+
* remote.c (remote_target::download_tracepoint): Fix indentation
in for block.
diff --git a/gdb/remote.c b/gdb/remote.c
index 088efaa..e318092 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 */