aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index d26f9a5..d041288 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -9533,12 +9533,18 @@ remote_trace_find (enum trace_find_type type, int num,
switch (*reply)
{
case 'F':
- if ((target_frameno = (int) strtol (++reply, &reply, 16)) == -1)
- error (_("Target failed to find requested trace frame."));
+ p = ++reply;
+ target_frameno = (int) strtol (p, &reply, 16);
+ if (reply == p)
+ error (_("Unable to parse trace frame number"));
+ if (target_frameno == -1)
+ return -1;
break;
case 'T':
- if ((target_tracept = (int) strtol (++reply, &reply, 16)) == -1)
- error (_("Target failed to find requested trace frame."));
+ p = ++reply;
+ target_tracept = (int) strtol (p, &reply, 16);
+ if (reply == p)
+ error (_("Unable to parse tracepoint number"));
break;
case 'O': /* "OK"? */
if (reply[1] == 'K' && reply[2] == '\0')