Re: interface to partial support for DW_OP_piece in dwarf2expr.[ch]

Mark Kettenis
2004-08-05T09:54:01Z

From: Jim Blandy <jimb@redhat.com>
Date: 04 Aug 2004 18:14:41 -0500

> > The next step is to have something that will recognize when a series
> > of pieces is actually a reference to a single register --- presumably
> > one that GDB has a number for, but one that Dwarf only has numbers for
> > pieces of. That needs to be an arch method that recognizes the cases
> > that can be simplified, and passes on the cases it can't handle. This
> > will address all the current uses of DW_OP_piece, I believe.

So we'll have to *temporary* add an arch method to several targets,
and then remove it again when we fix things properly? I don't think
that's a good idea.

It seems worthwhile to me, because it will allow GDB to work
correctly, assignments and all, in the cases where the current value
structures can handle it, and it's very little work. At some point,
resources will materialize to do the larger project, but what's the
harm in getting the best behavior we can out of the current structures
until then?

The harm is introducing hacks that are very hard to remove in the
feature. GDB is full of such hacks, and apart from Andrew nobody
seems to actively work on trying to remove these. We really don't
need any more of them.

Mark