This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] parse_frame_specification (stack.c)
- To: David Taylor <taylor at cygnus dot com>
- Subject: Re: [RFA] parse_frame_specification (stack.c)
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 07 Feb 2001 23:09:13 -0800
- Cc: gdb-patches at sourceware dot cygnus dot com
- References: <200102061915.OAA00445@texas.cygnus.com>
>
> {
> tmp_cleanup = make_cleanup (xfree, addr_string);
> +
> + if (numargs == 0)
> + level = parse_and_eval_long (addr_string);
> +
> args[numargs++] = parse_and_eval_address (addr_string);
> do_cleanups (tmp_cleanup);
> }
I think this should call parse_and_eval() and then call value_as_long()
/ value_as_pointer(). The code shouldn't be evaluating the expression
twice.
Also, level should be a longest to value_as_long().
Andrew