gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / gdb / language.c
index c8f0349901bd897cc223e32c946a0813973f8bcb..ba4d96cf89b4a043d7cc01cfb6acc629bbeaf068 100644 (file)
@@ -60,8 +60,6 @@ static void unk_lang_printchar (int c, struct type *type,
 static void unk_lang_value_print (struct value *, struct ui_file *,
                                  const struct value_print_options *);
 
-static CORE_ADDR unk_lang_trampoline (struct frame_info *, CORE_ADDR pc);
-
 /* The current (default at startup) state of type and range checking.
    (If the modes are set to "auto", though, these are changed based
    on the default language at startup, and then again based on the
@@ -567,13 +565,10 @@ skip_language_trampoline (struct frame_info *frame, CORE_ADDR pc)
 {
   for (const auto &lang : language_defn::languages)
     {
-      if (lang->skip_trampoline != NULL)
-       {
-         CORE_ADDR real_pc = lang->skip_trampoline (frame, pc);
+      CORE_ADDR real_pc = lang->skip_trampoline (frame, pc);
 
-         if (real_pc)
-           return real_pc;
-       }
+      if (real_pc != 0)
+       return real_pc;
     }
 
   return 0;
@@ -589,8 +584,8 @@ char *
 language_demangle (const struct language_defn *current_language, 
                                const char *mangled, int options)
 {
-  if (current_language != NULL && current_language->la_demangle)
-    return current_language->la_demangle (mangled, options);
+  if (current_language != NULL)
+    return current_language->demangle (mangled, options);
   return NULL;
 }
 
@@ -744,17 +739,6 @@ unk_lang_value_print (struct value *val, struct ui_file *stream,
           "function unk_lang_value_print called."));
 }
 
-static CORE_ADDR unk_lang_trampoline (struct frame_info *frame, CORE_ADDR pc)
-{
-  return 0;
-}
-
-/* Unknown languages just use the cplus demangler.  */
-static char *unk_lang_demangle (const char *mangled, int options)
-{
-  return gdb_demangle (mangled, options);
-}
-
 static char *unk_lang_class_name (const char *mangled)
 {
   return NULL;
@@ -796,11 +780,9 @@ extern const struct language_data unknown_language_data =
   default_print_typedef,       /* Print a typedef using appropriate syntax */
   unk_lang_value_print_inner,  /* la_value_print_inner */
   unk_lang_value_print,                /* Print a top-level value */
-  unk_lang_trampoline,         /* Language specific skip_trampoline */
   "this",                      /* name_of_this */
   true,                                /* store_sym_names_in_linkage_form_p */
   basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
-  unk_lang_demangle,           /* Language specific symbol demangler */
   unk_lang_class_name,         /* Language specific
                                   class_name_from_physname */
   unk_op_print_tab,            /* expression operators for printing */
@@ -840,6 +822,14 @@ public:
   {
     error (_("unimplemented unknown_language::print_type called"));
   }
+
+  /* See language.h.  */
+
+  char *demangle (const char *mangled, int options) const override
+  {
+    /* The unknown language just uses the C++ demangler.  */
+    return gdb_demangle (mangled, options);
+  }
 };
 
 /* Single instance of the unknown language class.  */
@@ -867,11 +857,9 @@ extern const struct language_data auto_language_data =
   default_print_typedef,       /* Print a typedef using appropriate syntax */
   unk_lang_value_print_inner,  /* la_value_print_inner */
   unk_lang_value_print,                /* Print a top-level value */
-  unk_lang_trampoline,         /* Language specific skip_trampoline */
   "this",                      /* name_of_this */
   false,                       /* store_sym_names_in_linkage_form_p */
   basic_lookup_symbol_nonlocal,        /* lookup_symbol_nonlocal */
-  unk_lang_demangle,           /* Language specific symbol demangler */
   unk_lang_class_name,         /* Language specific
                                   class_name_from_physname */
   unk_op_print_tab,            /* expression operators for printing */
@@ -911,6 +899,14 @@ public:
   {
     error (_("unimplemented auto_language::print_type called"));
   }
+
+  /* See language.h.  */
+
+  char *demangle (const char *mangled, int options) const override
+  {
+    /* The auto language just uses the C++ demangler.  */
+    return gdb_demangle (mangled, options);
+  }
 };
 
 /* Single instance of the fake "auto" language.  */
This page took 0.028481 seconds and 4 git commands to generate.