* sparc64-tdep.h (sparc64_regnum): Fix comment.
[deliverable/binutils-gdb.git] / gdb / p-lang.c
index 6d518ee951ff89e2d4f49a170de1bd969d1577cc..59e196aa4b310856ddae7c4f2f489ac777e6b54a 100644 (file)
@@ -20,6 +20,7 @@
 /* This file is derived from c-lang.c */
 
 #include "defs.h"
+#include "gdb_string.h"
 #include "symtab.h"
 #include "gdbtypes.h"
 #include "expression.h"
@@ -27,6 +28,7 @@
 #include "language.h"
 #include "p-lang.h"
 #include "valprint.h"
+#include "value.h"
 #include <ctype.h>
  
 extern void _initialize_pascal_language (void);
@@ -58,7 +60,7 @@ is_pascal_string_type (struct type *type,int *length_pos,
           if (length_pos)
            *length_pos = TYPE_FIELD_BITPOS (type, 0) / TARGET_CHAR_BIT;
           if (length_size)
-           *length_size = TYPE_FIELD_TYPE (type, 0)->length;
+           *length_size = TYPE_LENGTH (TYPE_FIELD_TYPE (type, 0));
           if (string_pos)
            *string_pos = TYPE_FIELD_BITPOS (type, 1) / TARGET_CHAR_BIT;
           if (char_size)
@@ -76,7 +78,7 @@ is_pascal_string_type (struct type *type,int *length_pos,
           if (length_pos)
            *length_pos = TYPE_FIELD_BITPOS (type, 1) / TARGET_CHAR_BIT;
           if (length_size)
-           *length_size = TYPE_FIELD_TYPE (type, 1)->length;
+           *length_size = TYPE_LENGTH (TYPE_FIELD_TYPE (type, 1));
           if (string_pos)
            *string_pos = TYPE_FIELD_BITPOS (type, 2) / TARGET_CHAR_BIT;
           /* FIXME: how can I detect wide chars in GPC ?? */
@@ -160,7 +162,6 @@ pascal_printstr (struct ui_file *stream, char *string, unsigned int length,
   unsigned int things_printed = 0;
   int in_quotes = 0;
   int need_comma = 0;
-  extern int inspect_it;
 
   /* If the string was not truncated due to `set print elements', and
      the last byte of it is a null, we don't print that, in traditional C
@@ -293,7 +294,7 @@ pascal_create_fundamental_type (struct objfile *objfile, int typeid)
                        0, "void", objfile);
       break;
     case FT_CHAR:
-      type = init_type (TYPE_CODE_INT,
+      type = init_type (TYPE_CODE_CHAR,
                        TARGET_CHAR_BIT / TARGET_CHAR_BIT,
                        0, "char", objfile);
       break;
@@ -460,6 +461,10 @@ const struct language_defn pascal_language_defn =
   pascal_print_type,           /* Print a type using appropriate syntax */
   pascal_val_print,            /* Print a value using appropriate syntax */
   pascal_value_print,          /* Print a top-level value */
+  NULL,                                /* Language specific skip_trampoline */
+  value_of_this,               /* value_of_this */
+  basic_lookup_symbol_nonlocal,        /* lookup_symbol_nonlocal */
+  NULL,                                /* Language specific symbol demangler */
   {"", "%", "b", ""},          /* Binary format info */
   {"0%lo", "0", "o", ""},      /* Octal format info */
   {"%ld", "", "d", ""},                /* Decimal format info */
This page took 0.025527 seconds and 4 git commands to generate.