GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Enumerations | Functions | Variables
language.c File Reference
#include "defs.h"
#include <ctype.h>
#include "symtab.h"
#include "gdbtypes.h"
#include "value.h"
#include "gdbcmd.h"
#include "expression.h"
#include "language.h"
#include "varobj.h"
#include "target.h"
#include "parser-defs.h"
#include "demangle.h"
#include "symfile.h"
#include "cp-support.h"
#include "frame.h"
#include "c-lang.h"
#include <algorithm>
#include "gdbarch.h"

Go to the source code of this file.

Classes

class  unknown_language
 
struct  language_gdbarch
 

Enumerations

enum  range_mode { range_mode_auto , range_mode_manual }
 
enum  case_mode { case_mode_auto , case_mode_manual }
 

Functions

static void set_range_case (void)
 
static void show_language_command (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void set_language (const char *language)
 
static const char * get_language ()
 
static void show_range_command (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void set_range_command (const char *ignore, int from_tty, struct cmd_list_element *c)
 
static void show_case_command (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void set_case_command (const char *ignore, int from_tty, struct cmd_list_element *c)
 
void set_language (enum language lang)
 
void language_info ()
 
void range_error (const char *string,...)
 
enum language language_enum (const char *str)
 
const struct language_defnlanguage_def (enum language lang)
 
const char * language_str (enum language lang)
 
static void add_set_language_command ()
 
CORE_ADDR skip_language_trampoline (const frame_info_ptr &frame, CORE_ADDR pc)
 
struct language_pass_by_ref_info language_pass_by_reference (struct type *type)
 
const char * default_word_break_characters (void)
 
static bool default_symbol_name_matcher (const char *symbol_search_name, const lookup_name_info &lookup_name, completion_match_result *comp_match_res)
 
static language_gdbarchget_language_gdbarch (struct gdbarch *gdbarch)
 
struct typelanguage_string_char_type (const struct language_defn *la, struct gdbarch *gdbarch)
 
struct typelanguage_bool_type (const struct language_defn *la, struct gdbarch *gdbarch)
 
template<typename T >
static struct typelanguage_lookup_primitive_type_1 (const struct language_defn *la, struct gdbarch *gdbarch, T arg)
 
struct typelanguage_lookup_primitive_type (const struct language_defn *la, struct gdbarch *gdbarch, const char *name)
 
struct typelanguage_lookup_primitive_type (const struct language_defn *la, struct gdbarch *gdbarch, gdb::function_view< bool(struct type *)> filter)
 
struct symbollanguage_lookup_primitive_type_as_symbol (const struct language_defn *la, struct gdbarch *gdbarch, const char *name)
 
void _initialize_language ()
 

Variables

static enum range_mode range_mode = range_mode_auto
 
enum range_check range_check = range_check_off
 
static enum case_mode case_mode = case_mode_auto
 
enum case_sensitivity case_sensitivity = case_sensitive_on
 
const struct language_defncurrent_language = nullptr
 
enum language_mode language_mode = language_mode_auto
 
const struct language_defnexpected_language
 
static const char * range
 
static const char * case_sensitive
 
const char lang_frame_mismatch_warn []
 
static unknown_language unknown_language_defn
 
static const registry< gdbarch >::key< language_gdbarchlanguage_gdbarch_data
 

Enumeration Type Documentation

◆ case_mode

enum case_mode
Enumerator
case_mode_auto 
case_mode_manual 

Definition at line 65 of file language.c.

◆ range_mode

enum range_mode
Enumerator
range_mode_auto 
range_mode_manual 

Definition at line 56 of file language.c.

Function Documentation

◆ _initialize_language()

void _initialize_language ( )

Definition at line 1055 of file language.c.

Referenced by initialize_all_files().

◆ add_set_language_command()

static void add_set_language_command ( )
static

◆ default_symbol_name_matcher()

static bool default_symbol_name_matcher ( const char * symbol_search_name,
const lookup_name_info & lookup_name,
completion_match_result * comp_match_res )
static

◆ default_word_break_characters()

const char * default_word_break_characters ( void )

Definition at line 553 of file language.c.

Referenced by init_main(), and language_defn::word_break_characters().

◆ get_language()

static const char * get_language ( )
static

Definition at line 193 of file language.c.

References current_language, language_mode_auto, and language_defn::name().

Referenced by add_set_language_command(), and language_info().

◆ get_language_gdbarch()

static language_gdbarch * get_language_gdbarch ( struct gdbarch * gdbarch)
static

◆ language_bool_type()

struct type * language_bool_type ( const struct language_defn * la,
struct gdbarch * gdbarch )

◆ language_def()

const struct language_defn * language_def ( enum language lang)

◆ language_enum()

enum language language_enum ( const char * str)

◆ language_info()

void language_info ( )

◆ language_lookup_primitive_type() [1/2]

struct type * language_lookup_primitive_type ( const struct language_defn * la,
struct gdbarch * gdbarch,
const char * name )

◆ language_lookup_primitive_type() [2/2]

struct type * language_lookup_primitive_type ( const struct language_defn * la,
struct gdbarch * gdbarch,
gdb::function_view< bool(struct type *)> filter )

Definition at line 1016 of file language.c.

References language_lookup_primitive_type_1().

◆ language_lookup_primitive_type_1()

template<typename T >
static struct type * language_lookup_primitive_type_1 ( const struct language_defn * la,
struct gdbarch * gdbarch,
T arg )
static

◆ language_lookup_primitive_type_as_symbol()

struct symbol * language_lookup_primitive_type_as_symbol ( const struct language_defn * la,
struct gdbarch * gdbarch,
const char * name )

◆ language_pass_by_reference()

struct language_pass_by_ref_info language_pass_by_reference ( struct type * type)

◆ language_str()

const char * language_str ( enum language lang)

◆ language_string_char_type()

struct type * language_string_char_type ( const struct language_defn * la,
struct gdbarch * gdbarch )

◆ range_error()

void range_error ( const char * string,
... )

◆ set_case_command()

static void set_case_command ( const char * ignore,
int from_tty,
struct cmd_list_element * c )
static

◆ set_language() [1/2]

static void set_language ( const char * language )
static

◆ set_language() [2/2]

void set_language ( enum language lang)

◆ set_range_case()

static void set_range_case ( void )
static

◆ set_range_command()

static void set_range_command ( const char * ignore,
int from_tty,
struct cmd_list_element * c )
static

◆ show_case_command()

static void show_case_command ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

◆ show_language_command()

static void show_language_command ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

◆ show_range_command()

static void show_range_command ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

◆ skip_language_trampoline()

CORE_ADDR skip_language_trampoline ( const frame_info_ptr & frame,
CORE_ADDR pc )

Definition at line 526 of file language.c.

References language_defn::languages.

Referenced by process_event_stop_test().

Variable Documentation

◆ case_mode

Definition at line 77 of file language.c.

◆ case_sensitive

const char* case_sensitive
static

Definition at line 97 of file language.c.

Referenced by set_case_command().

◆ case_sensitivity

Definition at line 78 of file language.c.

◆ current_language

const struct language_defn* current_language = nullptr

Definition at line 82 of file language.c.

Referenced by ada_print_scalar(), ada_value_print(), ada_varobj_get_value_image(), advance_to_expression_complete_word_point(), allocate_repeat_value(), bppy_init(), break_command_1(), break_range_command(), dtrace_probe::build_arg_exprs(), c_type_print_base(), c_value_print(), c_value_print_array(), c_value_print_int(), check_frame_language_change(), check_valid_shift_count(), coerce_array(), collect_symbol_completion_matches(), collect_symbol_completion_matches_type(), compile_to_object(), complete_files_symbols(), complete_line_internal_1(), convert_value_from_python(), cp_print_static_field(), cp_print_value(), cp_print_value_fields(), cp_print_value_fields_pp(), create_tracepoint_from_upload(), decode_line_1(), decode_line_full(), decode_line_with_current_source(), decode_line_with_last_displayed(), default_collect_symbol_completion_matches_break_on(), default_completer_handle_brkchars(), default_print_one_register_info(), demangle_command(), dprintf_command(), edit_command(), extract_sym(), find_array_element_type(), dw2_debug_names_iterator::find_vec_in_debug_names(), fixed_point_binop(), ftrace_command(), gcc_cplus_convert_symbol(), gdb_init(), gdbpy_print_insn(), gdbscm_make_value(), gdbscm_register_breakpoint_x(), gdbscm_value_call(), gdbscm_value_print(), gdbscm_value_subscript(), generic_val_print_ref(), generic_value_print_char(), get_language(), language_defn::get_symbol_name_matcher(), gnuv3_print_method_ptr(), incomplete_type_hint(), info_address_command(), info_scope_command(), python_xmethod_worker::invoke(), iterate_over_file_blocks(), language_info(), language_pass_by_reference(), language_search_unquoted_string(), linespec_complete(), linespec_lex_to_end(), linkage_name_str(), list_command(), location_completer(), lookup_symbol(), lookup_symbol_in_objfile_from_linkage_name(), lookup_transparent_type(), m2_print_array_contents(), maybe_print_array_index(), mi_cmd_break_insert_1(), mi_cmd_data_evaluate_expression(), output_register(), parse_exp_in_context(), parse_expression_with_language(), pascal_object_print_static_field(), pascal_object_print_value_fields(), print_binary_chars(), print_frame_arg(), print_symbol(), print_type_scalar(), print_unpacked_pointer(), print_variable_and_value(), print_variable_at_address(), print_variable_or_computed(), printf_wide_c_string(), fortran_array_printer_impl::process_element(), resolve_dynamic_struct(), resolve_dynamic_type_internal(), riscv_print_one_register_info(), 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(), set_case_command(), set_initial_language(), set_language(), set_language(), set_range_case(), set_range_command(), show_case_command(), show_language_command(), show_range_command(), skip_quoted_chars(), str_value_from_setting(), strace_command(), tic6x_return_value(), trace_command(), type_print(), typedef_print(), typy_lookup_typename(), typy_repr(), typy_str(), tyscm_lookup_typename(), tyscm_type_name(), ui_printf(), until_break_command(), val_print_packed_array_elements(), val_print_string(), valpy_format_string(), valpy_str(), value_arg_coerce(), value_array(), value_cast(), value_concat(), value_cstring(), value_from_setting(), value_of_internalvar(), value_print(), pascal_language::value_print(), value_print_array_elements(), f_language::value_print_inner(), m2_language::value_print_inner(), pascal_language::value_print_inner(), value_print_scalar_formatted(), value_string(), value_struct_elt(), value_struct_elt_for_reference(), value_subscript(), value_user_defined_op(), varobj_value_get_print_value(), vlscm_binop_gdbthrow(), vlscm_print_value_smob(), vlscm_rich_compare(), vlscm_unop_gdbthrow(), watch_command_1(), and whatis_exp().

◆ expected_language

const struct language_defn* expected_language

◆ lang_frame_mismatch_warn

const char lang_frame_mismatch_warn[]
Initial value:
=
N_("Warning: the current language does not match this frame.")

Definition at line 100 of file language.c.

Referenced by check_frame_language_change(), and show_language_command().

◆ language_gdbarch_data

const registry<gdbarch>::key<language_gdbarch> language_gdbarch_data
static

Definition at line 845 of file language.c.

Referenced by get_language_gdbarch().

◆ language_mode

Definition at line 83 of file language.c.

◆ range

const char* range
static

◆ range_check

Definition at line 76 of file language.c.

◆ range_mode

Definition at line 75 of file language.c.

◆ unknown_language_defn

unknown_language unknown_language_defn
static

Definition at line 833 of file language.c.