Blame SOURCES/gdb-rhbz1320945-float128-6of9.patch

a094f6
commit c413c44801e449f1f0b9828b81770e752b8219af
a094f6
Author: Ulrich Weigand <ulrich.weigand@de.ibm.com>
a094f6
Date:   Tue Sep 6 17:30:13 2016 +0200
a094f6
a094f6
    Remove TYPE_NOSIGN "char" hack
a094f6
    
a094f6
    init_type (and arch_integer_type) currently use a special hack to set the
a094f6
    TYPE_NOSIGN flag if the type name is exactly "char".  This commit moves the
a094f6
    hack up to the callers of those routines.
a094f6
    
a094f6
    The special case currently can hit only for types created from dwarf2read,
a094f6
    but read_base_type actually implements the "char" check itself, so it is
a094f6
    redundant to do it in init_type as well.  (Note that stabsread.c and the
a094f6
    other type readers always pass NULL as name to init_type, so the special
a094f6
    case can never hit for those.)
a094f6
    
a094f6
    A few other cases create pre-definded types with a hard-coded name of "char";
a094f6
    the commit simply moves setting the TYPE_NOSIGN flag to those places.
a094f6
    
a094f6
    No functional change intended.
a094f6
    
a094f6
    gdb/ChangeLog:
a094f6
    
a094f6
            * gdbtypes.c (init_type): Remove "char" special case.
a094f6
            (arch_integer_type): Likewise.
a094f6
            (gdbtypes_post_init): Set TYPE_NOSIGN for "char" type.
a094f6
            (objfile_type): Likewise.
a094f6
            * mdebugread.c (basic_type): Likewise.
a094f6
            * stabsread.c (rs6000_builtin_type): Likewise.
a094f6
    
a094f6
    Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
a094f6
a094f6
### a/gdb/ChangeLog
a094f6
### b/gdb/ChangeLog
a094f6
## -1,5 +1,14 @@
a094f6
 2016-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
a094f6
 
a094f6
+	* gdbtypes.c (init_type): Remove "char" special case.
a094f6
+	(arch_integer_type): Likewise.
a094f6
+	(gdbtypes_post_init): Set TYPE_NOSIGN for "char" type.
a094f6
+	(objfile_type): Likewise.
a094f6
+	* mdebugread.c (basic_type): Likewise.
a094f6
+	* stabsread.c (rs6000_builtin_type): Likewise.
a094f6
+
a094f6
+2016-09-05  Ulrich Weigand  <uweigand@de.ibm.com>
a094f6
+
a094f6
 	* gdbtypes.h (enum type_flag_value): Remove.
a094f6
 	Remove references to TYPE_FLAG_... in comments throughout.
a094f6
 	* gdbtypes.c (recursive_dump_type): Do not print TYPE_FLAG_... 
a094f6
Index: gdb-7.6.1/gdb/gdbtypes.c
a094f6
===================================================================
a094f6
--- gdb-7.6.1.orig/gdb/gdbtypes.c	2017-03-11 21:26:51.526852141 +0100
a094f6
+++ gdb-7.6.1/gdb/gdbtypes.c	2017-03-11 21:27:01.268920712 +0100
a094f6
@@ -2137,11 +2137,6 @@
a094f6
 
a094f6
   TYPE_NAME (type) = name;
a094f6
 
a094f6
-  /* C++ fancies.  */
a094f6
-
a094f6
-  if (name && strcmp (name, "char") == 0)
a094f6
-    TYPE_NOSIGN (type) = 1;
a094f6
-
a094f6
   return type;
a094f6
 }
a094f6
 
a094f6
@@ -4060,8 +4055,6 @@
a094f6
   t = arch_type (gdbarch, TYPE_CODE_INT, bit / TARGET_CHAR_BIT, name);
a094f6
   if (unsigned_p)
a094f6
     TYPE_UNSIGNED (t) = 1;
a094f6
-  if (name && strcmp (name, "char") == 0)
a094f6
-    TYPE_NOSIGN (t) = 1;
a094f6
 
a094f6
   return t;
a094f6
 }
a094f6
@@ -4305,6 +4298,7 @@
a094f6
   builtin_type->builtin_char
a094f6
     = arch_integer_type (gdbarch, TARGET_CHAR_BIT,
a094f6
 			 !gdbarch_char_signed (gdbarch), "char");
a094f6
+  TYPE_NOSIGN (builtin_type->builtin_char) = 1;
a094f6
   builtin_type->builtin_signed_char
a094f6
     = arch_integer_type (gdbarch, TARGET_CHAR_BIT,
a094f6
 			 0, "signed char");
a094f6
@@ -4448,6 +4442,7 @@
a094f6
   objfile_type->builtin_char
a094f6
     = init_integer_type (objfile, TARGET_CHAR_BIT,
a094f6
 			 !gdbarch_char_signed (gdbarch), "char");
a094f6
+  TYPE_NOSIGN (objfile_type->builtin_char) = 1;
a094f6
   objfile_type->builtin_signed_char
a094f6
     = init_integer_type (objfile, TARGET_CHAR_BIT,
a094f6
 			 0, "signed char");
a094f6
Index: gdb-7.6.1/gdb/mdebugread.c
a094f6
===================================================================
a094f6
--- gdb-7.6.1.orig/gdb/mdebugread.c	2017-03-11 21:26:51.527852149 +0100
a094f6
+++ gdb-7.6.1/gdb/mdebugread.c	2017-03-11 21:27:01.269920719 +0100
a094f6
@@ -1380,6 +1380,7 @@
a094f6
 
a094f6
     case btChar:
a094f6
       tp = init_integer_type (objfile, 8, 0, "char");
a094f6
+      TYPE_NOSIGN (tp) = 1;
a094f6
       break;
a094f6
 
a094f6
     case btUChar:
a094f6
Index: gdb-7.6.1/gdb/stabsread.c
a094f6
===================================================================
a094f6
--- gdb-7.6.1.orig/gdb/stabsread.c	2017-03-11 21:26:51.529852163 +0100
a094f6
+++ gdb-7.6.1/gdb/stabsread.c	2017-03-11 21:27:01.271920733 +0100
a094f6
@@ -2102,6 +2102,7 @@
a094f6
       break;
a094f6
     case 2:
a094f6
       rettype = init_integer_type (objfile, 8, 0, "char");
a094f6
+      TYPE_NOSIGN (rettype) = 1;
a094f6
       break;
a094f6
     case 3:
a094f6
       rettype = init_integer_type (objfile, 16, 0, "short");