diff mbox series

[Ada] Drop GNAT encodings for fixed-point types

Message ID 11941991.Z8fCHACype@fomalhaut
State New
Headers show
Series [Ada] Drop GNAT encodings for fixed-point types | expand

Commit Message

Eric Botcazou Sept. 11, 2020, 9:23 a.m. UTC
GDB can now deal with the DWARF representation just fine.

Tested on x86_64-suse-linux, applied on the mainline.


2020-09-11  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/misc.c (gnat_get_fixed_point_type): Bail out only
 	when the GNAT encodings are specifically used.
diff mbox series

Patch

diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c
index 183daf33fb6..e6a563e3666 100644
--- a/gcc/ada/gcc-interface/misc.c
+++ b/gcc/ada/gcc-interface/misc.c
@@ -618,10 +618,9 @@  gnat_get_fixed_point_type_info (const_tree type,
 {
   tree scale_factor;
 
-  /* GDB cannot handle fixed-point types yet, so rely on GNAT encodings
-     instead for it.  */
+  /* Do nothing if the GNAT encodings are used.  */
   if (!TYPE_IS_FIXED_POINT_P (type)
-      || gnat_encodings != DWARF_GNAT_ENCODINGS_MINIMAL)
+      || gnat_encodings == DWARF_GNAT_ENCODINGS_ALL)
     return false;
 
   scale_factor = TYPE_SCALE_FACTOR (type);