GDB (xrefs)
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | List of all members
language_defn Struct Referenceabstract

#include "language.h"

Inheritance diagram for language_defn:
ada_language asm_language c_language cplus_language d_language f_language go_language m2_language minimal_language objc_language opencl_language pascal_language rust_language unknown_language

Public Member Functions

 language_defn (enum language lang)
 
virtual const char * name () const =0
 
virtual const char * natural_name () const =0
 
virtual const char * get_digit_separator () const
 
virtual const std::vector< const char * > & filename_extensions () const
 
virtual void print_array_index (struct type *index_type, LONGEST index_value, struct ui_file *stream, const value_print_options *options) const
 
virtual struct valueread_var_value (struct symbol *var, const struct block *var_block, frame_info_ptr frame) const
 
virtual struct language_pass_by_ref_info pass_by_reference_info (struct type *type) const
 
virtual bool symbol_printing_suppressed (struct symbol *symbol) const
 
virtual void language_arch_info (struct gdbarch *, struct language_arch_info *) const =0
 
virtual struct typelookup_transparent_type (const char *name) const
 
virtual bool iterate_over_symbols (const struct block *block, const lookup_name_info &name, domain_enum domain, gdb::function_view< symbol_found_callback_ftype > callback) const
 
symbol_name_matcher_ftypeget_symbol_name_matcher (const lookup_name_info &lookup_name) const
 
virtual std::unique_ptr< compile_instanceget_compile_instance () const
 
virtual std::string compute_program (compile_instance *inst, const char *input, struct gdbarch *gdbarch, const struct block *expr_block, CORE_ADDR expr_pc) const
 
virtual unsigned int search_name_hash (const char *name) const
 
virtual bool sniff_from_mangled_name (const char *mangled, gdb::unique_xmalloc_ptr< char > *demangled) const
 
virtual gdb::unique_xmalloc_ptr< char > demangle_symbol (const char *mangled, int options) const
 
virtual bool can_print_type_offsets () const
 
virtual void print_type (struct type *type, const char *varstring, struct ui_file *stream, int show, int level, const struct type_print_options *flags) const =0
 
virtual CORE_ADDR skip_trampoline (const frame_info_ptr &fi, CORE_ADDR pc) const
 
virtual char * class_name_from_physname (const char *physname) const
 
virtual const char * word_break_characters (void) const
 
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
 
virtual struct block_symbol lookup_symbol_nonlocal (const char *name, const struct block *block, const domain_enum domain) const
 
virtual gdb::unique_xmalloc_ptr< char > watch_location_expression (struct type *type, CORE_ADDR addr) const
 
virtual void value_print (struct value *val, struct ui_file *stream, const struct value_print_options *options) const
 
virtual void value_print_inner (struct value *val, struct ui_file *stream, int recurse, const struct value_print_options *options) const
 
virtual int parser (struct parser_state *ps) const
 
virtual void emitchar (int ch, struct type *chtype, struct ui_file *stream, int quoter) const
 
virtual void printchar (int ch, struct type *chtype, struct ui_file *stream) const
 
virtual void printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, unsigned int length, const char *encoding, int force_ellipses, const struct value_print_options *options) const
 
virtual void print_typedef (struct type *type, struct symbol *new_symbol, struct ui_file *stream) const
 
virtual bool is_string_type_p (struct type *type) const
 
virtual bool is_array_like (struct type *type) const
 
virtual struct valueto_array (struct value *val) const
 
virtual const char * struct_too_deep_ellipsis () const
 
virtual const char * name_of_this () const
 
virtual bool c_style_arrays_p () const
 
virtual char string_lower_bound () const
 
virtual struct valuevalue_string (struct gdbarch *gdbarch, const char *ptr, ssize_t len) const
 
virtual bool store_sym_names_in_linkage_form_p () const
 
virtual bool range_checking_on_by_default () const
 
virtual enum case_sensitivity case_sensitivity () const
 
virtual enum array_ordering array_ordering () const
 
virtual enum macro_expansion macro_expansion () const
 
virtual const struct lang_varobj_opsvarobj_ops () const
 

Public Attributes

enum language la_language
 

Static Public Attributes

static const struct language_defnlanguages [nr_languages]
 

Protected Member Functions

virtual symbol_name_matcher_ftypeget_symbol_name_matcher_inner (const lookup_name_info &lookup_name) const
 

Detailed Description

Definition at line 263 of file language.h.

Constructor & Destructor Documentation

◆ language_defn()

language_defn::language_defn ( enum language lang)
inline

Definition at line 265 of file language.h.

References languages.

Referenced by expr_builder::language().

Member Function Documentation

◆ array_ordering()

virtual enum array_ordering language_defn::array_ordering ( ) const
inlinevirtual

Reimplemented in f_language.

Definition at line 660 of file language.h.

