* config/m68k/monitor.mt (TDEPFILE): Add remote-es.o.
[deliverable/binutils-gdb.git] / gdb / m2-lang.c
index cc1c06c1ed2fe4a3b5f91eaea4080d9f7e659840..5561561080ad7b9796cdabec9afdafb38a44f671 100644 (file)
@@ -35,7 +35,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 static void
 emit_char (c, stream, quoter)
      register int c;
-     FILE *stream;
+     GDB_FILE *stream;
      int quoter;
 {
 
@@ -87,7 +87,7 @@ emit_char (c, stream, quoter)
 static void
 m2_printchar (c, stream)
      int c;
-     FILE *stream;
+     GDB_FILE *stream;
 {
   fputs_filtered ("'", stream);
   emit_char (c, stream, '\'');
@@ -103,7 +103,7 @@ m2_printchar (c, stream)
 
 static void
 m2_printstr (stream, string, length, force_ellipses)
-     FILE *stream;
+     GDB_FILE *stream;
      char *string;
      unsigned int length;
      int force_ellipses;
@@ -118,7 +118,7 @@ m2_printstr (stream, string, length, force_ellipses)
 
   if (length == 0)
     {
-      fputs_filtered ("\"\"", stdout);
+      fputs_filtered ("\"\"", gdb_stdout);
       return;
     }
 
@@ -200,7 +200,6 @@ m2_create_fundamental_type (objfile, typeid)
      int typeid;
 {
   register struct type *type = NULL;
-  register int nbytes;
 
   switch (typeid)
     {
@@ -225,7 +224,7 @@ m2_create_fundamental_type (objfile, typeid)
                          TYPE_FLAG_UNSIGNED, "boolean", objfile);
        break;
       case FT_STRING:
-       type = init_type (TYPE_CODE_PASCAL_ARRAY,
+       type = init_type (TYPE_CODE_STRING,
                          TARGET_CHAR_BIT / TARGET_CHAR_BIT,
                          0, "string", objfile);
        break;
@@ -237,7 +236,7 @@ m2_create_fundamental_type (objfile, typeid)
       case FT_SIGNED_CHAR:
        type = init_type (TYPE_CODE_INT,
                          TARGET_CHAR_BIT / TARGET_CHAR_BIT,
-                         TYPE_FLAG_SIGNED, "signed char", objfile);
+                         0, "signed char", objfile);
        break;
       case FT_UNSIGNED_CHAR:
        type = init_type (TYPE_CODE_INT,
@@ -252,7 +251,7 @@ m2_create_fundamental_type (objfile, typeid)
       case FT_SIGNED_SHORT:
        type = init_type (TYPE_CODE_INT,
                          TARGET_SHORT_BIT / TARGET_CHAR_BIT,
-                         TYPE_FLAG_SIGNED, "short", objfile);  /* FIXME-fnf */
+                         0, "short", objfile); /* FIXME-fnf */
        break;
       case FT_UNSIGNED_SHORT:
        type = init_type (TYPE_CODE_INT,
@@ -267,7 +266,7 @@ m2_create_fundamental_type (objfile, typeid)
       case FT_SIGNED_INTEGER:
        type = init_type (TYPE_CODE_INT,
                          TARGET_INT_BIT / TARGET_CHAR_BIT,
-                         TYPE_FLAG_SIGNED, "int", objfile); /* FIXME -fnf */
+                         0, "int", objfile); /* FIXME -fnf */
        break;
       case FT_UNSIGNED_INTEGER:
        type = init_type (TYPE_CODE_INT,
@@ -287,7 +286,7 @@ m2_create_fundamental_type (objfile, typeid)
       case FT_SIGNED_LONG:
        type = init_type (TYPE_CODE_INT,
                          TARGET_LONG_BIT / TARGET_CHAR_BIT,
-                         TYPE_FLAG_SIGNED, "long", objfile); /* FIXME -fnf */
+                         0, "long", objfile); /* FIXME -fnf */
        break;
       case FT_UNSIGNED_LONG:
        type = init_type (TYPE_CODE_INT,
@@ -302,7 +301,7 @@ m2_create_fundamental_type (objfile, typeid)
       case FT_SIGNED_LONG_LONG:
        type = init_type (TYPE_CODE_INT,
                          TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
-                         TYPE_FLAG_SIGNED, "signed long long", objfile);
+                         0, "signed long long", objfile);
        break;
       case FT_UNSIGNED_LONG_LONG:
        type = init_type (TYPE_CODE_INT,
@@ -351,7 +350,7 @@ m2_create_fundamental_type (objfile, typeid)
 \f
 /* Table of operators and their precedences for printing expressions.  */
 
-const static struct op_print m2_op_print_tab[] = {
+static const struct op_print m2_op_print_tab[] = {
     {"+",   BINOP_ADD, PREC_ADD, 0},
     {"+",   UNOP_PLUS, PREC_PREFIX, 0},
     {"-",   BINOP_SUB, PREC_ADD, 0},
@@ -404,13 +403,15 @@ const struct language_defn m2_language_defn = {
   m2_printchar,                        /* Print character constant */
   m2_printstr,                 /* function to print string constant */
   m2_create_fundamental_type,  /* Create fundamental type in this language */
+  m2_print_type,               /* Print a type using appropriate syntax */
+  m2_val_print,                        /* Print a value using appropriate syntax */
   &builtin_type_m2_int,                /* longest signed   integral type */
   &builtin_type_m2_card,       /* longest unsigned integral type */
   &builtin_type_m2_real,       /* longest floating point type */
   {"",      "",   "",   ""},   /* Binary format info */
-  {"%oB",   "",   "o",  "B"},  /* Octal format info */
-  {"%d",    "",   "d",  ""},   /* Decimal format info */
-  {"0%XH",  "0",  "X",  "H"},  /* Hex format info */
+  {"%loB",   "",   "o",  "B"}, /* Octal format info */
+  {"%ld",    "",   "d",  ""},  /* Decimal format info */
+  {"0%lXH",  "0",  "X",  "H"}, /* Hex format info */
   m2_op_print_tab,             /* expression operators for printing */
   LANG_MAGIC
 };
This page took 0.025988 seconds and 4 git commands to generate.