+ /* This method must be overridden if 'get_compile_instance' is
+ overridden.
+
+ This takes the user-supplied text and returns a new bit of code
+ to compile.
+
+ INST is the compiler instance being used.
+ INPUT is the user's input text.
+ GDBARCH is the architecture to use.
+ EXPR_BLOCK is the block in which the expression is being
+ parsed.
+ EXPR_PC is the PC at which the expression is being parsed. */
+
+ virtual std::string compute_program (compile_instance *inst,
+ const char *input,
+ struct gdbarch *gdbarch,
+ const struct block *expr_block,
+ CORE_ADDR expr_pc) const
+ {
+ gdb_assert_not_reached ("language_defn::compute_program");
+ }
+
+ /* 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;
+ }
+
+ /* Return demangled language symbol version of MANGLED, or NULL. */
+ virtual char *demangle (const char *mangled, int options) const
+ {
+ return nullptr;
+ }
+
+ /* Print a type using syntax appropriate for this language. */
+
+ virtual void print_type (struct type *, const char *, struct ui_file *, int,
+ int, const struct type_print_options *) const = 0;
+
+ /* PC is possibly an unknown languages trampoline.
+ If that PC falls in a trampoline belonging to this language, return
+ the address of the first pc in the real function, or 0 if it isn't a
+ language tramp for this language. */
+ virtual CORE_ADDR skip_trampoline (struct frame_info *fi, CORE_ADDR pc) const
+ {
+ return (CORE_ADDR) 0;
+ }
+
+ /* Return class name of a mangled method name or NULL. */
+ virtual char *class_name_from_physname (const char *physname) const
+ {
+ return nullptr;
+ }
+
+ /* The list of characters forming word boundaries. */
+ virtual const char *word_break_characters (void) const
+ {
+ return default_word_break_characters ();
+ }
+
+ /* Add to the completion tracker all symbols which are possible
+ completions for TEXT. WORD is the entire command on which the
+ completion is being made. If CODE is TYPE_CODE_UNDEF, then all
+ symbols should be examined; otherwise, only STRUCT_DOMAIN symbols
+ whose type has a code of CODE should be matched. */
+
+ virtual void collect_symbol_completion_matches
+ (completion_tracker &tracker,
+ complete_symbol_mode mode,
+ symbol_name_match_type name_match_type,
+ const char *text,
+ const char *word,
+ enum type_code code) const
+ {
+ return default_collect_symbol_completion_matches_break_on
+ (tracker, mode, name_match_type, text, word, "", code);
+ }
+
+ /* This is a function that lookup_symbol will call when it gets to
+ the part of symbol lookup where C looks up static and global
+ variables. This default implements the basic C lookup rules. */
+
+ virtual struct block_symbol lookup_symbol_nonlocal
+ (const char *name,
+ const struct block *block,
+ const domain_enum domain) const;
+
+ /* Return an expression that can be used for a location
+ watchpoint. TYPE is a pointer type that points to the memory
+ to watch, and ADDR is the address of the watched memory. */
+ virtual gdb::unique_xmalloc_ptr<char> watch_location_expression
+ (struct type *type, CORE_ADDR addr) const;
+