GDB (xrefs)
|
#include "defs.h"
#include <ctype.h>
#include "gdb_string.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "value.h"
#include "gdbcmd.h"
#include "expression.h"
#include "language.h"
#include "target.h"
#include "parser-defs.h"
#include "jv-lang.h"
#include "demangle.h"
#include "symfile.h"
#include "cp-support.h"
Go to the source code of this file.
#define DEFAULT_ALLOCSIZE 4 |
Definition at line 99 of file language.c.
Referenced by add_language(), and add_target_with_completer().
void _initialize_language | ( | void | ) |
void add_language | ( | const struct language_defn * | lang | ) |
Definition at line 519 of file language.c.
References _, add_setshow_enum_cmd(), class_support, DEFAULT_ALLOCSIZE, fprintf_unfiltered(), gdb_stderr, internal_error(), language_defn::la_language, language_defn::la_magic, language_defn::la_name, LANG_MAGIC, language_auto, language_unknown, languages, languages_allocsize, languages_size, mem_fileopen(), set_language_command(), setlist, show_language_command(), showlist, ui_file_delete(), ui_file_xstrdup(), xfree(), xmalloc(), and xrealloc().
Referenced by _initialize_ada_language(), _initialize_d_language(), _initialize_go_language(), and _initialize_objc_language().
void default_get_string | ( | struct value * | value, |
gdb_byte ** | buffer, | ||
int * | length, | ||
struct type ** | char_type, | ||
const char ** | charset | ||
) |
Definition at line 687 of file language.c.
int default_pass_by_reference | ( | struct type * | type | ) |
Definition at line 660 of file language.c.
void default_print_array_index | ( | struct value * | index_value, |
struct ui_file * | stream, | ||
const struct value_print_options * | options | ||
) |
Definition at line 678 of file language.c.
References fprintf_filtered(), and LA_VALUE_PRINT.
char* default_word_break_characters | ( | void | ) |
Definition at line 670 of file language.c.
Referenced by f_word_break_characters(), and init_main().
struct type* language_bool_type | ( | const struct language_defn * | la, |
struct gdbarch * | gdbarch | ||
) | [read] |
Definition at line 955 of file language.c.
References language_gdbarch::arch_info, language_arch_info::bool_type_default, language_arch_info::bool_type_symbol, gdbarch_data(), language_defn::la_language, lookup_symbol(), SYMBOL_TYPE, type, TYPE_CODE, TYPE_CODE_BOOL, and VAR_DOMAIN.
Referenced by evaluate_subexp_opencl(), evaluate_subexp_standard(), opencl_logical_not(), and opencl_relop().
char* language_class_name_from_physname | ( | const struct language_defn * | lang, |
const char * | physname | ||
) |
Definition at line 640 of file language.c.
References language_defn::la_class_name_from_physname.
Referenced by guess_full_die_structure_name(), and guess_partial_die_structure_name().
struct language_defn* language_def | ( | enum language | lang | ) | [read] |
Definition at line 472 of file language.c.
References language_defn::la_language, and languages_size.
Referenced by cp_lookup_symbol_imports_or_template(), extract_sym(), fprintf_symbol_filtered(), gen_expr(), list_arg_or_local(), lookup_symbol_aux(), lookup_symbol_file(), parse_exp_in_context_1(), prepare_one_comp_unit(), print_frame_arg(), process_full_comp_unit(), process_full_type_unit(), py_print_single_arg(), read_var_value(), and set_cu_language().
char* language_demangle | ( | const struct language_defn * | current_language, |
const char * | mangled, | ||
int | options | ||
) |
Definition at line 630 of file language.c.
References language_defn::la_demangle.
Referenced by fprintf_symbol_filtered(), and maintenance_demangle().
enum language language_enum | ( | char * | str | ) |
Definition at line 458 of file language.c.
References language_defn::la_language, language_defn::la_name, language_unknown, and languages_size.
Referenced by set_ext_lang_command().
static void* language_gdbarch_post_init | ( | struct gdbarch * | gdbarch | ) | [static] |
Definition at line 928 of file language.c.
References language_gdbarch::arch_info, GDBARCH_OBSTACK_ZALLOC, language_defn::la_language, language_defn::la_language_arch_info, and languages_size.
void language_info | ( | int | quietly | ) |
Definition at line 372 of file language.c.
References _, case_sensitive, current_language, printf_unfiltered(), show_case_command(), show_language_command(), and show_range_command().
Referenced by check_frame_language_change().
struct type* language_lookup_primitive_type_by_name | ( | const struct language_defn * | la, |
struct gdbarch * | gdbarch, | ||
const char * | name | ||
) | [read] |
Definition at line 980 of file language.c.
References language_gdbarch::arch_info, gdbarch_data(), language_defn::la_language, p, language_arch_info::primitive_type_vector, and TYPE_NAME.
Referenced by classify_name(), find_primitive_type(), lookup_typename(), type_system_address(), and yylex().
int language_pass_by_reference | ( | struct type * | type | ) |
Definition at line 651 of file language.c.
References language_defn::la_pass_by_reference.
Referenced by aarch64_push_dummy_call(), call_function_by_hand(), default_return_in_first_hidden_param_p(), and tic6x_return_value().
char* language_str | ( | enum language | lang | ) |
Definition at line 488 of file language.c.
References language_defn::la_language, language_defn::la_name, and languages_size.
Referenced by dump_symtab_1(), frame_info(), info_ext_lang_command(), and source_info().
struct type* language_string_char_type | ( | const struct language_defn * | la, |
struct gdbarch * | gdbarch | ||
) | [read] |
Definition at line 945 of file language.c.
References language_gdbarch::arch_info, gdbarch_data(), language_defn::la_language, and language_arch_info::string_char_type.
Referenced by evaluate_subexp_c(), evaluate_subexp_standard(), read_tag_string_type(), and type_char().
int pointer_type | ( | struct type * | type | ) |
Definition at line 393 of file language.c.
References TYPE_CODE, TYPE_CODE_PTR, and TYPE_CODE_REF.
Referenced by gen_deref(), gen_equal(), gen_expr(), gen_expr_binop_rest(), gen_less(), gen_ptradd(), gen_ptrdiff(), gen_ptrsub(), gen_struct_ref(), and x_command().
void range_error | ( | const char * | string, |
... | |||
) |
Definition at line 427 of file language.c.
References _, fprintf_filtered(), gdb_stderr, internal_error(), range_check_off, range_check_on, range_check_warn, verror(), vfprintf_filtered(), and vwarning().
Referenced by parse_number().
static void set_case_command | ( | char * | ignore, |
int | from_tty, | ||
struct cmd_list_element * | c | ||
) | [static] |
Definition at line 299 of file language.c.
References _, case_mode_auto, case_mode_manual, case_sensitive, case_sensitive_off, case_sensitive_on, internal_error(), language_defn::la_case_sensitivity, set_range_case(), and warning().
Definition at line 503 of file language.c.
References gdb_stdout, help_list(), printf_unfiltered(), and setchecklist.
enum language set_language | ( | enum language | lang | ) |
Definition at line 347 of file language.c.
References language_defn::la_language, languages_size, and set_range_case().
Referenced by breakpoint_re_set(), do_restore_current_language(), dump_symtab(), gdb_init(), get_current_search_block(), parse_exp_in_context_1(), prepare_re_set_context(), select_frame(), set_initial_language(), and set_language_command().
static void set_language_command | ( | char * | ignore, |
int | from_tty, | ||
struct cmd_list_element * | c | ||
) | [static] |
Definition at line 143 of file language.c.
References current_language, get_frame_language(), internal_error(), language_defn::la_language, language_defn::la_name, language_auto, language_mode_auto, language_mode_manual, language_unknown, languages_size, set_initial_language(), set_language(), and set_range_case().
Referenced by add_language().
static void set_range_case | ( | void | ) | [static] |
Definition at line 334 of file language.c.
References case_mode_auto, language_defn::la_case_sensitivity, language_defn::la_range_check, and range_mode_auto.
Referenced by set_case_command(), set_language(), set_language_command(), and set_range_command().
static void set_range_command | ( | char * | ignore, |
int | from_tty, | ||
struct cmd_list_element * | c | ||
) | [static] |
Definition at line 225 of file language.c.
References _, internal_error(), language_defn::la_range_check, range_check_off, range_check_on, range_check_warn, range_mode_auto, range_mode_manual, set_range_case(), and warning().
static void show_case_command | ( | struct ui_file * | file, |
int | from_tty, | ||
struct cmd_list_element * | c, | ||
const char * | value | ||
) | [static] |
Definition at line 261 of file language.c.
References _, case_mode_auto, case_sensitive_off, case_sensitive_on, fprintf_filtered(), gdb_stdout, internal_error(), language_defn::la_case_sensitivity, and warning().
Referenced by language_info().
static void show_check | ( | char * | ignore, |
int | from_tty | ||
) | [static] |
Definition at line 511 of file language.c.
References cmd_show_list(), and showchecklist.
static void show_language_command | ( | struct ui_file * | file, |
int | from_tty, | ||
struct cmd_list_element * | c, | ||
const char * | value | ||
) | [static] |
Definition at line 119 of file language.c.
References _, fprintf_filtered(), gdb_stdout, get_frame_language(), language_defn::la_language, language_defn::la_name, lang_frame_mismatch_warn, language_mode_auto, language_mode_manual, language_unknown, and printf_filtered().
Referenced by add_language(), and language_info().
static void show_range_command | ( | struct ui_file * | file, |
int | from_tty, | ||
struct cmd_list_element * | c, | ||
const char * | value | ||
) | [static] |
Definition at line 187 of file language.c.
References _, fprintf_filtered(), gdb_stdout, internal_error(), language_defn::la_range_check, range_check_off, range_check_on, range_check_warn, range_mode_auto, and warning().
Referenced by language_info().
CORE_ADDR skip_language_trampoline | ( | struct frame_info * | frame, |
CORE_ADDR | pc | ||
) |
Definition at line 605 of file language.c.
References languages_size, and language_defn::skip_trampoline.
Referenced by handle_inferior_event().
static char* unk_lang_class_name | ( | const char * | mangled | ) | [static] |
Definition at line 771 of file language.c.
static char* unk_lang_demangle | ( | const char * | mangled, |
int | options | ||
) | [static] |
Definition at line 766 of file language.c.
References gdb_demangle().
static void unk_lang_emit_char | ( | int | c, |
struct type * | type, | ||
struct ui_file * | stream, | ||
int | quoter | ||
) | [static] |
Definition at line 708 of file language.c.
static void unk_lang_error | ( | char * | msg | ) | [static] |
Definition at line 702 of file language.c.
static int unk_lang_parser | ( | void | ) | [static] |
Definition at line 696 of file language.c.
static void unk_lang_print_type | ( | struct type * | type, |
const char * | varstring, | ||
struct ui_file * | stream, | ||
int | show, | ||
int | level, | ||
const struct type_print_options * | flags | ||
) | [static] |
Definition at line 733 of file language.c.
static void unk_lang_printchar | ( | int | c, |
struct type * | type, | ||
struct ui_file * | stream | ||
) | [static] |
Definition at line 716 of file language.c.
static void unk_lang_printstr | ( | struct ui_file * | stream, |
struct type * | type, | ||
const gdb_byte * | string, | ||
unsigned int | length, | ||
const char * | encoding, | ||
int | force_ellipses, | ||
const struct value_print_options * | options | ||
) | [static] |
Definition at line 723 of file language.c.
static CORE_ADDR unk_lang_trampoline | ( | struct frame_info * | frame, |
CORE_ADDR | pc | ||
) | [static] |
Definition at line 760 of file language.c.
static void unk_lang_val_print | ( | struct type * | type, |
const gdb_byte * | valaddr, | ||
int | embedded_offset, | ||
CORE_ADDR | address, | ||
struct ui_file * | stream, | ||
int | recurse, | ||
const struct value * | val, | ||
const struct value_print_options * | options | ||
) | [static] |
Definition at line 742 of file language.c.
static void unk_lang_value_print | ( | struct value * | val, |
struct ui_file * | stream, | ||
const struct value_print_options * | options | ||
) | [static] |
Definition at line 753 of file language.c.
static void unknown_language_arch_info | ( | struct gdbarch * | gdbarch, |
struct language_arch_info * | lai | ||
) | [static] |
Definition at line 782 of file language.c.
References language_arch_info::bool_type_default, builtin_type::builtin_char, builtin_type::builtin_int, builtin_type(), GDBARCH_OBSTACK_CALLOC, language_arch_info::primitive_type_vector, and language_arch_info::string_char_type.
int value_true | ( | struct value * | val | ) |
Definition at line 405 of file language.c.
References value_logical_not().
Referenced by breakpoint_cond_eval(), execute_control_command(), and should_stop_exception().
struct language_defn auto_language_defn |
Definition at line 834 of file language.c.
enum case_mode case_mode = case_mode_auto |
Definition at line 81 of file language.c.
const char* case_sensitive [static] |
Definition at line 106 of file language.c.
Referenced by language_info(), and set_case_command().
Definition at line 82 of file language.c.
struct language_defn* current_language = &unknown_language_defn |
Definition at line 86 of file language.c.
Referenced by ada_val_print_1(), ada_value_print(), ada_varobj_get_value_image(), address_info(), allocate_repeat_value(), apply_frame_filter(), bpfinishpy_handle_exit(), bpfinishpy_handle_stop(), breakpoint_re_set(), c_type_print_varspec_suffix(), c_val_print(), c_value_print(), check_frame_language_change(), cmdpy_destroyer(), cmdpy_function(), coerce_array(), cp_print_static_field(), cp_print_value(), cp_print_value_fields(), cp_type_print_method_args(), decode_line_1(), decode_line_full(), default_print_one_register_info(), extract_sym(), f77_print_array_1(), f_val_print(), find_slot_in_mapped_hash(), gdb_eval(), gdb_init(), gdbpy_breakpoint_has_py_cond(), gdbpy_should_stop(), generic_val_print(), get_current_search_block(), get_register(), get_set_value(), get_show_value(), init_raw_breakpoint_without_location(), java_print_value_fields(), java_value_print(), language_info(), language_search_unquoted_string(), line_completion_function(), lookup_minimal_symbol_internal(), lookup_symbol(), lookup_symbol_in_objfile_from_linkage_name(), lookup_transparent_type(), m2_print_array_contents(), m2_val_print(), maintenance_demangle(), make_cleanup_restore_current_language(), mi_cmd_data_evaluate_expression(), mt_registers_info(), op_string(), output_register(), parse_exp_in_context_1(), pascal_object_print_static_field(), pascal_object_print_value_fields(), pascal_val_print(), pascal_value_print(), print_field_values(), print_frame_arg(), print_variable_and_value(), print_variable_at_address(), print_variable_or_computed(), printf_wide_c_string(), psymtab_search_name(), py_free_objfile(), py_free_pspace(), python_inferior_exit(), python_new_objfile(), python_on_normal_stop(), python_on_resume(), save_objfile_types(), select_frame(), set_initial_language(), set_language_command(), sh64_do_register(), skip_quoted_chars(), stap_parse_argument(), tic6x_return_value(), ui_printf(), val_print_array_elements(), val_print_packed_array_elements(), val_print_scalar_formatted(), value_arg_coerce(), value_array(), value_cast(), value_cstring(), value_get_print_value(), value_print(), value_string(), value_subscript(), value_user_defined_op(), VEC(), and wrap_val_print().
struct language_defn* expected_language |
Definition at line 92 of file language.c.
Referenced by check_frame_language_change(), gdb_init(), and set_initial_language().
char lang_frame_mismatch_warn[] = "Warning: the current language does not match this frame." |
Definition at line 110 of file language.c.
Referenced by check_frame_language_change(), and show_language_command().
Definition at line 103 of file language.c.
struct gdbarch_data* language_gdbarch_data [static] |
Definition at line 918 of file language.c.
Definition at line 87 of file language.c.
struct language_defn** languages [static] |
Definition at line 96 of file language.c.
Referenced by add_language().
unsigned languages_allocsize [static] |
Definition at line 98 of file language.c.
Referenced by add_language().
unsigned languages_size [static] |
Definition at line 97 of file language.c.
Referenced by add_language(), language_def(), language_enum(), language_gdbarch_post_init(), language_str(), set_language(), set_language_command(), and skip_language_trampoline().
struct language_defn local_language_defn |
Definition at line 875 of file language.c.
Definition at line 105 of file language.c.
Referenced by m2_is_long_set(), m2_is_long_set_of_type(), m2_print_long_set(), and upgrade_type().
Definition at line 80 of file language.c.
enum range_mode range_mode = range_mode_auto |
Definition at line 79 of file language.c.
Definition at line 104 of file language.c.
Referenced by ada_array_bound_from_type(), ada_array_element_type(), ada_check_typedef(), ada_coerce_to_simple_array_type(), ada_get_decoded_type(), ada_get_tsd_from_tag(), ada_tasks_inferior_data_sniffer(), ada_to_fixed_type(), ada_to_fixed_type_1(), ada_typedef_target_type(), ada_value_primitive_field(), ada_variant_discrim_name(), ada_varobj_ind(), ada_varobj_simple_array_elt(), ada_varobj_struct_elt(), add_class_symbol(), add_memrange(), add_reg(), add_set_or_show_cmd(), add_to_method_list(), add_undefined_type_1(), add_undefined_type_noname(), alloc_type(), alloc_type_arch(), alloc_type_instance(), allocate_stub_method(), allocate_value_lazy(), arch_flags_type(), arch_type(), arm_pc_is_thumb(), arm_print_float_info(), bfd_uses_spe_extensions(), bptype_string(), build_command_line(), c_textual_element_type(), c_type_of_child(), c_val_print(), c_value_print(), check_field(), check_parameter_typelist(), check_stub_method(), check_typedef(), classify_inner_name(), classify_name(), cleanup_undefined_types_1(), cleanup_undefined_types_noname(), coerce_array(), coff_alloc_type(), coff_read_enum_type(), coff_read_struct_type(), constrained_packed_array_type(), copy_type_recursive(), cp_pass_by_reference(), cp_print_value_fields_rtti(), cplus_describe_child(), cplus_number_of_children(), cplus_type_of_child(), d_qualify(), decimal_from_integral(), decode_base_type(), decode_constrained_packed_array(), decode_type(), default_value_is_changeable_p(), deprecated_set_value_type(), desc_base_type(), disassemble_dwarf_expression(), dwarf2_compute_name(), dwarf2_fetch_constant_bytes(), dynamic_template_type(), empty_record(), evaluate_subexp_c(), evaluate_subexp_for_sizeof(), evaluate_subexp_java(), evaluate_subexp_modula2(), evaluate_subexp_standard(), evaluate_subexp_with_coercion(), execute_stack_op(), f77_create_arrayprint_offset_tbl(), find_function_in_inferior(), find_method_list(), find_primitive_type(), fixup_go_packaging(), float_type_from_length(), flush_ea_cache(), fprint_target_auxv(), func_addr_to_tail_call_list(), gdb_regformat(), GDB_val_print(), GDB_value_cast(), gdbpy_create_lazy_string_object(), gen_bitfield_ref(), gen_cast(), gen_expr(), gen_expr_binop_rest(), gen_struct_elt_for_reference(), gen_struct_ref(), generic_val_print(), get_base_type(), get_signatured_type(), get_target_type(), get_tcb_types_info(), get_type(), get_value_type(), gnu_wait(), gnuv3_get_typeid(), gnuv3_print_vtable(), ia64_push_dummy_call(), indirect_pieced_value(), info_mach_ports_command(), init_gen_win_info(), init_type(), initialize_tdesc_aarch64(), initialize_tdesc_amd64(), initialize_tdesc_amd64_avx(), initialize_tdesc_amd64_avx_linux(), initialize_tdesc_amd64_linux(), initialize_tdesc_arm_with_iwmmxt(), initialize_tdesc_i386(), initialize_tdesc_i386_avx(), initialize_tdesc_i386_avx_linux(), initialize_tdesc_i386_linux(), initialize_tdesc_powerpc_7400(), initialize_tdesc_powerpc_altivec32(), initialize_tdesc_powerpc_altivec32l(), initialize_tdesc_powerpc_altivec64(), initialize_tdesc_powerpc_altivec64l(), initialize_tdesc_powerpc_cell32l(), initialize_tdesc_powerpc_cell64l(), initialize_tdesc_powerpc_isa205_altivec32l(), initialize_tdesc_powerpc_isa205_altivec64l(), initialize_tdesc_powerpc_isa205_vsx32l(), initialize_tdesc_powerpc_isa205_vsx64l(), initialize_tdesc_powerpc_vsx32(), initialize_tdesc_powerpc_vsx32l(), initialize_tdesc_powerpc_vsx64(), initialize_tdesc_powerpc_vsx64l(), initialize_tdesc_x32(), initialize_tdesc_x32_avx(), initialize_tdesc_x32_avx_linux(), initialize_tdesc_x32_linux(), inspect_type(), iq2000_push_dummy_call(), is_path_expr_parent(), java_array_type(), java_link_class_type(), java_value_print(), language_bool_type(), linux_get_siginfo_type(), list_args_or_locals(), lookup_opencl_vector_type(), lookup_struct_elt_type(), lookup_symbol_file(), lookup_typename(), m32r_insert_watchpoint(), m32r_push_dummy_call(), m68hc11_push_dummy_call(), m68k_ps_type(), maint_print_c_tdesc_cmd(), maintenance_print_type(), make_cleanup_ui_out_end(), make_function_type(), make_params(), make_pointer_type(), make_qualified_type(), make_reference_type(), mi_print_value_p(), mips_common_breakpoint(), mips_linux_insert_watchpoint(), mips_make_srec(), new_symbol_full(), parse_number(), parse_string_or_char(), parse_tracepoint_definition(), print_range(), print_record_type(), print_variable_or_computed(), print_varobj(), process_one_symbol(), process_structure_scope(), procfs_breakpoint(), push_level(), py_print_type(), read_array_type(), read_base_type(), read_dbx_dynamic_symtab(), read_enum_type(), read_enumeration_type(), read_member_functions(), read_module_type(), read_namespace(), read_namespace_type(), read_ofile_symtab(), read_structure_type(), read_subroutine_type(), read_tag_pointer_type(), read_tag_ptr_to_member_type(), read_tag_reference_type(), read_tag_string_type(), read_type(), read_unspecified_type(), record_full_entry_release(), record_full_save(), reggroup_new(), reggroups_dump(), rs6000_lynx178_push_dummy_call(), rs6000_push_dummy_call(), safe_parse_type(), sdata_make_value(), set_die_type(), set_type(), sh64_push_dummy_call(), sh_push_dummy_call_fpu(), sh_push_dummy_call_nofpu(), smash_type(), sparc64_fprs_type(), sparc64_fsr_type(), sparc64_pstate_type(), sparc_fsr_type(), sparc_psr_type(), static_unwrap_type(), target_auxv_search(), tdesc_create_flags(), tdesc_create_struct(), tdesc_create_union(), tdesc_create_vector(), tdesc_free_feature(), tdesc_gdb_type(), tdesc_named_type(), template_to_static_fixed_type(), to_fixed_range_type(), to_record_with_fixed_variant_part(), to_static_fixed_type(), tui_all_windows_info(), tui_alloc_win_info(), tui_default_win_height(), tui_is_window_visible(), tui_next_win(), tui_prev_win(), tui_refresh_all(), tui_refresh_all_win(), type_from_class(), type_name_no_tag_or_error(), typy_fields_items(), typy_get_composite(), typy_lookup_type(), typy_lookup_typename(), update_dynamic_varobj_children(), update_watchpoint(), value_assign(), value_complement(), value_neg(), value_nsstring(), value_pos(), value_primitive_field(), value_reinterpret_cast(), value_rtti_indirect_type(), value_virtual_fn_field(), varobj_editable_p(), whatis_exp(), wrap_val_print(), wrap_value_cast(), and write_var_or_type().
struct op_print unk_op_print_tab[] [static] |
{ {NULL, OP_NULL, PREC_NULL, 0} }
Definition at line 776 of file language.c.
Definition at line 791 of file language.c.