This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [PATCH 1/3] Move computed value's frame id to piece_closure


Yao Qi wrote:

> +  if (frame == NULL)
> +    c->frame_id = null_frame_id;
> +  else
> +    c->frame_id = get_frame_id (get_next_frame_sentinel_okay (frame));
[...]
> +	    struct frame_info *frame
> +	      = frame_find_by_id (get_prev_frame_id_by_id (c->frame_id));

I guess now that this is a separate field, there's no longer a reason
to go via next-frame / prev-frame here.  It looks like this was introduced
when VALUE_FRAME_ID was changed to VALUE_NEXT_FRAME_ID, but this isn't
really necessary for the piece logic here.  I think this can simply be:

    c->frame_id = get_frame_id (frame);
[...]
	    struct frame_info *frame = frame_find_by_id (c->frame_id);

instead.

Otherwise, this looks good to me.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com


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