diff options
Diffstat (limited to 'gdb/language.h')
-rw-r--r-- | gdb/language.h | 50 |
1 files changed, 13 insertions, 37 deletions
diff --git a/gdb/language.h b/gdb/language.h index a2ce169..9e9e7f0 100644 --- a/gdb/language.h +++ b/gdb/language.h @@ -1,6 +1,6 @@ /* Source-language-related definitions for GDB. - Copyright (C) 1991-2024 Free Software Foundation, Inc. + Copyright (C) 1991-2025 Free Software Foundation, Inc. Contributed by the Department of Computer Science at the State University of New York at Buffalo. @@ -20,8 +20,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#if !defined (LANGUAGE_H) -#define LANGUAGE_H 1 +#ifndef GDB_LANGUAGE_H +#define GDB_LANGUAGE_H #include "symtab.h" #include "gdbsupport/function-view.h" @@ -36,7 +36,6 @@ struct value_print_options; struct type_print_options; struct lang_varobj_ops; struct parser_state; -class compile_instance; struct completion_match_for_lcd; class innermost_block_tracker; @@ -390,37 +389,6 @@ struct language_defn 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. If compilation is not supported for this language - then this method returns NULL. */ - - virtual std::unique_ptr<compile_instance> get_compile_instance () const; - - /* 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; @@ -731,6 +699,10 @@ extern const struct language_defn *expected_language; extern const char lang_frame_mismatch_warn[]; +/* Controls whether to warn on a frame language mismatch. */ + +extern bool warn_frame_lang_mismatch; + /* language_mode == language_mode_auto: current_language automatically set upon selection of scope (e.g. stack frame) @@ -784,7 +756,7 @@ struct symbol * const char *name); -/* These macros define the behaviour of the expression +/* These macros define the behavior of the expression evaluator. */ /* Should we range check values against the domain of their type? */ @@ -860,6 +832,10 @@ class scoped_restore_current_language public: scoped_restore_current_language (); + + /* Set the current language as well. */ + explicit scoped_restore_current_language (enum language lang); + ~scoped_restore_current_language (); scoped_restore_current_language (scoped_restore_current_language &&other) @@ -928,4 +904,4 @@ private: enum language m_lang; }; -#endif /* defined (LANGUAGE_H) */ +#endif /* GDB_LANGUAGE_H */ |