References array_row_major.

Referenced by read_array_order().

◆ c_style_arrays_p()

virtual bool language_defn::c_style_arrays_p ( ) const
inlinevirtual

◆ can_print_type_offsets()

virtual bool language_defn::can_print_type_offsets ( ) const
inlinevirtual

◆ case_sensitivity()

virtual enum case_sensitivity language_defn::case_sensitivity ( ) const
inlinevirtual

Reimplemented in f_language.

Definition at line 654 of file language.h.

References case_sensitive_on.

Referenced by set_case_command(), set_range_case(), and show_case_command().

◆ class_name_from_physname()

virtual char * language_defn::class_name_from_physname ( const char * physname) const
inlinevirtual

Reimplemented in cplus_language.

Definition at line 480 of file language.h.

Referenced by guess_full_die_structure_name().

◆ collect_symbol_completion_matches()

virtual void language_defn::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
inlinevirtual

◆ compute_program()

virtual std::string language_defn::compute_program ( compile_instance * inst,
const char * input,
struct gdbarch * gdbarch,
const struct block * expr_block,
CORE_ADDR expr_pc ) const
inlinevirtual

Reimplemented in c_language, and cplus_language.

Definition at line 414 of file language.h.

Referenced by compile_to_object().

◆ demangle_symbol()

virtual gdb::unique_xmalloc_ptr< char > language_defn::demangle_symbol ( const char * mangled,
int options ) const
inlinevirtual

◆ emitchar()

void language_defn::emitchar ( int ch,
struct type * chtype,
struct ui_file * stream,
int quoter ) const
virtual

Reimplemented in ada_language, f_language, unknown_language, m2_language, pascal_language, and rust_language.

Definition at line 146 of file c-lang.c.

References type::arch(), classify_type(), and generic_emit_char().

Referenced by printchar().

◆ filename_extensions()

virtual const std::vector< const char * > & language_defn::filename_extensions ( ) const
inlinevirtual

◆ get_compile_instance()

std::unique_ptr< compile_instance > language_defn::get_compile_instance ( ) const
virtual

Reimplemented in c_language, and cplus_language.

Definition at line 631 of file language.c.

Referenced by compile_to_object().

◆ get_digit_separator()

virtual const char * language_defn::get_digit_separator ( ) const
inlinevirtual

Reimplemented in cplus_language, and rust_language.

Definition at line 287 of file language.h.

Referenced by print_binary_chars().

◆ get_symbol_name_matcher()

symbol_name_matcher_ftype * language_defn::get_symbol_name_matcher ( const lookup_name_info & lookup_name) const

◆ get_symbol_name_matcher_inner()

symbol_name_matcher_ftype * language_defn::get_symbol_name_matcher_inner ( const lookup_name_info & lookup_name) const
protectedvirtual

Reimplemented in ada_language, cplus_language, and f_language.

Definition at line 681 of file language.c.

References default_symbol_name_matcher().

Referenced by get_symbol_name_matcher().

◆ is_array_like()

virtual bool language_defn::is_array_like ( struct type * type) const
inlinevirtual

Reimplemented in ada_language, and rust_language.

Definition at line 572 of file language.h.

Referenced by type::is_array_like().

◆ is_string_type_p()

bool language_defn::is_string_type_p ( struct type * type) const
virtual

◆ iterate_over_symbols()

virtual bool language_defn::iterate_over_symbols ( const struct block * block,
const lookup_name_info & name,
domain_enum domain,
gdb::function_view< symbol_found_callback_ftype > callback ) const
inlinevirtual

Reimplemented in ada_language.

Definition at line 370 of file language.h.

References name().

Referenced by iterate_over_all_matching_symtabs(), and iterate_over_file_blocks().

◆ language_arch_info()

virtual void language_defn::language_arch_info ( struct gdbarch * ,
struct language_arch_info *  ) const
pure virtual

◆ lookup_symbol_nonlocal()

struct block_symbol language_defn::lookup_symbol_nonlocal ( const char * name,
const struct block * block,
const domain_enum domain ) const
virtual

◆ lookup_transparent_type()

virtual struct type * language_defn::lookup_transparent_type ( const char * name) const
inlinevirtual

Reimplemented in cplus_language.

Definition at line 352 of file language.h.

References basic_lookup_transparent_type(), and name().

Referenced by lookup_transparent_type().

◆ macro_expansion()

virtual enum macro_expansion language_defn::macro_expansion ( ) const
inlinevirtual

◆ name()

virtual const char * language_defn::name ( ) const
pure virtual

◆ name_of_this()

virtual const char * language_defn::name_of_this ( ) const
inlinevirtual

◆ natural_name()

virtual const char * language_defn::natural_name ( ) const
pure virtual

◆ parser()

int language_defn::parser ( struct parser_state * ps) const
virtual

