Re: [rfc][00/37] Eliminate builtin_type_ macros

Ulrich Weigand
2008-09-02T22:02:42Z

Daniel Jacobowitz wrote:

> On Sun, Aug 31, 2008 at 07:50:45PM +0200, Ulrich Weigand wrote:
> > What do you think?
>
> All the others I didn't respond to look OK to me.

Thanks for looking over them!

> I'm mildly
> concerned about the contortions you had to go through; it becomes hard
> to get at the architecture in new places. But we'll have to see how
> that works out in practice.

To some extent, there is a choice of direction here. Today, we have a
number of low-level routines that have implicit dependency on the
"current" architecture. To fix this, there are really two directions:

- Re-define the lower-level parts to be architecture-independent, and
push architecture-dependent semantics up.
or
- Make lower-level entities *explicitly* architecture-specific

For example, should a "value" be platform-neutral or platform-specific?
If value is platform-neutral, we'll need to take explicit care at the
locations where values get in contact with platform-specific code, e.g.
when loading/storing from target memory. If value is platform-specific,
it should probably carry an explicit gdbarch pointer. Then we can -in
a multi-arch setting- get into the situation what to do with values of
a different architecture than the current frame ...

With this patch-set, I've made "expression" explicitly platform-specific,
but tried to keep "value" and "type" more platform-independent. I guess
we'll have to see if this is right choice.