[patch] Make test-cp-name-parser usable

Jan Kratochvil jan.kratochvil@redhat.com
Sat Aug 6 14:15:00 GMT 2011


On Fri, 05 Aug 2011 22:18:50 +0200, Daniel Jacobowitz wrote:
> Thanks!  I appreciate it.  You might want an explanatory comment, this
> looks sufficiently odd.  It's OK with me either way.

Checked in with the comment.


Thanks,
Jan


http://sourceware.org/ml/gdb-cvs/2011-08/msg00036.html

--- src/gdb/ChangeLog	2011/08/05 16:38:34	1.13256
+++ src/gdb/ChangeLog	2011/08/06 14:13:48	1.13257
@@ -1,3 +1,8 @@
+2011-08-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* cp-name-parser.y (xfree): Wrap the name free by CONCAT2.
+	(main): Uncomment "Demangling error\n".
+
 2011-08-05  Paul Pluzhnikov  <ppluzhnikov@google.com>
 
 	* solib-target.c (segment_attributes): Make them static.
--- src/gdb/cp-name-parser.y	2011/03/18 13:51:41	1.20
+++ src/gdb/cp-name-parser.y	2011/08/06 14:13:49	1.21
@@ -2042,7 +2042,10 @@
 xfree (void *ptr)
 {
   if (ptr != NULL)
-    free (ptr);
+    {
+      /* Literal `free' would get translated back to xfree again.  */
+      CONCAT2 (fr,ee) (ptr);
+    }
 }
 
 int
@@ -2071,7 +2074,7 @@
 	str2 = cplus_demangle (buf, DMGL_PARAMS | DMGL_ANSI | DMGL_VERBOSE);
 	if (str2 == NULL)
 	  {
-	    /* printf ("Demangling error\n"); */
+	    printf ("Demangling error\n");
 	    if (c)
 	      printf ("%s%c%s\n", buf, c, extra_chars);
 	    else



More information about the Gdb-patches mailing list