This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/3] Move computed value's frame id to piece_closure
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: qiyaoltc at gmail dot com (Yao Qi)
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 25 Nov 2016 12:48:36 +0100 (CET)
- Subject: Re: [PATCH 1/3] Move computed value's frame id to piece_closure
- Authentication-results: sourceware.org; auth=none
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