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

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