From 2f7fb8e4c8d23a52f0ca284beeebc248aa63baaf Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Sat, 6 Aug 2011 14:13:49 +0000 Subject: [PATCH] gdb/ * cp-name-parser.y (xfree): Wrap the name free by CONCAT2. (main): Uncomment "Demangling error\n". --- gdb/ChangeLog | 5 +++++ gdb/cp-name-parser.y | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4215c45..bfc049a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2011-08-06 Jan Kratochvil + + * cp-name-parser.y (xfree): Wrap the name free by CONCAT2. + (main): Uncomment "Demangling error\n". + 2011-08-05 Paul Pluzhnikov * solib-target.c (segment_attributes): Make them static. diff --git a/gdb/cp-name-parser.y b/gdb/cp-name-parser.y index 8736777..286bbb4 100644 --- a/gdb/cp-name-parser.y +++ b/gdb/cp-name-parser.y @@ -2042,7 +2042,10 @@ void 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 @@ main (int argc, char **argv) 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 -- 2.7.4