This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] [2/2] Remove macros TARGET_{FLOAT,DOUBLE,LONG_DOUBLE}_{BIT|FORMAT}
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: deuling at de dot ibm dot com (Markus Deuling)
- Cc: gdb-patches at sourceware dot org (GDB Patches)
- Date: Tue, 12 Jun 2007 16:17:29 +0200 (CEST)
- Subject: Re: [rfc] [2/2] Remove macros TARGET_{FLOAT,DOUBLE,LONG_DOUBLE}_{BIT|FORMAT}
Markus Deuling wrote:
> this patch removes following macros from gdbarch.sh:
>
> * TARGET_FLOAT_BIT
> * TARGET_FLOAT_FORMAT
> * TARGET_DOUBLE_BIT
> * TARGET_DOUBLE_FORMAT
> * TARGET_LONG_DOUBLE_BIT
> * TARGET_LONG_DOUBLE_FORMAT
/* NOTE: The new architecture variable is named ``current_gdbarch''
- so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
+ so that macros such as gdbarch_double_bit, when expanded, refer to
the current local architecture and not the previous global
architecture. This ensures that the new architectures initial
values are not influenced by the previous architecture. Once
Well, replacing the macro by a gdbarch function invalidates the whole point
the comment is making ;-) You should either use another macro (that still
is a macro) as example, or -once there are no macros left- remove that
comment.
+ builtin_type_float = build_flt (gdbarch_float_bit (current_gdbarch), "float",
+ gdbarch_float_format (current_gdbarch));
+ builtin_type_double = build_flt (gdbarch_double_bit (current_gdbarch),
+ "double",
+ gdbarch_double_format (current_gdbarch));
+ builtin_type_long_double = build_flt (gdbarch_long_double_bit
+ (current_gdbarch),
+ "long double",
+ gdbarch_long_double_format
+ (current_gdbarch));
It might be nicer to move the built_flt to its own line
builtin_type_long_double
= build_fld (gdbarch_long_double_bit (current_gdbarch),
...
Otherwise this is OK, thanks!
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com