aboutsummaryrefslogtreecommitdiff
path: root/gdb/tracepoint.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2010-03-26 13:35:06 +0000
committerPedro Alves <palves@redhat.com>2010-03-26 13:35:06 +0000
commit99b5e152aad13580d6a3b7feda87ad40de7ec7d2 (patch)
treef4c6acd111b2737048b988544f688b44ca069ab3 /gdb/tracepoint.c
parentddfd679590d5e2555cc7a5d80696d82b1839016a (diff)
downloadfsf-binutils-gdb-99b5e152aad13580d6a3b7feda87ad40de7ec7d2.zip
fsf-binutils-gdb-99b5e152aad13580d6a3b7feda87ad40de7ec7d2.tar.gz
fsf-binutils-gdb-99b5e152aad13580d6a3b7feda87ad40de7ec7d2.tar.bz2
gdb/
* tracepoint.c (parse_trace_status): Don't allow plain strings in the terror description. Don't expect an X prefix. gdb/doc/ * gdb.texinfo (Tracepoint Packets): Remove mention that terror:string may be plain text, and drop mention of X prefix.
Diffstat (limited to 'gdb/tracepoint.c')
-rw-r--r--gdb/tracepoint.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 447682a..fc364f3 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -3197,18 +3197,9 @@ Status line: '%s'\n"), p, line);
if (p2 != p1)
{
int end;
- ts->error_desc = (char *) xmalloc (p2 - p1 + 1);
- /* See if we're doing plain text or hex encoding. */
- if (*p1 == 'X')
- {
- ++p1;
- end = hex2bin (p1, ts->error_desc, (p2 - p1) / 2);
- }
- else
- {
- memcpy (ts->error_desc, p1, p2 - p1);
- end = p2 - p1;
- }
+
+ ts->error_desc = xmalloc ((p2 - p1) / 2 + 1);
+ end = hex2bin (p1, ts->error_desc, (p2 - p1) / 2);
ts->error_desc[end] = '\0';
}
p = unpack_varlen_hex (++p2, &val);