* c-exp.y, gdbtypes.h: Add builtin_type_signed_char.
authorPer Bothner <per@bothner.com>
Thu, 26 Mar 1992 08:33:43 +0000 (08:33 +0000)
committerPer Bothner <per@bothner.com>
Thu, 26 Mar 1992 08:33:43 +0000 (08:33 +0000)
* cplus-dem.c:  Support "Sc" meaning "signed char".

gdb/ChangeLog
gdb/c-exp.y
gdb/cplus-dem.c
gdb/gdbtypes.h

index e00ae64b143097aa212f550b9c995f7dca227609..bdc69e80cadc39bcfdb54d68b282f52dbf4a1c38 100644 (file)
@@ -1,3 +1,8 @@
+Wed Mar 25 16:52:35 1992  Per Bothner  (bothner@cygnus.com)
+
+       * c-exp.y, gdbtypes.h:  Add builtin_type_signed_char.
+       * cplus-dem.c:  Support "Sc" meaning "signed char".
+
 Wed Mar 25 15:21:44 1992  Stu Grossman  (grossman at cygnus.com)
 
        * configure.in:  fix iris/iris3.
index bbf66e00c844571bb89b518ce90586fa9bc4d3ec..7183fe7b44ca94af62ad52c9aa2ac9603024b418 100644 (file)
@@ -1495,6 +1495,7 @@ struct type *builtin_type_short;
 struct type *builtin_type_int;
 struct type *builtin_type_long;
 struct type *builtin_type_long_long;
+struct type *builtin_type_signed_char;
 struct type *builtin_type_unsigned_char;
 struct type *builtin_type_unsigned_short;
 struct type *builtin_type_unsigned_int;
@@ -1516,6 +1517,7 @@ struct type ** const (c_builtin_types[]) =
   &builtin_type_double,
   &builtin_type_void,
   &builtin_type_long_long,
+  &builtin_type_signed_char,
   &builtin_type_unsigned_char,
   &builtin_type_unsigned_short,
   &builtin_type_unsigned_int,
@@ -1572,6 +1574,10 @@ _initialize_c_exp ()
     init_type (TYPE_CODE_INT, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
               0,
               "char", (struct objfile *) NULL);
+  builtin_type_signed_char =
+    init_type (TYPE_CODE_INT, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
+              TYPE_FLAG_SIGNED,
+              "signed char", (struct objfile *) NULL);
   builtin_type_unsigned_char =
     init_type (TYPE_CODE_INT, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
               TYPE_FLAG_UNSIGNED,
index afe9ee7b291a309f133f7f0fb8424bd33b20fda4..4c5a2f68890511701a0e2411e057ff2d76c4fd4d 100644 (file)
@@ -507,6 +507,7 @@ cplus_demangle (type, arg_mode)
                        done = is_pointer = 1;
                        break;
                      case 'C': /* const */
+                     case 'S': /* explicitly signed [char] */
                      case 'U': /* unsigned */
                      case 'V': /* volatile */
                      case 'F': /* function */
@@ -867,6 +868,14 @@ do_type (type, result, arg_mode)
            non_empty = 1;
          string_append (result, "unsigned");
          break;
+       case 'S': /* signed char only */
+         *type += 1;
+         if (non_empty)
+           string_append (result, " ");
+         else
+           non_empty = 1;
+         string_append (result, "signed");
+         break;
        case 'V':
          *type += 1;
          if (print_ansi_qualifiers)
index 8877f8392c92dddfd35453a1f4f4c6083ba0adf9..293b4175ab3cc645e19779c7a67e5e8de019c06d 100644 (file)
@@ -422,6 +422,7 @@ extern struct type *builtin_type_char;
 extern struct type *builtin_type_short;
 extern struct type *builtin_type_int;
 extern struct type *builtin_type_long;
+extern struct type *builtin_type_signed_char;
 extern struct type *builtin_type_unsigned_char;
 extern struct type *builtin_type_unsigned_short;
 extern struct type *builtin_type_unsigned_int;