Committed after testing and independent approval/endorsement.
[deliverable/binutils-gdb.git] / gdb / c-lang.c
index fbdf0054afa58d2254c9e996fe24262ee964879f..a296d8193b48548393abc8de35637eb4acdaf2ce 100644 (file)
@@ -32,6 +32,7 @@
 #include "charset.h"
 #include "gdb_string.h"
 #include "demangle.h"
+#include "cp-support.h"
 
 extern void _initialize_c_language (void);
 static void c_emit_char (int c, struct ui_file * stream, int quoter);
@@ -41,7 +42,7 @@ static void c_emit_char (int c, struct ui_file * stream, int quoter);
    characters and strings is language specific. */
 
 static void
-c_emit_char (register int c, struct ui_file *stream, int quoter)
+c_emit_char (int c, struct ui_file *stream, int quoter)
 {
   const char *escape;
   int host_char;
@@ -87,11 +88,10 @@ void
 c_printstr (struct ui_file *stream, char *string, unsigned int length,
            int width, int force_ellipses)
 {
-  register unsigned int i;
+  unsigned int i;
   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
@@ -207,7 +207,7 @@ c_printstr (struct ui_file *stream, char *string, unsigned int length,
 struct type *
 c_create_fundamental_type (struct objfile *objfile, int typeid)
 {
-  register struct type *type = NULL;
+  struct type *type = NULL;
 
   switch (typeid)
     {
@@ -543,9 +543,9 @@ const struct language_defn c_language_defn =
   range_check_off,
   type_check_off,
   case_sensitive_on,
+  &exp_descriptor_standard,
   c_preprocess_and_parse,
   c_error,
-  evaluate_subexp_standard,
   c_printchar,                 /* Print a character constant */
   c_printstr,                  /* Function to print string constant */
   c_emit_char,                 /* Print a single char */
@@ -554,6 +554,8 @@ const struct language_defn c_language_defn =
   c_val_print,                 /* Print a value using appropriate syntax */
   c_value_print,               /* Print a top-level value */
   NULL,                                /* Language specific skip_trampoline */
+  NULL,                                /* value_of_this */
+  basic_lookup_symbol_nonlocal,        /* lookup_symbol_nonlocal */
   NULL,                                /* Language specific symbol demangler */
   {"", "", "", ""},            /* Binary format info */
   {"0%lo", "0", "o", ""},      /* Octal format info */
@@ -563,6 +565,7 @@ const struct language_defn c_language_defn =
   1,                           /* c-style arrays */
   0,                           /* String lower bound */
   &builtin_type_char,          /* Type of string elements */
+  default_word_break_characters,
   LANG_MAGIC
 };
 
@@ -597,9 +600,9 @@ const struct language_defn cplus_language_defn =
   range_check_off,
   type_check_off,
   case_sensitive_on,
+  &exp_descriptor_standard,
   c_preprocess_and_parse,
   c_error,
-  evaluate_subexp_standard,
   c_printchar,                 /* Print a character constant */
   c_printstr,                  /* Function to print string constant */
   c_emit_char,                 /* Print a single char */
@@ -608,6 +611,8 @@ const struct language_defn cplus_language_defn =
   c_val_print,                 /* Print a value using appropriate syntax */
   c_value_print,               /* Print a top-level value */
   NULL,                                /* Language specific skip_trampoline */
+  value_of_this,               /* value_of_this */
+  cp_lookup_symbol_nonlocal,   /* lookup_symbol_nonlocal */
   cplus_demangle,              /* Language specific symbol demangler */
   {"", "", "", ""},            /* Binary format info */
   {"0%lo", "0", "o", ""},      /* Octal format info */
@@ -617,6 +622,7 @@ const struct language_defn cplus_language_defn =
   1,                           /* c-style arrays */
   0,                           /* String lower bound */
   &builtin_type_char,          /* Type of string elements */
+  default_word_break_characters,
   LANG_MAGIC
 };
 
@@ -628,9 +634,9 @@ const struct language_defn asm_language_defn =
   range_check_off,
   type_check_off,
   case_sensitive_on,
+  &exp_descriptor_standard,
   c_preprocess_and_parse,
   c_error,
-  evaluate_subexp_standard,
   c_printchar,                 /* Print a character constant */
   c_printstr,                  /* Function to print string constant */
   c_emit_char,                 /* Print a single char */
@@ -639,6 +645,8 @@ const struct language_defn asm_language_defn =
   c_val_print,                 /* Print a value using appropriate syntax */
   c_value_print,               /* Print a top-level value */
   NULL,                                /* Language specific skip_trampoline */
+  NULL,                                /* value_of_this */
+  basic_lookup_symbol_nonlocal,        /* lookup_symbol_nonlocal */
   NULL,                                /* Language specific symbol demangler */
   {"", "", "", ""},            /* Binary format info */
   {"0%lo", "0", "o", ""},      /* Octal format info */
@@ -648,6 +656,7 @@ const struct language_defn asm_language_defn =
   1,                           /* c-style arrays */
   0,                           /* String lower bound */
   &builtin_type_char,          /* Type of string elements */
+  default_word_break_characters,
   LANG_MAGIC
 };
 
@@ -664,9 +673,9 @@ const struct language_defn minimal_language_defn =
   range_check_off,
   type_check_off,
   case_sensitive_on,
+  &exp_descriptor_standard,
   c_preprocess_and_parse,
   c_error,
-  evaluate_subexp_standard,
   c_printchar,                 /* Print a character constant */
   c_printstr,                  /* Function to print string constant */
   c_emit_char,                 /* Print a single char */
@@ -675,6 +684,8 @@ const struct language_defn minimal_language_defn =
   c_val_print,                 /* Print a value using appropriate syntax */
   c_value_print,               /* Print a top-level value */
   NULL,                                /* Language specific skip_trampoline */
+  NULL,                                /* value_of_this */
+  basic_lookup_symbol_nonlocal,        /* lookup_symbol_nonlocal */
   NULL,                                /* Language specific symbol demangler */
   {"", "", "", ""},            /* Binary format info */
   {"0%lo", "0", "o", ""},      /* Octal format info */
@@ -684,6 +695,7 @@ const struct language_defn minimal_language_defn =
   1,                           /* c-style arrays */
   0,                           /* String lower bound */
   &builtin_type_char,          /* Type of string elements */
+  default_word_break_characters,
   LANG_MAGIC
 };
 
This page took 0.02587 seconds and 4 git commands to generate.