This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA] parse_frame_specification (stack.c)



> 
>           {
>             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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]