From: Pedro Alves <palves@redhat.com>
To: Keith Seitz <keiths@redhat.com>
Cc: "gdb-patches@sourceware.org ml" <gdb-patches@sourceware.org>
Subject: Re: [RFA] "constify" parse_exp_1
Date: Fri, 08 Mar 2013 00:22:00 -0000 [thread overview]
Message-ID: <51392F3F.5090102@redhat.com> (raw)
In-Reply-To: <51392C56.7040302@redhat.com>
On 03/08/2013 12:09 AM, Keith Seitz wrote:
> --- ada-lang.c 5 Mar 2013 21:15:34 -0000 1.394
> +++ ada-lang.c 7 Mar 2013 22:59:29 -0000
> @@ -4057,13 +4057,14 @@ ada_read_renaming_var_value (struct symb
> struct block *block)
> {
> char *sym_name;
> + const char *sname;
> struct expression *expr;
> struct value *value;
> struct cleanup *old_chain = NULL;
>
> - sym_name = xstrdup (SYMBOL_LINKAGE_NAME (renaming_sym));
> + sname = sym_name = xstrdup (SYMBOL_LINKAGE_NAME (renaming_sym));
> old_chain = make_cleanup (xfree, sym_name);
> - expr = parse_exp_1 (&sym_name, 0, block, 0);
> + expr = parse_exp_1 (&sname, 0, block, 0);
> make_cleanup (free_current_contents, &expr);
> value = evaluate_expression (expr);
>
I didn't get past the first hunk in the patch. :-)
The xstrdup seemed to be there _because_ parse_exp_1
changed the input string. It seems it can be removed now.
Your patch seems to make sym_name unused, even. There may be
more instances of this in the patch. /me off to bed. :-)
--
Pedro Alves
next prev parent reply other threads:[~2013-03-08 0:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-08 0:12 Keith Seitz
2013-03-08 0:22 ` Pedro Alves [this message]
2013-03-08 1:02 ` Keith Seitz
2013-03-08 12:27 ` Pedro Alves
2013-03-08 13:55 ` Pedro Alves
2013-03-09 1:00 ` Pedro Alves
2013-03-09 1:04 ` Keith Seitz
2013-03-11 22:09 ` Keith Seitz
2013-03-12 10:18 ` Pedro Alves
2013-03-12 17:40 ` Keith Seitz
2013-03-08 14:54 ` Tom Tromey
2013-03-11 16:50 ` Keith Seitz
2013-03-11 18:30 ` Tom Tromey
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=51392F3F.5090102@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=keiths@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