gdbsupport: re-indent ptrace.m4
[deliverable/binutils-gdb.git] / gdb / c-lang.c
index 41eac2d43a3c83bdd77aa79346ef1931e13c6bc4..329986ce88c737121d7d4d95cf7bc768f977dd42 100644 (file)
@@ -871,28 +871,13 @@ const struct exp_descriptor exp_descriptor_c =
   evaluate_subexp_c
 };
 
-/* Constant data that describes the C language.  */
-
-extern const struct language_data c_language_data =
-{
-  range_check_off,
-  case_sensitive_on,
-  array_row_major,
-  macro_expansion_c,
-  &exp_descriptor_c,
-  true,                                /* la_store_sym_names_in_linkage_form_p */
-  c_op_print_tab,              /* expression operators for printing */
-  0,                           /* String lower bound */
-  &c_varobj_ops,
-};
-
 /* Class representing the C language.  */
 
 class c_language : public language_defn
 {
 public:
   c_language ()
-    : language_defn (language_c, c_language_data)
+    : language_defn (language_c)
   { /* Nothing.  */ }
 
   /* See language.h.  */
@@ -944,6 +929,26 @@ public:
   {
     c_print_type (type, varstring, stream, show, level, flags);
   }
+
+  /* See language.h.  */
+
+  bool store_sym_names_in_linkage_form_p () const override
+  { return true; }
+
+  /* See language.h.  */
+
+  enum macro_expansion macro_expansion () const override
+  { return macro_expansion_c; }
+
+  /* See language.h.  */
+
+  const struct exp_descriptor *expression_ops () const override
+  { return &exp_descriptor_c; }
+
+  /* See language.h.  */
+
+  const struct op_print *opcode_print_table () const override
+  { return c_op_print_tab; }
 };
 
 /* Single instance of the C language class.  */
@@ -978,28 +983,13 @@ enum cplus_primitive_types {
   nr_cplus_primitive_types
 };
 
-/* Constant data that describes the C++ language.  */
-
-extern const struct language_data cplus_language_data =
-{
-  range_check_off,
-  case_sensitive_on,
-  array_row_major,
-  macro_expansion_c,
-  &exp_descriptor_c,
-  false,                       /* la_store_sym_names_in_linkage_form_p */
-  c_op_print_tab,              /* expression operators for printing */
-  0,                           /* String lower bound */
-  &cplus_varobj_ops,
-};
-
 /* A class for the C++ language.  */
 
 class cplus_language : public language_defn
 {
 public:
   cplus_language ()
-    : language_defn (language_cplus, cplus_language_data)
+    : language_defn (language_cplus)
   { /* Nothing.  */ }
 
   /* See language.h.  */
@@ -1130,7 +1120,7 @@ public:
 
   /* See language.h.  */
 
-  char *demangle (const char *mangled, int options) const override
+  char *demangle_symbol (const char *mangled, int options) const override
   {
     return gdb_demangle (mangled, options);
   }
@@ -1173,6 +1163,26 @@ public:
   const char *name_of_this () const override
   { return "this"; }
 
+  /* See language.h.  */
+
+  enum macro_expansion macro_expansion () const override
+  { return macro_expansion_c; }
+
+  /* See language.h.  */
+
+  const struct lang_varobj_ops *varobj_ops () const override
+  { return &cplus_varobj_ops; }
+
+  /* See language.h.  */
+
+  const struct exp_descriptor *expression_ops () const override
+  { return &exp_descriptor_c; }
+
+  /* See language.h.  */
+
+  const struct op_print *opcode_print_table () const override
+  { return c_op_print_tab; }
+
 protected:
 
   /* See language.h.  */
@@ -1188,28 +1198,13 @@ protected:
 
 static cplus_language cplus_language_defn;
 
-/* Constant data that describes the ASM language.  */
-
-extern const struct language_data asm_language_data =
-{
-  range_check_off,
-  case_sensitive_on,
-  array_row_major,
-  macro_expansion_c,
-  &exp_descriptor_c,
-  true,                                /* la_store_sym_names_in_linkage_form_p */
-  c_op_print_tab,              /* expression operators for printing */
-  0,                           /* String lower bound */
-  &default_varobj_ops,
-};
-
 /* A class for the ASM language.  */
 
 class asm_language : public language_defn
 {
 public:
   asm_language ()
-    : language_defn (language_asm, asm_language_data)
+    : language_defn (language_asm)
   { /* Nothing.  */ }
 
   /* See language.h.  */
@@ -1248,36 +1243,41 @@ public:
   {
     c_print_type (type, varstring, stream, show, level, flags);
   }
+
+  /* See language.h.  */
+
+  bool store_sym_names_in_linkage_form_p () const override
+  { return true; }
+
+  /* See language.h.  */
+
+  enum macro_expansion macro_expansion () const override
+  { return macro_expansion_c; }
+
+  /* See language.h.  */
+
+  const struct exp_descriptor *expression_ops () const override
+  { return &exp_descriptor_c; }
+
+  /* See language.h.  */
+
+  const struct op_print *opcode_print_table () const override
+  { return c_op_print_tab; }
 };
 
 /* The single instance of the ASM language class.  */
 static asm_language asm_language_defn;
 
-/* The following language_defn does not represent a real language.
-   It just provides a minimal support a-la-C that should allow users
-   to do some simple operations when debugging applications that use
+/* A class for the minimal language.  This does not represent a real
+   language.  It just provides a minimal support a-la-C that should allow
+   users to do some simple operations when debugging applications that use
    a language currently not supported by GDB.  */
 
-extern const struct language_data minimal_language_data =
-{
-  range_check_off,
-  case_sensitive_on,
-  array_row_major,
-  macro_expansion_c,
-  &exp_descriptor_c,
-  true,                                /* la_store_sym_names_in_linkage_form_p */
-  c_op_print_tab,              /* expression operators for printing */
-  0,                           /* String lower bound */
-  &default_varobj_ops,
-};
-
-/* A class for the minimal language.  */
-
 class minimal_language : public language_defn
 {
 public:
   minimal_language ()
-    : language_defn (language_minimal, minimal_language_data)
+    : language_defn (language_minimal)
   { /* Nothing.  */ }
 
   /* See language.h.  */
@@ -1305,6 +1305,26 @@ public:
   {
     c_print_type (type, varstring, stream, show, level, flags);
   }
+
+  /* See language.h.  */
+
+  bool store_sym_names_in_linkage_form_p () const override
+  { return true; }
+
+  /* See language.h.  */
+
+  enum macro_expansion macro_expansion () const override
+  { return macro_expansion_c; }
+
+  /* See language.h.  */
+
+  const struct exp_descriptor *expression_ops () const override
+  { return &exp_descriptor_c; }
+
+  /* See language.h.  */
+
+  const struct op_print *opcode_print_table () const override
+  { return c_op_print_tab; }
 };
 
 /* The single instance of the minimal language class.  */
This page took 0.026692 seconds and 4 git commands to generate.