/* Source-language-related definitions for GDB.
- Copyright (C) 1991-2020 Free Software Foundation, Inc.
+ Copyright (C) 1991-2021 Free Software Foundation, Inc.
Contributed by the Department of Computer Science at the State University
of New York at Buffalo.
symbol_name_matcher_ftype *get_symbol_name_matcher
(const lookup_name_info &lookup_name) const;
- /* If this language allows compilation from the gdb command line, then
- this method will return an instance of struct gcc_context appropriate
- to the language. If compilation for this language is generally
- supported, but something goes wrong then an exception is thrown. The
- returned compiler instance is owned by its caller and must be
- deallocated by the caller. If compilation is not supported for this
- language then this method returns NULL. */
+ /* If this language allows compilation from the gdb command line,
+ then this method will return an instance of struct gcc_context
+ appropriate to the language. If compilation for this language is
+ generally supported, but something goes wrong then an exception
+ is thrown. If compilation is not supported for this language
+ then this method returns NULL. */
- virtual compile_instance *get_compile_instance () const
- {
- return nullptr;
- }
+ virtual std::unique_ptr<compile_instance> get_compile_instance () const;
/* This method must be overridden if 'get_compile_instance' is
overridden.
virtual int parser (struct parser_state *ps) const;
- /* Given an expression *EXPP created by prefixifying the result of
- la_parser, perform any remaining processing necessary to complete its
- translation. *EXPP may change; la_post_parser is responsible for
- releasing its previous contents, if necessary. If VOID_CONTEXT_P,
- then no value is expected from the expression. If COMPLETING is
- non-zero, then the expression has been parsed for completion, not
- evaluation. */
-
- virtual void post_parser (expression_up *expp, bool void_context_p,
- int completing,
- innermost_block_tracker *tracker) const
- {
- /* By default the post-parser does nothing. */
- }
-
/* Print the character CH (of type CHTYPE) on STREAM as part of the
contents of a literal string whose delimiter is QUOTER. */
virtual const struct lang_varobj_ops *varobj_ops () const;
- /* Definitions related to expression printing, prefixifying, and
- dumping. */
-
- virtual const struct exp_descriptor *expression_ops () const;
-
- /* Table for printing expressions. */
-
- virtual const struct op_print *opcode_print_table () const = 0;
-
protected:
/* This is the overridable part of the GET_SYMBOL_NAME_MATCHER method.
(LANG)->la_language == language_cplus || \
(LANG)->la_language == language_objc)
-extern void language_info (int);
+/* Print out the current language settings: language, range and
+ type checking. */
+
+extern void language_info ();
extern enum language set_language (enum language);
\f
#define LA_PRINT_STRING(stream, elttype, string, length, encoding, force_ellipses, options) \
(current_language->printstr (stream, elttype, string, length, \
encoding, force_ellipses,options))
-#define LA_EMIT_CHAR(ch, type, stream, quoter) \
- (current_language->emitchar (ch, type, stream, quoter))
/* Test a character to decide whether it can be printed in literal form
or needs to be printed in another representation. For example,