This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Multi-piece values and GDB values
- From: Jim Blandy <jimb at codesourcery dot com>
- To: gdb at sourceware dot org
- Date: Thu, 04 Jan 2007 14:00:26 -0800
- Subject: Re: Multi-piece values and GDB values
- References: <m3fyatf3rq.fsf@codesourcery.com>
Jim Blandy <jimb@codesourcery.com> writes:
> There is one special multi-piece case that GDB could support without
> much trouble: variables allocated to consecutive registers (in GDB's
> register numbering). GDB register lvalues simply refer to the value's
> starting offset in the register cache; if the value's type is larger
> than the register, later bytes simply refer to the next register.
> This accomodated GCC's long-standing treatment of 'long long' values
> described above. dwarf2_evaluate_loc_desc could recognize this case.
> But this is still not a general solution.
For the record: it's not so that register lvalues use a starting
offset into the register cache. Hasn't been so for years. Sorry.
Instead, we use a register number, and an offset from the start of
that register. But the overall point of the paragraph is still
correct, I think.