[RFA] Constify find_condition_and_thread
Eli Zaretskii
eliz@gnu.org
Fri Mar 1 18:40:00 GMT 2013
> Date: Fri, 01 Mar 2013 10:18:37 -0800
> From: Keith Seitz <keiths@redhat.com>
>
> - expr = parse_exp_1 (&tok, pc, block_for_pc (pc), 0);
> + orig = copy = xstrdup (tok);
> + cleanup = make_cleanup (xfree, orig);
> + expr = parse_exp_1 (©, pc, block_for_pc (pc), 0);
> xfree (expr);
> + tok += copy - orig;
> + do_cleanups (cleanup);
If we really need this kind of dance, just to avoid explicit casts to
'char *', there should be a comment explaining why we do this.
Thanks.
More information about the Gdb-patches
mailing list