This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/3] Adjust Value.location for lval_register
- 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:51:30 +0100 (CET)
- Subject: Re: [PATCH 2/3] Adjust Value.location for lval_register
- Authentication-results: sourceware.org; auth=none
Yao Qi wrote:
> + /* Register number. */
> + short regnum;
Now this is no longer space-constrained (the location union is two pointers
in size anyway), so this can just be an "int" like regnums are elsewhere.
> + /* Frame ID of "next" frame to which a register value is relative.
> + If the register value is found relative to frame F, then the
> + frame id of F->next will be stored in next_frame_id. */
> + struct frame_id next_frame_id;
> + } reg;
> /* Describes offset of a value within lval of a structure in target
> addressable memory units. If lval == lval_memory, this is an offset to
> - the address. If lval == lval_register, this is a further offset from
> - location.address within the registers structure. Note also the member
> - embedded_offset below. */
> + the address. Note also the member embedded_offset below. */
> LONGEST offset;
Hmm, I think we recently had the discussion that *any* values should allow
using an offset. The comment should probably reflect this.
Otherwise, this looks good to me.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com