diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-08-08 19:49:43 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-08-08 19:49:43 +0000 |
commit | 456fcf94f7f9a4f275739b19f16a0a24c06bf31d (patch) | |
tree | b6aba6182d1be5d242c6176d522ee6c2512ce38b /gdb/gdbarch.sh | |
parent | 69e9e646da0e5602742734053eb60f7082368210 (diff) | |
download | binutils-gdb-456fcf94f7f9a4f275739b19f16a0a24c06bf31d.tar.gz |
2004-08-08 Andrew Cagney <cagney@gnu.org>
* gdbarch.sh (pformat): New function.
(float_format, double_format, long_double_format): List with bit
members. Use pformat when printing.
* gdbarch.c, gdbarch.h: Re-generate.
Diffstat (limited to 'gdb/gdbarch.sh')
-rwxr-xr-x | gdb/gdbarch.sh | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 727878358d5..bde13b9a3b0 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -397,12 +397,18 @@ v:TARGET_LONG_BIT:int:long_bit::::8 * sizeof (long):4*TARGET_CHAR_BIT::0 # Number of bits in a long long or unsigned long long for the target # machine. v:TARGET_LONG_LONG_BIT:int:long_long_bit::::8 * sizeof (LONGEST):2*TARGET_LONG_BIT::0 -# Number of bits in a float for the target machine. + +# The ABI default bit-size and format for "float", "double", and "long +# double". These bit/format pairs should eventually be combined into +# a single object. For the moment, just initialize them as a pair. + v:TARGET_FLOAT_BIT:int:float_bit::::8 * sizeof (float):4*TARGET_CHAR_BIT::0 -# Number of bits in a double for the target machine. +v:TARGET_FLOAT_FORMAT:const struct floatformat *:float_format::::::default_float_format (current_gdbarch)::%s:pformat (current_gdbarch->float_format) v:TARGET_DOUBLE_BIT:int:double_bit::::8 * sizeof (double):8*TARGET_CHAR_BIT::0 -# Number of bits in a long double for the target machine. +v:TARGET_DOUBLE_FORMAT:const struct floatformat *:double_format::::::default_double_format (current_gdbarch)::%s:pformat (current_gdbarch->double_format) v:TARGET_LONG_DOUBLE_BIT:int:long_double_bit::::8 * sizeof (long double):8*TARGET_CHAR_BIT::0 +v:TARGET_LONG_DOUBLE_FORMAT:const struct floatformat *:long_double_format::::::default_double_format (current_gdbarch)::%s:pformat (current_gdbarch->long_double_format) + # For most targets, a pointer on the target and its representation as an # address in GDB have the same size and "look the same". For such a # target, you need only set TARGET_PTR_BIT / ptr_bit and TARGET_ADDR_BIT @@ -594,9 +600,6 @@ F:=:int:deprecated_reg_struct_has_addr:int gcc_p, struct type *type:gcc_p, type m::int:stabs_argument_has_addr:struct type *type:type:::default_stabs_argument_has_addr::0 v:=:int:frame_red_zone_size # -v:TARGET_FLOAT_FORMAT:const struct floatformat *:float_format::::::default_float_format (current_gdbarch)::%s:(TARGET_FLOAT_FORMAT)->name -v:TARGET_DOUBLE_FORMAT:const struct floatformat *:double_format::::::default_double_format (current_gdbarch)::%s:(TARGET_DOUBLE_FORMAT)->name -v:TARGET_LONG_DOUBLE_FORMAT:const struct floatformat *:long_double_format::::::default_double_format (current_gdbarch)::%s:(TARGET_LONG_DOUBLE_FORMAT)->name m::CORE_ADDR:convert_from_func_ptr_addr:CORE_ADDR addr, struct target_ops *targ:addr, targ:::convert_from_func_ptr_addr_identity::0 # On some machines there are bits in addresses which are not really # part of the address, but are used by the kernel, the hardware, etc. @@ -1196,6 +1199,15 @@ static void alloc_gdbarch_data (struct gdbarch *); #endif int gdbarch_debug = GDBARCH_DEBUG; +static const char * +pformat (const struct floatformat *format) +{ + if (format == NULL) + return "(null)"; + else + return format->name; +} + EOF # gdbarch open the gdbarch object |