aboutsummaryrefslogtreecommitdiff
path: root/gdb/language.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/language.h')
-rw-r--r--gdb/language.h44
1 files changed, 21 insertions, 23 deletions
diff --git a/gdb/language.h b/gdb/language.h
index 5233c0f..d5013bf 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -318,22 +318,6 @@ struct language_data
/* Return demangled language symbol, or NULL. */
char *(*la_demangle) (const char *mangled, int options);
- /* Demangle a symbol according to this language's rules. Unlike
- la_demangle, this does not take any options.
-
- *DEMANGLED will be set by this function.
-
- If this function returns 0, then *DEMANGLED must always be set
- to NULL.
-
- If this function returns 1, the implementation may set this to
- a xmalloc'd string holding the demangled form. However, it is
- not required to. The string, if any, is owned by the caller.
-
- The resulting string should be of the form that will be
- installed into a symbol. */
- int (*la_sniff_from_mangled_name) (const char *mangled, char **demangled);
-
/* Return class name of a mangled method name or NULL. */
char *(*la_class_name_from_physname) (const char *physname);
@@ -512,6 +496,27 @@ struct language_defn : language_data
/* Hash the given symbol search name. */
virtual unsigned int search_name_hash (const char *name) const;
+ /* Demangle a symbol according to this language's rules. Unlike
+ la_demangle, this does not take any options.
+
+ *DEMANGLED will be set by this function.
+
+ If this function returns false, then *DEMANGLED must always be set
+ to NULL.
+
+ If this function returns true, the implementation may set this to
+ a xmalloc'd string holding the demangled form. However, it is
+ not required to. The string, if any, is owned by the caller.
+
+ The resulting string should be of the form that will be
+ installed into a symbol. */
+ virtual bool sniff_from_mangled_name (const char *mangled,
+ char **demangled) const
+ {
+ *demangled = nullptr;
+ return false;
+ }
+
/* List of all known languages. */
static const struct language_defn *languages[nr_languages];
};
@@ -666,13 +671,6 @@ extern CORE_ADDR skip_language_trampoline (struct frame_info *, CORE_ADDR pc);
extern char *language_demangle (const struct language_defn *current_language,
const char *mangled, int options);
-/* A wrapper for la_sniff_from_mangled_name. The arguments and result
- are as for the method. */
-
-extern int language_sniff_from_mangled_name (const struct language_defn *lang,
- const char *mangled,
- char **demangled);
-
/* Return class name from physname, or NULL. */
extern char *language_class_name_from_physname (const struct language_defn *,
const char *physname);