C++ify gdb/common/environ.c
[deliverable/binutils-gdb.git] / gdb / p-lang.c
index 53669ad03a62ff3b2bbb36b537f78608199c60ed..c4fe2f6c2a02e99ed1ac61c488833e23571490db 100644 (file)
@@ -1,6 +1,6 @@
 /* Pascal language support routines for GDB, the GNU debugger.
 
-   Copyright (C) 2000-2014 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -30,6 +30,7 @@
 #include "valprint.h"
 #include "value.h"
 #include <ctype.h>
+#include "c-lang.h"
 
 extern void _initialize_pascal_language (void);
 
@@ -339,7 +340,7 @@ const struct op_print pascal_op_print_tab[] =
   {"^", UNOP_IND, PREC_SUFFIX, 1},
   {"@", UNOP_ADDR, PREC_PREFIX, 0},
   {"sizeof", UNOP_SIZEOF, PREC_PREFIX, 0},
-  {NULL, 0, 0, 0}
+  {NULL, OP_NULL, PREC_PREFIX, 0}
 };
 \f
 enum pascal_primitive_types {
@@ -412,6 +413,11 @@ pascal_language_arch_info (struct gdbarch *gdbarch,
   lai->bool_type_default = builtin->builtin_bool;
 }
 
+static const char *p_extensions[] =
+{
+  ".pas", ".p", ".pp", NULL
+};
+
 const struct language_defn pascal_language_defn =
 {
   "pascal",                    /* Language name */
@@ -421,9 +427,10 @@ const struct language_defn pascal_language_defn =
   case_sensitive_on,
   array_row_major,
   macro_expansion_no,
+  p_extensions,
   &exp_descriptor_standard,
   pascal_parse,
-  pascal_error,
+  pascal_yyerror,
   null_post_parser,
   pascal_printchar,            /* Print a character constant */
   pascal_printstr,             /* Function to print string constant */
@@ -438,6 +445,7 @@ const struct language_defn pascal_language_defn =
   basic_lookup_symbol_nonlocal,        /* lookup_symbol_nonlocal */
   basic_lookup_transparent_type,/* lookup_transparent_type */
   NULL,                                /* Language specific symbol demangler */
+  NULL,
   NULL,                                /* Language specific class_name_from_physname */
   pascal_op_print_tab,         /* expression operators for printing */
   1,                           /* c-style arrays */
@@ -448,6 +456,7 @@ const struct language_defn pascal_language_defn =
   default_print_array_index,
   default_pass_by_reference,
   default_get_string,
+  c_watch_location_expression,
   NULL,                                /* la_get_symbol_name_cmp */
   iterate_over_symbols,
   &default_varobj_ops,
This page took 0.041437 seconds and 4 git commands to generate.