Reimplemented in ada_language, d_language, f_language, go_language, unknown_language, m2_language, pascal_language, and rust_language.

Definition at line 596 of file language.c.

References c_parse().

Referenced by parse_exp_in_context().

◆ pass_by_reference_info()

virtual struct language_pass_by_ref_info language_defn::pass_by_reference_info ( struct type * type) const
inlinevirtual

Reimplemented in cplus_language.

Definition at line 331 of file language.h.

Referenced by language_pass_by_reference().

◆ print_array_index()

void language_defn::print_array_index ( struct type * index_type,
LONGEST index_value,
struct ui_file * stream,
const value_print_options * options ) const
virtual

Reimplemented in ada_language, and f_language.

Definition at line 561 of file language.c.

References gdb_printf(), value_from_longest(), and value_print().

Referenced by maybe_print_array_index().

◆ print_type()

virtual void language_defn::print_type ( struct type * type,
const char * varstring,
struct ui_file * stream,
int show,
int level,
const struct type_print_options * flags ) const
pure virtual

◆ print_typedef()

void language_defn::print_typedef ( struct type * type,
struct symbol * new_symbol,
struct ui_file * stream ) const
virtual

Reimplemented in ada_language, f_language, unknown_language, m2_language, pascal_language, and rust_language.

Definition at line 614 of file language.c.

References c_print_typedef(), and new_symbol().

Referenced by typedef_print().

◆ printchar()

void language_defn::printchar ( int ch,
struct type * chtype,
struct ui_file * stream ) const
virtual

◆ printstr()

void language_defn::printstr ( struct ui_file * stream,
struct type * elttype,
const gdb_byte * string,
unsigned int length,
const char * encoding,
int force_ellipses,
const struct value_print_options * options ) const
virtual

◆ range_checking_on_by_default()

virtual bool language_defn::range_checking_on_by_default ( ) const
inlinevirtual

Reimplemented in f_language, m2_language, pascal_language, and rust_language.

Definition at line 647 of file language.h.

Referenced by set_range_case(), set_range_command(), and show_range_command().

◆ read_var_value()

struct value * language_defn::read_var_value ( struct symbol * var,
const struct block * var_block,
frame_info_ptr frame ) const
virtual

Reimplemented in ada_language.

Definition at line 504 of file findvar.c.

References symbol::aclass(), value::allocate(), value::allocate_optimized_out(), symbol::arch, builtin_type::builtin_data_ptr, builtin_type::builtin_func_ptr, builtin_type(), check_typedef(), value::contents_raw(), block::entry_pc(), gdbarch_iterate_over_objfiles_in_search_order(), get_frame_arch(), get_frame_args_address(), get_frame_locals_address(), get_hosting_frame(), is_dynamic_type(), type::length(), general_symbol_info::linkage_name(), LOC_ARG, LOC_BLOCK, LOC_COMPUTED, LOC_CONST, LOC_CONST_BYTES, LOC_LABEL, LOC_LOCAL, LOC_OPTIMIZED_OUT, LOC_REF_ARG, LOC_REGISTER, LOC_REGPARM_ADDR, LOC_STATIC, LOC_TYPEDEF, LOC_UNRESOLVED, lookup_pointer_type(), bound_minimal_symbol::minsym, not_lval, general_symbol_info::obj_section(), bound_minimal_symbol::objfile, obj_section::objfile, symbol::objfile(), objfile_flavour_name(), overlay_debugging, general_symbol_info::print_name(), resolve_dynamic_type(), value::set_lval(), store_signed_integer(), SYMBOL_COMPUTED_OPS, SYMBOL_NEEDS_FRAME, SYMBOL_NEEDS_REGISTERS, symbol_overlayed_address(), symbol_read_needs(), SYMBOL_REGISTER_OPS, target_has_registers(), target_translate_tls_address(), obj_section::the_bfd_section, symbol::type(), type_byte_order(), minimal_symbol::unrelocated_address(), bound_minimal_symbol::value_address(), symbol::value_address(), value_as_address(), value_at(), value_at_lazy(), symbol::value_block(), symbol::value_bytes(), value_cast_pointers(), value_from_pointer(), value_from_register(), and symbol::value_longest().

Referenced by read_var_value(), and ada_language::read_var_value().

◆ search_name_hash()

unsigned int language_defn::search_name_hash ( const char * name) const
virtual

Reimplemented in cplus_language, and f_language.

Definition at line 732 of file dictionary.c.

References msymbol_hash_iw(), and SYMBOL_HASH_NEXT.

Referenced by search_name_hash().

◆ skip_trampoline()

virtual CORE_ADDR language_defn::skip_trampoline ( const frame_info_ptr & fi,
CORE_ADDR pc ) const
inlinevirtual

Reimplemented in cplus_language, and objc_language.

