This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] dwarf2expr.c: Prepare for eventual DW_OP_piece support
On Wed, Apr 23, 2003 at 06:13:52PM -0700, Kevin Buettner wrote:
> On Apr 23, 6:05pm, Kevin Buettner wrote:
>
> > ... prepares execute_stack_op() for eventual DW_OP_piece
> > support.
>
> I have a patch which adds _limited_ DW_OP_piece support. It finds the
> various "pieces" (all of which must be registers) in the location
> expression and then calls an architecture specific method to determine
> whether, given a single register number, gdb can reliably fetch the
> necessary pieces. The architecture dependent method simply checks to
> make sure that the register numbers (the pieces) are in the correct
> order and it returns the register number that must be used in order to
> properly fetch the pieces (or -1 if it can't be done).
>
> This support doesn't handle the interesting case of an object being
> split between a register and memory or even of the slightly less
> interesting case of non-contiguous registers, but it will be adequate
> for most DW_OP_piece expressions that gcc will emit in the near
> future. Anyway... given the limitations outlined above, is there
> interest in having me submit this patch?
Ah, sounds like our friend the e500. I think that you should submit
the patch, personally.
Note that we can make GCC emit more DW_OP_piece information in,
probably, a heartbeat or so. Once GDB's ready for it. The movement of
ctx->in_reg out of the loop is appropriate only for the limited
DW_OP_piece support you describe above; but it's in the loop for
exactly the reason of values split between registers and memory. In
order to support this locations need to become more complete objects.
I have a plan of attack, but no time.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer