From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Daniel Jacobowitz <drow@false.org>, gdb-patches@sourceware.org
Subject: Re: [patch] Make test-cp-name-parser usable
Date: Thu, 04 Aug 2011 09:51:00 -0000 [thread overview]
Message-ID: <20110804095121.GA4486@host1.jankratochvil.net> (raw)
In-Reply-To: <m38vra1aez.fsf@fleche.redhat.com>
On Wed, 03 Aug 2011 22:56:36 +0200, Tom Tromey wrote:
> >>>>> "Daniel" == Daniel Jacobowitz <drow@false.org> writes:
> Daniel> What does the translation - is it as simple as #undef free or
> Daniel> (free) (ptr)?
>
> A sed script in the .y.c rule in gdb/Makefile.
-e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
-e 's/\([ \t;,(]\)free$$/\1xfree/g' \
If it is a concern patched it differently.
I will check it in if no comments appear.
Thanks,
Jan
gdb/
2011-08-02 Jan Kratochvil <jan.kratochvil@redhat.com>
* cp-name-parser.y (xfree): Wrap the name free by CONCAT2.
(main): Uncomment "Demangling error\n".
--- a/gdb/cp-name-parser.y
+++ b/gdb/cp-name-parser.y
@@ -2042,7 +2042,7 @@ void
xfree (void *ptr)
{
if (ptr != NULL)
- free (ptr);
+ CONCAT2 (fr,ee) (ptr);
}
int
@@ -2071,7 +2071,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
next prev parent reply other threads:[~2011-08-04 9:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-02 17:02 Jan Kratochvil
2011-08-03 20:37 ` Daniel Jacobowitz
2011-08-03 20:56 ` Tom Tromey
2011-08-04 9:51 ` Jan Kratochvil [this message]
2011-08-05 20:19 ` Daniel Jacobowitz
2011-08-06 14:15 ` Jan Kratochvil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110804095121.GA4486@host1.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox