gdb/
authorPedro Alves <palves@redhat.com>
Fri, 26 Mar 2010 13:35:06 +0000 (13:35 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 26 Mar 2010 13:35:06 +0000 (13:35 +0000)
* 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.

gdb/ChangeLog
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/tracepoint.c

index 6dff895..5c015a5 100644 (file)
@@ -1,3 +1,8 @@
+2010-03-26  Pedro Alves  <pedro@codesourcery.com>
+
+       * tracepoint.c (parse_trace_status): Don't allow plain strings in
+       the terror description.  Don't expect an X prefix.
+
 2010-03-25  Stan Shebs  <stan@codesourcery.com>
 
        * tracepoint.h (trace_stop_reason): Add tracepoint_error.
index 69c2c0a..c15ff12 100644 (file)
@@ -1,3 +1,8 @@
+2010-03-26  Pedro Alves  <pedro@codesourcery.com>
+
+       * gdb.texinfo (Tracepoint Packets): Remove mention that
+       terror:string may be plain text, and drop mention of X prefix.
+
 2010-03-26  Vladimir Prus  <vladimir@codesourcery.com>
 
        * gdb.texinfo (GDB/MI Tracepoint Commands): Add comma after @xref.
index b11d3c0..4bef3f0 100644 (file)
@@ -31366,10 +31366,7 @@ The trace stopped because tracepoint @var{tpnum} exceeded its pass count.
 The trace stopped because tracepoint @var{tpnum} had an error.  The
 string @var{text} is available to describe the nature of the error
 (for instance, a divide by zero in the condition expression).
-@var{text} may take either of two forms; it may be plain text, but
-with the restriction that no colons or other special characters are
-allowed, or it may be an @code{X} followed by hex digits encoding the
-text string.
+@var{text} is hex encoded.
 
 @item tunknown:0
 The trace stopped for some other reason.
index 447682a..fc364f3 100644 (file)
@@ -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);