60 struct ui_file *stream,
int quoter);
98 #define DEFAULT_ALLOCSIZE 4
110 "Warning: the current language does not match this frame.";
125 _(
"The current source language is "
126 "\"auto; currently %s\".\n"),
130 _(
"The current source language is \"%s\".\n"),
170 current_language = languages[i];
179 "Couldn't find language `%s' in known languages list.",
206 "Unrecognized range check setting.");
210 _(
"Range checking is \"auto; currently %s\".\n"),
218 warning (
_(
"the current range check setting "
219 "does not match the language.\n"));
226 if (strcmp (
range,
"on") == 0)
231 else if (strcmp (
range,
"warn") == 0)
236 else if (strcmp (
range,
"off") == 0)
241 else if (strcmp (
range,
"auto") == 0)
250 _(
"Unrecognized range check setting: \"%s\""),
range);
253 warning (
_(
"the current range check setting "
254 "does not match the language.\n"));
277 "Unrecognized case-sensitive setting.");
281 _(
"Case sensitivity in "
282 "name search is \"auto; currently %s\".\n"),
287 _(
"Case sensitivity in name search is \"%s\".\n"),
291 warning (
_(
"the current case sensitivity setting does not match "
319 "Unrecognized case-sensitive setting: \"%s\"",
324 warning (
_(
"the current case sensitivity setting does not match "
357 current_language = languages[i];
363 return prev_language;
373 if (quietly && expected_language == current_language)
430 va_start (args,
string);
462 if (strcmp (languages[i]->
la_name, str) == 0)
505 "\"set check\" must be followed by the name of a check subcommand.\n");
521 static const char **language_names = NULL;
523 char *language_set_doc = NULL;
531 "Magic number of %s language struct wrong\n",
534 _(
"failed internal consistency check"));
553 language_names =
xrealloc (language_names,
556 language_names[i] = languages[i]->
la_name;
557 language_names[i] = NULL;
563 _(
"Set the current source language.\n"
564 "The currently understood settings are:\n\nlocal or "
565 "auto Automatic setting based on source file\n"));
580 toupper (languages[i]->
la_name[0]),
588 (
const char **) language_names,
591 _(
"Show the current source language."),
596 xfree (language_set_doc);
630 const char *mangled,
int options)
632 if (current_language != NULL && current_language->
la_demangle)
633 return current_language->
la_demangle (mangled, options);
640 const char *physname)
671 return " \t\n!@#$%^&*()+=|~`}{[]\"';:?/>.<,-";
687 struct type **char_type,
const char **charset)
689 error (
_(
"Getting a string is unsupported in this language."));
703 error (
_(
"Attempted to parse an expression with unknown language"));
710 error (
_(
"internal error - unimplemented "
711 "function unk_lang_emit_char called."));
717 error (
_(
"internal error - unimplemented "
718 "function unk_lang_printchar called."));
723 const gdb_byte *
string,
unsigned int length,
724 const char *
encoding,
int force_ellipses,
727 error (
_(
"internal error - unimplemented "
728 "function unk_lang_printstr called."));
733 struct ui_file *stream,
int show,
int level,
736 error (
_(
"internal error - unimplemented "
737 "function unk_lang_print_type called."));
743 struct ui_file *stream,
int recurse,
744 const struct value *val,
747 error (
_(
"internal error - unimplemented "
748 "function unk_lang_val_print called."));
755 error (
_(
"internal error - unimplemented "
756 "function unk_lang_value_print called."));
822 default_make_symbol_completion_list,
869 default_make_symbol_completion_list,
914 default_make_symbol_completion_list,
947 if (languages[i] != NULL
948 && languages[i]->la_language_arch_info != NULL)
960 language_gdbarch_data);
970 language_gdbarch_data);
992 static struct type **
1014 language_gdbarch_data);
1092 language_gdbarch_data);
1100 "language_lookup_primitive_type_as_symbol"
1129 static const char *
const type_or_range_names[]
1130 = {
"on",
"off",
"warn",
"auto", NULL };
1132 static const char *
const case_sensitive_names[]
1133 = {
"on",
"off",
"auto", NULL };
1135 language_gdbarch_data
1141 _(
"Set the status of the type/range checker."),
1147 _(
"Show the status of the type/range checker."),
1154 _(
"Set range checking. (on/warn/off/auto)"),
1155 _(
"Show range checking. (on/warn/off/auto)"),
1162 Set case sensitivity in name search. (on/off/auto)"),
_(
"\
1163 Show case sensitivity in name search. (on/off/auto)"),
_(
"\
1164 For Fortran the default is off; for other languages the default is on."),
1174 type = xstrdup (
"auto");
1175 range = xstrdup (
"auto");
enum language language_enum(char *str)
const struct language_defn unknown_language_defn
static char * unk_lang_class_name(const char *mangled)
struct cmd_list_element * add_prefix_cmd(const char *name, enum command_class theclass, cmd_cfunc_ftype *fun, const char *doc, struct cmd_list_element **prefixlist, const char *prefixname, int allow_unknown, struct cmd_list_element **list)
struct cmd_list_element * setchecklist
static const char * range
struct symbol * language_lookup_primitive_type_as_symbol(const struct language_defn *la, struct gdbarch *gdbarch, const char *name)
CORE_ADDR(* skip_trampoline)(struct frame_info *, CORE_ADDR)
#define TYPE_OBJFILE_OWNED(t)
void language_info(int quietly)
static void set_range_command(char *ignore, int from_tty, struct cmd_list_element *c)
struct cmd_list_element * showchecklist
static unsigned languages_size
int(* la_pass_by_reference)(struct type *type)
static void show_case_command(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
int pointer_type(struct type *type)
#define GDBARCH_OBSTACK_CALLOC(GDBARCH, NR, TYPE)
enum case_sensitivity la_case_sensitivity
void add_setshow_enum_cmd(const char *name, enum command_class theclass, const char *const *enumlist, const char **var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
void warning(const char *fmt,...)
#define TYPE_NAME(thistype)
char * ui_file_xstrdup(struct ui_file *file, long *length)
enum language set_language(enum language lang)
void ui_file_delete(struct ui_file *file)
void * gdbarch_data(struct gdbarch *gdbarch, struct gdbarch_data *data)
struct type * language_string_char_type(const struct language_defn *la, struct gdbarch *gdbarch)
struct ui_file * gdb_stdout
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
void internal_error(const char *file, int line, const char *fmt,...)
const struct language_defn * language_def(enum language lang)
unsigned int symbol_lookup_debug
struct value * default_read_var_value(struct symbol *var, struct frame_info *frame)
void set_initial_language(void)
enum language la_language
static void set_range_case(void)
static void * language_gdbarch_post_init(struct gdbarch *gdbarch)
void default_print_typedef(struct type *type, struct symbol *new_symbol, struct ui_file *stream)
struct type * string_char_type
void(* la_language_arch_info)(struct gdbarch *, struct language_arch_info *)
static void show_range_command(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void add_language(const struct language_defn *lang)
void printf_filtered(const char *format,...)
#define GDBARCH_OBSTACK_ZALLOC(GDBARCH, TYPE)
char lang_frame_mismatch_warn[]
static unsigned languages_allocsize
static struct symbol * language_alloc_type_symbol(enum language lang, struct type *type)
mach_port_t kern_return_t mach_port_t msgports mach_port_t kern_return_t pid_t pid mach_port_t kern_return_t mach_port_t task mach_port_t kern_return_t int flags
struct cmd_list_element * setlist
char * gdb_demangle(const char *name, int options)
char * default_word_break_characters(void)
#define SYMBOL_ACLASS_INDEX(symbol)
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)
struct symbol ** primitive_type_symbols
struct type * bool_type_default
void null_post_parser(struct expression **exp, int void_context_p)
static void show_check(char *, int)
#define SYMBOL_DOMAIN(symbol)
static void unk_lang_printchar(int c, struct type *type, struct ui_file *stream)
void range_error(const char *string,...)
void void void void verror(const char *fmt, va_list args) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF(1
void fprintf_filtered(struct ui_file *stream, const char *format,...)
static void unk_lang_value_print(struct value *, struct ui_file *, const struct value_print_options *)
static int unk_lang_parser(struct parser_state *)
void vfprintf_filtered(struct ui_file *stream, const char *format, va_list args)
void fprintf_unfiltered(struct ui_file *stream, const char *format,...)
static void set_case_command(char *ignore, int from_tty, struct cmd_list_element *c)
struct cmd_list_element * showlist
const char * bool_type_symbol
int default_pass_by_reference(struct type *type)
struct type * basic_lookup_transparent_type(const char *name)
char *(* la_class_name_from_physname)(const char *physname)
const char * language_str(enum language lang)
static struct gdbarch_data * language_gdbarch_data
enum language get_frame_language(void)
struct type * language_bool_type(const struct language_defn *la, struct gdbarch *gdbarch)
void iterate_over_symbols(const struct block *block, const char *name, const domain_enum domain, symbol_found_callback_ftype *callback, void *data)
static const struct language_defn ** languages
struct cmd_list_element * add_alias_cmd(const char *name, const char *oldname, enum command_class theclass, int abbrev_flag, struct cmd_list_element **list)
void default_print_array_index(struct value *index_value, struct ui_file *stream, const struct value_print_options *options)
static void unk_lang_emit_char(int c, struct type *type, struct ui_file *stream, int quoter)
void printf_unfiltered(const char *format,...)
#define DEFAULT_ALLOCSIZE
struct ui_file * gdb_stdlog
struct ui_file * mem_fileopen(void)
char * language_class_name_from_physname(const struct language_defn *lang, const char *physname)
void cmd_show_list(struct cmd_list_element *list, int from_tty, const char *prefix)
static void unknown_language_arch_info(struct gdbarch *gdbarch, struct language_arch_info *lai)
#define SYMBOL_OBJFILE_OWNED(symbol)
PTR xrealloc(PTR ptr, size_t size)
void help_list(struct cmd_list_element *list, const char *cmdtype, enum command_class theclass, struct ui_file *stream)
struct language_arch_info arch_info[nr_languages]
struct type * builtin_char
const struct language_defn * current_language
char *(* la_demangle)(const char *mangled, int options)
static struct type ** language_lookup_primitive_type_1(const struct language_arch_info *lai, const char *name)
char * language_demangle(const struct language_defn *current_language, const char *mangled, int options)
void default_get_string(struct value *value, gdb_byte **buffer, int *length, struct type **char_type, const char **charset)
#define TYPE_CODE(thistype)
#define default_varobj_ops
enum range_check la_range_check
struct ui_file * gdb_stderr
__extension__ enum language language
const char * host_address_to_string(const void *addr)
const struct exp_descriptor exp_descriptor_standard
struct symbol * lookup_symbol(const char *name, const struct block *block, domain_enum domain, struct field_of_this_result *is_a_field_of_this)
const struct language_defn * expected_language
struct general_symbol_info ginfo
static CORE_ADDR unk_lang_trampoline(struct frame_info *, CORE_ADDR pc)
int value_logical_not(struct value *arg1)
static void unk_lang_error(char *)
static const char * language
static int ignore(struct target_ops *ops, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
struct symbol * basic_lookup_symbol_nonlocal(const struct language_defn *langdef, const char *name, const struct block *block, const domain_enum domain)
void _initialize_language(void)
#define SYMBOL_TYPE(symbol)
static void set_check(char *, int)
static void set_language_command(char *ignore, int from_tty, struct cmd_list_element *c)
#define LA_VALUE_PRINT(val, stream, options)
static const char * case_sensitive
struct type * language_lookup_primitive_type(const struct language_defn *la, struct gdbarch *gdbarch, const char *name)
CORE_ADDR skip_language_trampoline(struct frame_info *frame, CORE_ADDR pc)
void void vwarning(const char *fmt, va_list args) ATTRIBUTE_PRINTF(1
int value_true(struct value *val)
struct type ** primitive_type_vector
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)
void error(const char *fmt,...)
static void show_language_command(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
struct gdbarch_data * gdbarch_data_register_post_init(gdbarch_data_post_init_ftype *post_init)
static void language_init_primitive_type_symbols(struct language_arch_info *lai, const struct language_defn *la, struct gdbarch *gdbarch)
static const struct op_print unk_op_print_tab[]
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)
int language_pass_by_reference(struct type *type)
static char * unk_lang_demangle(const char *mangled, int options)
struct type * builtin_int