* breakpoint.c, breakpoint.h (breakpoint_init_inferior): New function
[deliverable/binutils-gdb.git] / gdb / m2-lang.c
index 77d821a9cbddd93b6d49dd1f37e58937917b9a48..0b678fd9c3c19a92741c31b011fbd33bd580e253 100644 (file)
@@ -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;
@@ -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
 };
@@ -418,7 +419,7 @@ const struct language_defn m2_language_defn = {
 /* Initialization for Modula-2 */
 
 void
-_initialize_m2_exp ()
+_initialize_m2_language ()
 {
   /* Modula-2 "pervasive" types.  NOTE:  these can be redefined!!! */
   builtin_type_m2_int =
@@ -444,12 +445,12 @@ _initialize_m2_exp ()
 
   TYPE_NFIELDS(builtin_type_m2_bool) = 2;
   TYPE_FIELDS(builtin_type_m2_bool) = 
-     (struct field *) malloc (sizeof (struct field) * 2);
+     (struct field *) xmalloc (sizeof (struct field) * 2);
   TYPE_FIELD_BITPOS(builtin_type_m2_bool,0) = 0;
-  TYPE_FIELD_NAME(builtin_type_m2_bool,0) = (char *)malloc(6);
+  TYPE_FIELD_NAME(builtin_type_m2_bool,0) = (char *)xmalloc(6);
   strcpy(TYPE_FIELD_NAME(builtin_type_m2_bool,0),"FALSE");
   TYPE_FIELD_BITPOS(builtin_type_m2_bool,1) = 1;
-  TYPE_FIELD_NAME(builtin_type_m2_bool,1) = (char *)malloc(5);
+  TYPE_FIELD_NAME(builtin_type_m2_bool,1) = (char *)xmalloc(5);
   strcpy(TYPE_FIELD_NAME(builtin_type_m2_bool,1),"TRUE");
 
   add_language (&m2_language_defn);
This page took 0.023911 seconds and 4 git commands to generate.