GDB (xrefs)
Classes | Defines | Functions | Variables
/home/stan/gdb/src/gdb/language.c File Reference
#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.

Classes

struct  language_gdbarch

Defines

#define DEFAULT_ALLOCSIZE   4

Functions

void _initialize_language (void)
static void unk_lang_error (char *)
static int unk_lang_parser (void)
static void show_check (char *, int)
static void set_check (char *, int)
static void set_range_case (void)
static void unk_lang_emit_char (int c, struct type *type, struct ui_file *stream, int quoter)
static void unk_lang_printchar (int c, struct type *type, struct ui_file *stream)
static void unk_lang_value_print (struct value *, struct ui_file *, const struct value_print_options *)
static CORE_ADDR unk_lang_trampoline (struct frame_info *, CORE_ADDR pc)
static void show_language_command (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void set_language_command (char *ignore, int from_tty, struct cmd_list_element *c)
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 (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 (char *ignore, int from_tty, struct cmd_list_element *c)
enum language set_language (enum language lang)
void language_info (int quietly)
int pointer_type (struct type *type)
int value_true (struct value *val)
void range_error (const char *string,...)
enum language language_enum (char *str)
struct language_defnlanguage_def (enum language lang)
char * language_str (enum language lang)
void add_language (const struct language_defn *lang)
CORE_ADDR skip_language_trampoline (struct frame_info *frame, CORE_ADDR pc)
char * language_demangle (const struct language_defn *current_language, const char *mangled, int options)
char * language_class_name_from_physname (const struct language_defn *lang, const char *physname)
int language_pass_by_reference (struct type *type)
int default_pass_by_reference (struct type *type)
char * default_word_break_characters (void)
void default_print_array_index (struct value *index_value, struct ui_file *stream, const struct value_print_options *options)
void default_get_string (struct value *value, gdb_byte **buffer, int *length, struct type **char_type, const char **charset)
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 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 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 char * unk_lang_demangle (const char *mangled, int options)
static char * unk_lang_class_name (const char *mangled)
static void unknown_language_arch_info (struct gdbarch *gdbarch, struct language_arch_info *lai)
static void * language_gdbarch_post_init (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)
struct typelanguage_lookup_primitive_type_by_name (const struct language_defn *la, struct gdbarch *gdbarch, const char *name)

Variables

struct language_defn unknown_language_defn
enum range_mode range_mode = range_mode_auto
enum range_check range_check = range_check_off
enum case_mode case_mode = case_mode_auto
enum case_sensitivity case_sensitivity = case_sensitive_on
struct language_defncurrent_language = &unknown_language_defn
enum language_mode language_mode = language_mode_auto
struct language_defnexpected_language
static struct language_defn ** languages
static unsigned languages_size
static unsigned languages_allocsize
static const char * language
static const char * type
static const char * range
static const char * case_sensitive
char lang_frame_mismatch_warn [] = "Warning: the current language does not match this frame."
static struct op_print unk_op_print_tab []
struct language_defn auto_language_defn
struct language_defn local_language_defn
static struct gdbarch_datalanguage_gdbarch_data

Define Documentation

#define DEFAULT_ALLOCSIZE   4

Definition at line 99 of file language.c.

Referenced by add_language(), and add_target_with_completer().


Function Documentation

void _initialize_language ( void  )
void add_language ( const struct language_defn lang)
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.

References _, and error().

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.

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]
char* language_class_name_from_physname ( const struct language_defn lang,
const char *  physname 
)
struct language_defn* language_def ( enum language  lang) [read]
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)
static void* language_gdbarch_post_init ( struct gdbarch gdbarch) [static]
void language_info ( int  quietly)
struct type* language_lookup_primitive_type_by_name ( const struct language_defn la,
struct gdbarch gdbarch,
const char *  name 
) [read]
int language_pass_by_reference ( struct type type)
char* language_str ( enum language  lang)
struct type* language_string_char_type ( const struct language_defn la,
struct gdbarch gdbarch 
) [read]
int pointer_type ( struct type type)
void range_error ( const char *  string,
  ... 
)
static void set_case_command ( char *  ignore,
int  from_tty,
struct cmd_list_element c 
) [static]
static void set_check ( char *  ignore,
int  from_tty 
) [static]

Definition at line 503 of file language.c.

References gdb_stdout, help_list(), printf_unfiltered(), and setchecklist.

enum language set_language ( enum language  lang)
static void set_language_command ( char *  ignore,
int  from_tty,
struct cmd_list_element c 
) [static]
static void set_range_case ( void  ) [static]
static void set_range_command ( char *  ignore,
int  from_tty,
struct cmd_list_element c 
) [static]
static void show_case_command ( struct ui_file file,
int  from_tty,
struct cmd_list_element c,
const char *  value 
) [static]
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]
static void show_range_command ( struct ui_file file,
int  from_tty,
struct cmd_list_element c,
const char *  value 
) [static]

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.

References _, and error().

static void unk_lang_error ( char *  msg) [static]

Definition at line 702 of file language.c.

References _, and error().

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.

References _, and error().

static void unk_lang_printchar ( int  c,
struct type type,
struct ui_file stream 
) [static]

Definition at line 716 of file language.c.

References _, and error().

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.

References _, and error().

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.

References _, and error().

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.

References _, and error().

static void unknown_language_arch_info ( struct gdbarch gdbarch,
struct language_arch_info lai 
) [static]
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().


Variable Documentation

Definition at line 834 of file language.c.

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.

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().

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().

const char* language [static]

Definition at line 103 of file language.c.

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 875 of file language.c.

const char* range [static]

Definition at line 80 of file language.c.

Definition at line 79 of file language.c.

const char* type [static]

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]
Initial value:
{
  {NULL, OP_NULL, PREC_NULL, 0}
}

Definition at line 776 of file language.c.

Definition at line 791 of file language.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines