[8/10] Convert msym_..._type to per-gdbarch data

Daniel Jacobowitz drow@false.org
Tue Jun 12 15:26:00 GMT 2007


On Sat, Jun 09, 2007 at 01:17:58AM +0200, Ulrich Weigand wrote:
> Hello,
> 
> another instance of gdbarch-swapped types is the msym_.._type variables used to
> represent the contents of variables without debug information.
> 
> This patch replace those variables by a per-gdbarch data structure to hold the
> types, completely analogous to the main builtin_type.
> 
> (The types could have been added to builtin_type, but I prefer this way as it
> keeps the parse.c file self-contained.)

All these use is TARGET_INT_BIT, and all they use it for is to do
something halfway sensible when you say "print foo" and there's no
debug info for foo, or "print foo()".

I was going to suggest that we use uint32_t instead and avoid having
to make these architecture independent, but I just remembered that
there was a proposal long ago to use "long" (or maybe "uintptr_t")
instead.  So we'd just need to make them architecture specific again
anyway.  This looks fine to me.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb-patches mailing list