This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc][23/37] Eliminate builtin_type_ macros: Platform-neutral types for internal variables
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Date: Tue, 2 Sep 2008 08:43:02 -0400
- Subject: Re: [rfc][23/37] Eliminate builtin_type_ macros: Platform-neutral types for internal variables
- References: <20080831175045.128504000@de.ibm.com> <20080831175131.976075000@de.ibm.com>
On Sun, Aug 31, 2008 at 07:51:08PM +0200, Ulrich Weigand wrote:
> One problem is the $_ variable, which holds a pointer value. To
> allow using a platform-neutral type for this, I'm introducing a
> new platform-neutral pointer type builtin_type_void_ptr. The
> lenght of this type is chosen so that it can hold every CORE_ADDR
> value.
I don't think this is a good idea. Target-specific code should not be
required to correctly handle jumbo pointers, e.g. in "(gdb) print
foo ($_)". In a command function, we must already have some idea of
what the associated architecture is (e.g. to initialize the
architecture used by the expression evaluator); why not use that?
--
Daniel Jacobowitz
CodeSourcery