This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: (patch) hpjyg23: gdbtypes.[ch] & values.c
- To: Jimmy Guo <guo at cup dot hp dot com>
- Subject: Re: (patch) hpjyg23: gdbtypes.[ch] & values.c
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 17 Nov 1999 06:31:30 +1100
- CC: gdb-patches at sourceware dot cygnus dot com, Stan Shebs <shebs at cygnus dot com>
- Organization: Cygnus Solutions
- References: <Pine.LNX.4.10.9911161011080.21452-100000@hpcll168.cup.hp.com>
Jimmy Guo wrote:
>
> >> + #ifdef BFD64
> >> + builtin_type_CORE_ADDR = builtin_type_unsigned_long_long;
> >> + #else
> >> + builtin_type_CORE_ADDR = builtin_type_unsigned_long;
> >> + #endif
> >
> >Can you expand a little - looks like there isn't a builtin_type_* for
> >pointer :-( That makes makes the introduction of a builtin_type for
> >target pointers a pretty good idea.
>
> builtin_type_CORE_ADDR is used in cp-valprint.c and valops.c in offset
> calculation to skip over entries of pointer type.
Hmm, this makes the new builtin_type sound more like the target language
pointer (C's void*) rather than the target architectures address. That
would suggest the need for a different name and a comment explaining why
it isn't CORE_ADDR.
Is the list of cases:
o CORE_ADDR
builtin_type_CORE_ADDR?
o object file addr
builtin_type_bfd_addr
o language addr
builtin_type_C_pointer?
hmm, GDB's current schemea would
make it just builtin_type_pointer.
complete? If we added all of them you can then just pick and choose :-)
Stan,
now you're the stylistic expert, thoughts?
enjoy,
Andrew
PS: I like your move to add builtin_type_*. I think this is going to
finally cleanup/fix another of GDB's confusions.