Definition at line 474 of file language.h.

◆ sniff_from_mangled_name()

virtual bool language_defn::sniff_from_mangled_name ( const char * mangled,
gdb::unique_xmalloc_ptr< char > * demangled ) const
inlinevirtual

Reimplemented in cplus_language, d_language, go_language, objc_language, rust_language, and ada_language.

Definition at line 440 of file language.h.

Referenced by symbol_find_demangled_name().

◆ store_sym_names_in_linkage_form_p()

virtual bool language_defn::store_sym_names_in_linkage_form_p ( ) const
inlinevirtual

Reimplemented in ada_language, c_language, asm_language, minimal_language, go_language, and unknown_language.

Definition at line 640 of file language.h.

Referenced by dwarf2_physname().

◆ string_lower_bound()

virtual char language_defn::string_lower_bound ( ) const
inlinevirtual

Reimplemented in m2_language.

Definition at line 613 of file language.h.

References c_style_arrays_p().

Referenced by allocate_repeat_value(), value_cstring(), and value_string().

◆ struct_too_deep_ellipsis()

virtual const char * language_defn::struct_too_deep_ellipsis ( ) const
inlinevirtual

Reimplemented in ada_language, and f_language.

Definition at line 589 of file language.h.

◆ symbol_printing_suppressed()

virtual bool language_defn::symbol_printing_suppressed ( struct symbol * symbol) const
inlinevirtual

Reimplemented in ada_language.

Definition at line 340 of file language.h.

Referenced by print_variable_and_value_data::operator()().

◆ to_array()

virtual struct value * language_defn::to_array ( struct value * val) const
inlinevirtual

Reimplemented in ada_language, and rust_language.

Definition at line 579 of file language.h.

Referenced by value_to_array().

◆ value_print()

void language_defn::value_print ( struct value * val,
struct ui_file * stream,
const struct value_print_options * options ) const
virtual

◆ value_print_inner()

void language_defn::value_print_inner ( struct value * val,
struct ui_file * stream,
int recurse,
const struct value_print_options * options ) const
virtual

◆ value_string()

struct value * language_defn::value_string ( struct gdbarch * gdbarch,
const char * ptr,
ssize_t len ) const
virtual

◆ varobj_ops()

const struct lang_varobj_ops * language_defn::varobj_ops ( ) const
virtual

Reimplemented in ada_language, and cplus_language.

Definition at line 690 of file language.c.

References c_varobj_ops.

◆ watch_location_expression()

gdb::unique_xmalloc_ptr< char > language_defn::watch_location_expression ( struct type * type,
CORE_ADDR addr ) const
virtual

Reimplemented in ada_language, and rust_language.

Definition at line 575 of file language.c.

References check_typedef(), name(), and type_to_string().

Referenced by watch_command_1().

◆ word_break_characters()

virtual const char * language_defn::word_break_characters ( void ) const
inlinevirtual

Member Data Documentation

◆ la_language

enum language language_defn::la_language

Definition at line 275 of file language.h.

Referenced by add_sal_to_sals(), c_type_print_base(), check_frame_language_change(), check_valid_shift_count(), classify_name(), cp_print_value_fields(), expression::evaluate(), expr::scope_operation::evaluate_funcall(), expr::var_value_operation::evaluate_funcall(), expr::structop_base_operation::evaluate_funcall(), evaluate_subexp_for_sizeof_base(), find_array_element_type(), dw2_debug_names_iterator::find_vec_in_debug_names(), get_symbol_name_matcher(), gnuv3_print_method_ptr(), info_address_command(), iter_match_first_hashed(), dwarf2_cu::lang(), language_bool_type(), language_lookup_primitive_type_1(), language_lookup_primitive_type_as_symbol(), language_search_unquoted_string(), language_string_char_type(), lex_one_token(), linkage_name_str(), lookup_symbol(), lookup_symbol_in_objfile_from_linkage_name(), m2_print_array_contents(), parse_exp_in_context(), parse_expression_with_language(), pascal_object_print_value_fields(), c_language::print_type(), cplus_language::print_type(), asm_language::print_type(), minimal_language::print_type(), d_language::print_type(), go_language::print_type(), objc_language::print_type(), opencl_language::print_type(), resolve_dynamic_struct(), resolve_dynamic_type_internal(), scoped_restore_current_thread::scoped_restore_current_thread(), scoped_restore_selected_frame::scoped_restore_selected_frame(), scoped_switch_to_sym_language_if_auto::scoped_switch_to_sym_language_if_auto(), select_frame(), show_language_command(), tic6x_return_value(), value_arg_coerce(), value_cast(), m2_language::value_print_inner(), value_struct_elt(), value_user_defined_op(), yylex(), and yyparse().

◆ languages

const struct language_defn * language_defn::languages
static

The documentation for this struct was generated from the following files: