* [commit/Ada] Get rid of support for VAX Floats.
@ 2010-01-08 12:06 Joel Brobecker
2010-01-08 12:43 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Joel Brobecker @ 2010-01-08 12:06 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 534 bytes --]
This code has been dead for years. Time to jettison.
gdb/ChangeLog:
* ada-lang.h (ada_is_vax_floating_type, ada_vax_float_type_suffix)
(ada_vax_float_print_function): Delete.
* ada-lang.c (ada_is_vax_floating_type, ada_vax_float_type_suffix)
(ada_vax_float_print_function): Delete.
* ada-typeprint.c (print_vax_floating_point_type): Delete.
(ada_print_type): Remove support for VAX floats.
* ada-valprint.c (ada_val_print_1): Remove support for VAX floats.
Tested on x86_64-linux. Checked in.
--
Joel
[-- Attachment #2: 0002-Get-rid-of-support-for-VAX-Floats.patch --]
[-- Type: text/x-diff, Size: 5344 bytes --]
* ada-lang.h (ada_is_vax_floating_type, ada_vax_float_type_suffix)
(ada_vax_float_print_function): Delete.
* ada-lang.c (ada_is_vax_floating_type, ada_vax_float_type_suffix)
(ada_vax_float_print_function): Delete.
* ada-typeprint.c (print_vax_floating_point_type): Delete.
(ada_print_type): Remove support for VAX floats.
* ada-valprint.c (ada_val_print_1): Remove support for VAX floats.
---
gdb/ada-lang.c | 46 ----------------------------------------------
gdb/ada-lang.h | 6 ------
gdb/ada-typeprint.c | 13 -------------
gdb/ada-valprint.c | 16 ----------------
4 files changed, 0 insertions(+), 81 deletions(-)
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 4e7c655..b4b9698 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -9718,52 +9718,6 @@ ada_float_to_fixed (struct type *type, DOUBLEST x)
return (LONGEST) (x / scaling_factor (type) + 0.5);
}
-
- /* VAX floating formats */
-
-/* Non-zero iff TYPE represents one of the special VAX floating-point
- types. */
-
-int
-ada_is_vax_floating_type (struct type *type)
-{
- int name_len =
- (ada_type_name (type) == NULL) ? 0 : strlen (ada_type_name (type));
- return
- name_len > 6
- && (TYPE_CODE (type) == TYPE_CODE_INT
- || TYPE_CODE (type) == TYPE_CODE_RANGE)
- && strncmp (ada_type_name (type) + name_len - 6, "___XF", 5) == 0;
-}
-
-/* The type of special VAX floating-point type this is, assuming
- ada_is_vax_floating_point. */
-
-int
-ada_vax_float_type_suffix (struct type *type)
-{
- return ada_type_name (type)[strlen (ada_type_name (type)) - 1];
-}
-
-/* A value representing the special debugging function that outputs
- VAX floating-point values of the type represented by TYPE. Assumes
- ada_is_vax_floating_type (TYPE). */
-
-struct value *
-ada_vax_float_print_function (struct type *type)
-{
- switch (ada_vax_float_type_suffix (type))
- {
- case 'F':
- return get_var_value ("DEBUG_STRING_F", 0);
- case 'D':
- return get_var_value ("DEBUG_STRING_D", 0);
- case 'G':
- return get_var_value ("DEBUG_STRING_G", 0);
- default:
- error (_("invalid VAX floating-point type"));
- }
-}
\f
/* Range types */
diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h
index 024550f..5568ed0 100644
--- a/gdb/ada-lang.h
+++ b/gdb/ada-lang.h
@@ -305,12 +305,6 @@ extern DOUBLEST ada_fixed_to_float (struct type *, LONGEST);
extern LONGEST ada_float_to_fixed (struct type *, DOUBLEST);
-extern int ada_is_vax_floating_type (struct type *);
-
-extern int ada_vax_float_type_suffix (struct type *);
-
-extern struct value *ada_vax_float_print_function (struct type *);
-
extern struct type *ada_system_address_type (void);
extern int ada_which_variant_applies (struct type *, struct type *,
diff --git a/gdb/ada-typeprint.c b/gdb/ada-typeprint.c
index ffbe49e..74eaabf 100644
--- a/gdb/ada-typeprint.c
+++ b/gdb/ada-typeprint.c
@@ -310,15 +310,6 @@ print_fixed_point_type (struct type *type, struct ui_file *stream)
}
}
-/* Print representation of special VAX floating-point type TYPE on STREAM. */
-
-static void
-print_vax_floating_point_type (struct type *type, struct ui_file *stream)
-{
- fprintf_filtered (stream, "<float format %c>",
- ada_vax_float_type_suffix (type));
-}
-
/* Print simple (constrained) array type TYPE on STREAM. LEVEL is the
recursion (indentation) level, in case the element type itself has
nested structure, and SHOW is the number of levels of internal
@@ -786,8 +777,6 @@ ada_print_type (struct type *type0, char *varstring, struct ui_file *stream,
case TYPE_CODE_INT:
if (ada_is_fixed_point_type (type))
print_fixed_point_type (type, stream);
- else if (ada_is_vax_floating_type (type))
- print_vax_floating_point_type (type, stream);
else
{
char *name = ada_type_name (type);
@@ -804,8 +793,6 @@ ada_print_type (struct type *type0, char *varstring, struct ui_file *stream,
case TYPE_CODE_RANGE:
if (ada_is_fixed_point_type (type))
print_fixed_point_type (type, stream);
- else if (ada_is_vax_floating_type (type))
- print_vax_floating_point_type (type, stream);
else if (ada_is_modular_type (type))
fprintf_filtered (stream, "mod %s",
int_string (ada_modulus (type), 10, 0, 0, 1));
diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c
index 8bf1ef0..73bcfc9 100644
--- a/gdb/ada-valprint.c
+++ b/gdb/ada-valprint.c
@@ -744,22 +744,6 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr0,
(double) ada_fixed_to_float (type, v));
return 0;
}
- else if (ada_is_vax_floating_type (type))
- {
- struct value *val =
- value_from_contents_and_address (type, valaddr, address);
- struct value *func = ada_vax_float_print_function (type);
- if (func != 0)
- {
- struct gdbarch *gdbarch = get_type_arch (type);
- CORE_ADDR addr;
- addr = value_as_address (call_function_by_hand (func, 1, &val));
- val_print_string (builtin_type (gdbarch)->builtin_true_char,
- addr, -1, stream, options);
- return 0;
- }
- /* No special printing function. Do as best we can. */
- }
else if (TYPE_CODE (type) == TYPE_CODE_RANGE)
{
struct type *target_type = TYPE_TARGET_TYPE (type);
--
1.6.3.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [commit/Ada] Get rid of support for VAX Floats.
2010-01-08 12:06 [commit/Ada] Get rid of support for VAX Floats Joel Brobecker
@ 2010-01-08 12:43 ` Eli Zaretskii
2010-01-08 13:04 ` Joel Brobecker
0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2010-01-08 12:43 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
> Date: Fri, 8 Jan 2010 16:06:01 +0400
> From: Joel Brobecker <brobecker@adacore.com>
>
> This code has been dead for years. Time to jettison.
"Dead" in what sense? I didn't see an #if 0" or some such anywhere in
the patch.
If we are removing an unused feature, I'd suggest at least an entry in
NEWS.
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [commit/Ada] Get rid of support for VAX Floats.
2010-01-08 12:43 ` Eli Zaretskii
@ 2010-01-08 13:04 ` Joel Brobecker
0 siblings, 0 replies; 3+ messages in thread
From: Joel Brobecker @ 2010-01-08 13:04 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb-patches
> "Dead" in what sense? I didn't see an #if 0" or some such anywhere in
> the patch.
The feature could have never been used, because these floats are only
used on VMS, and I don't think that GDB ever supported VMS.
--
Joel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-01-08 13:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-08 12:06 [commit/Ada] Get rid of support for VAX Floats Joel Brobecker
2010-01-08 12:43 ` Eli Zaretskii
2010-01-08 13:04 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox