aboutsummaryrefslogtreecommitdiff
path: root/gdb/p-lang.c
AgeCommit message (Collapse)AuthorFilesLines
2003-10-06 * language.h (language_defn): new field, la_word_break_characters.Joel Brobecker1-0/+1
* language.c (unknown_language_defn): Set new field to default_word_break_characters. (auto_language_defn): Likewise. (local_language_defn): Likewise. * ada-lang.c (ada_language_defn): Likewise. * c-lang.c (c_language_defn): Likewise. (cplus_language_defn): Likewise. (asm_language_defn): Likewise. (minimal_language_defn): Likewise. * f-lang.c (f_language_defn): Likewise. * jv-lang.c (java_language_defn): Likewise. * m2-lang.c (m2_language_defn): Likewise. * objc-lang.c (objc_language_defn): Likewise. * p-lang.c (pascal_language_defn): Likewise. * scm-lang.c (scm_language_defn): Likewise.
2003-09-25* parser-defs.h (struct exp_descriptor): New definition, containingPaul N. Hilfinger1-1/+1
language-specific info for printing, prefixifying, dumping, and evaluating expressions. (exp_descriptor_standard): Declare new variable. (print_subexp): Make global and declare here (from expprint.c). (dump_subexp): Ditto. (dump_subexp_body_standard): Declare. (operator_length_standard): Declare. (op_name_standard): Declare. (print_subexp): Declare. (print_subexp_standard): Declare. * language.h (struct language_defn): Add la_exp_desc field to hold pointer to table for language-specific operators. Remove evaluate_exp field, which is now in struct exp_descriptor. * parse.c (operator_length): Move most code to new operator_length_standard function. Use language-specific information. (operator_length_standard): New function taking most code from operator_length. (exp_descriptor_standard): New constant. * expression.h (enum exp_opcode): Add definitions of OP_EXTENDED0 and OP_EXTENDED_LAST. * expprint.c (print_subexp): Use language-specific print_subexp. Make global; remove static declaration. Move most code to print_subexp_standard. (print_subexp_standard): New function, containing code formerly in print_subexp. (op_name): Add expression to argument signature. Use langauge-specific op_name. Move most code to op_name_standard. (op_name_standard): New function, containing code formerly in op_name. (dump_subexp): Use new version of op_name function. Use language-specific dump_subexp_body, and move most existing code to dump_subexp_body_standard. (dump_raw_expression): Use new op_name interface. (dump_subexp_body): Move most code to dump_subexp_body_standard. (dump_subexp_body_standard): New function, containing code formerly in dump_subexp_body. * language.c (unknown_language): Add default la_exp_desc field and remove evaluate_exp field. (auto_language): Ditto. (local_language): Ditto. * f-lang.c (f_language_defn): Ditto. * c-lang.c (c_language_defn): Ditto. (cplus_language_defn): Ditto. (asm_language_defn): Ditto. (minimal_language_defn): Ditto. * p-lang.c (pascal_language_defn): Ditto. * m2-lang.c (m2_language_defn): Ditto. * objc-lang.c (objc_language_defn): Ditto. * jv-lang.c (exp_descriptor_java): New variable, containing Java-specific expression evaluator. (java_language_defn): Add la_exp_desc field and remove evaluate_exp field. * scm-lang.c (exp_descriptor_scm): New variable, containing Scheme-specific expression evaluator. (scm_language_defn): Add la_exp_desc field and remove evaluate_exp field. * objc-lang.c (print_object_command): Take evaluate_exp from the la_exp_desc field. * Makefile.in (eval.o): Add dependency on parser-defs.h. * eval.c: Include parser-defs.h for the full declaration of la_exp_desc's type. (evaluate_subexp): Get evaluate_exp out of la_exp_desc field.
2003-09-092003-09-09 Paul N. Hilfinger <hilfingr@gnat.com>Paul N. Hilfinger1-4/+4
* p-lang.c: Eliminate "register". * c-lang.c: Ditto. * expprint.c: Ditto. * f-lang.c: Ditto. * jv-lang.c: Ditto. * language.c: Ditto. * m2-lang.c: Ditto. * parse.c: Ditto. * scm-lang.c: Ditto. * objc-lang.c: Ditto.
2003-05-202003-05-19 David Carlton <carlton@bactrian.org>David Carlton1-0/+3
* language.h (struct language_defn): Add 'la_value_of_this' and 'la_lookup_symbol_nonlocal' members. * symtab.h: Declare basic_lookup_symbol_nonlocal, lookup_symbol_static, lookup_symbol_global, lookup_symbol_aux_block. * symtab.c (lookup_symbol_aux): Call language hooks to determine if we should search fields of this and how to do static/global lookup. (lookup_symbol_aux_block): Make extern. (basic_lookup_symbol_nonlocal): New. (lookup_symbol_static, lookup_symbol_global): Ditto. * ada-lang.c (ada_language_defn): Set 'la_value_of_this' and 'la_lookup_symbol_nonlocal' members. * c-lang.c (c_language_defn, cplus_language_defn) (asm_language_defn, minimal_language_defn): Ditto. * jv-lang.c (java_language_defn): Ditto. * language.c (unknown_language_defn, auto_language_defn) (local_language_defn): Ditto. * m2-lang.c (m2_language_defn): Ditto. * objc-lang.c (objc_language_defn): Ditto. * scm-lang.c (scm_language_defn): Ditto. * f-lang.c (f_language_defn): Ditto, and include value.h as well. * p-lang.c (pascal_language_defn): Ditto for both. * Makefile.in (f-lang.o): Depend on value_h. (p-lang.o): Ditto.
2003-05-152003-05-15 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-1/+0
* c-lang.c (c_printstr): Delete "extern inspect_it" declaration. * p-valprint.c (pascal_object_print_value_fields): Ditto. * p-lang.c (pascal_printstr): Ditto. * objc-lang.c (objc_printstr): Ditto. * m2-lang.c (m2_printstr): Ditto. * jv-valprint.c (java_print_value_fields): Ditto. * f-lang.c (f_printstr): Ditto. * cp-valprint.c (cp_print_value_fields): Ditto. Include "valprint.h". * ada-valprint.c (inspect_it, repeat_count_threshold): Ditto, and for repeat_count_threshold. * Makefile.in (cp-valprint.o): Update dependencies.
2003-04-02* Makefile.in (c_lang.o, jv_lang.o, language.o): Add $(demangle_h).Adam Fedor1-0/+1
* language.h (struct language_defn): Add la_demangle. (language_demangle): Declare. * language.c (language_demangle): New function. (unk_lang_demangle): Likewise. (unknown_language_defn, auto_language_defn, local_language_defn): Add ukn_lang_demangle. * ada-lang.c (ada_language_defn): Add NULL for la_demangle element. * f-lang.c, m2-lang.c, p-lang.c, scm-lang.c: Likewise. * c-lang.c (c_language_defn, asm_language_defn): Likewise. (cplus_language_defn): Add cplus_demangle for la_demangle element. * jv-lang.c (java_demangle): New function (java_language_defn): Use it for la_demangle element. * objc-lang.c (objc_demangle): Add options argument (objc_language_defn): Use objc_demangle for la_demangle element. * maint.c (maintenance_demangle): Replace switch with call to language_demangle. * utils.c (fprintf_symbol_filtered): Likewise.
2003-03-26* Makefile.in (infrun.o): Add $(language_h)Adam Fedor1-0/+1
* infrun.c (handle_inferior_event): Use skip_language_trampoline for language specific trampolines. * language.h (struct language_defn): Add skip_trampoline. (skip_language_trampoline): Declare. * language.c (unk_lang_trampoline, skip_language_trampoline): New functions. (unknown_language_defn, auto_language_defn, local_language_defn): Add ukn_lang_trampoline. * ada-lang.c (ada_language_defn): Add NULL for language specific skip_trampoline. * c-lang.c, f-lang.c, jv-lang.c, m2-lang.c, p-lang.c, scm-lang.c: Likewise. * objc-lang.c (objc_skip_trampoline): New function. (objc_language_defn): Add objc_skip_trampoline.
2002-08-27 * Makefile.in (osabi.o, i387-tdep.o, i386-linux-nat.o, lin-lwp.o,Tom Tromey1-0/+1
ax-gdb.o, signals.o, jv-valprint.o, c-valprint.o, cp-abi.o): Update dependencies. * i387-tdep.c: Include gdb_string.h. * osabi.c: Likewise. * i386-linux-nat.c: Likewise. * lin-lwp.c: Likewise. * ax-gdb.c: Likewise. * signals/signals.c: Likewise. * jv-valprint.c: Likewise. * p-lang.c: Likewise. * c-valprint.c: Likewise. * cp-abi.c: Likewise.
2002-05-132002-05-13 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz1-2/+2
* ax-gdb.c (gen_sign_extend, gen_fetch, gen_usual_unary) (gen_cast, gen_scale, gen_add, gen_sub, gen_binop, gen_deref) (gen_address_of, gen_struct_ref, gen_repeat): Use type access macros. * c-typeprint.c (cp_type_print_method_args): Likewise. (c_type_print_args): Likewise. * d10v-tdep.c (d10v_push_arguments): Likewise. (d10v_extract_return_value): Likewise. * expprint.c (print_subexp): Likewise. * gdbtypes.c (lookup_primitive_typename): Likewise. (lookup_template_type, add_mangled_type, print_arg_types): Likewise. * gdbtypes.h (TYPE_UNSIGNED, TYPE_NOSIGN, TYPE_STUB) (TYPE_TARGET_STUB, TYPE_STATIC, TYPE_CONST, TYPE_VOLATILE) (TYPE_PROTOTYPED, TYPE_INCOMPLETE, TYPE_CODE_SPACE, TYPE_VARARGS) (TYPE_VECTOR): Likewise. * hpread.c (hpread_read_struct_type) (fix_static_member_physnames, fixup_class_method_type) (hpread_type_lookup): Likewise. * mdebugread.c (parse_symbol, parse_type): Likewise. * p-lang.c (is_pascal_string_type): Likewise. * valops.c (hand_function_call): Likewise. * x86-64-tdep.c (classify_argument): Likewise. * hpread.c (hpread_read_function_type) (hpread_read_doc_function_type): Call replace_type. * dstread.c (create_new_type): Delete. (decode_dst_structure, process_dst_function): Call alloc_type. Use type access macros.
2002-05-022002-05-02 Pierre Muller <muller@ics.u-strasbg.fr>Pierre Muller1-1/+1
* p-lang.c (pascal_create_fundamental_type): Use TYPE_CODE_CHAR for fondamental pascal 'char' type.
2002-05-022002-05-02 Pierre Muller <muller@ics.u-strasbg.fr>Pierre Muller1-11/+24
* p-lang.h (is_pascal_string_type): Declaration changed, new sixth argument of type char ** added. * p-lang.c (is_pascal_string_type): Implementation changed. Args length_pos, length_size, string_pos, char_size can now be NULL. New argument arrayname set to the field name of the char array. Return value set to char array field index plus one. * p-valprint.c (pascal_val_print): Adapt to new declaration of is_pascal_string_type function.
2002-02-132002-02-13 Michael Chastain <mec@shout.net>Michael Chastain1-2/+2
* defs.h: Kill CONST_PTR. * c-lang.h (c_builtin_types): Change CONST_PTR to simple "const". * c-lang.c (c_builtin_types): Likewise. * ch-lang.c (ch_builtin_types): Likewise. * f-lang.c (f_builtin_types): Likewise. * language.c (unknown_builtin_types): Likewise. * m2-lang.c (m2_builtin_types): Likewise. * p-lang.c (pascal_builtin_types): Likewise. * scm-lang.c (c_builtin_types): Likewise.
2001-11-092001-11-06 Pierre Muller <muller@ics.u-strasbg.fr>Pierre Muller1-2/+50
* p-lang.c (is_pascal_string_type): New function to determine if a type is a string type. * p-lang.h: Add prototype for is_pascal_string_type. * p-valprint.c (pascal_val_print) : Use is_pascal_string_type function to display strings nicely.
2000-08-112000-08-10 Jimmy Guo <guo@cup.hp.com>Jimmy Guo1-0/+1
* c-lang.c: Set case sensitivity on for c_language_defn, cplus_language_defn, and asm_language_defn. * ch-lang.c: Set case sensitivity on for chill_language_defn. * f-lang.c: Set case sensivitity off for f_language_defn. * jv-lang.c: Set case sensitivity on for java_language_defn. * language.h: Add enum case_mode, case_sensitivity. * language.c: Define case_mode, case_sensitivity. Set case sensitivity on for unknown_language_defn, auto_language_defn, and local_language_defn. (show_case_command,set_case_command,set_case_str): New static func. (set_type_range_case): New static func, replaces set_type_range (). (set_language_command,set_type_command,set_range_command,set_language): Call set_type_range_case (). (language_info): Print case sensitivity setting. (_initialize_language): Add set/show commands for 'case-sensitive'. Set default case mode 'auto'. Set default language 'auto'. * m2-lang.c: Set case sensitivity on for m2_language_defn. * p-lang.c: Set case sensitivity on for pascal_language_defn. * scm-lang.c: Set case sensitivity off for scm_language_defn. * symtab.c (lookup_symbol): Downcase symbol name if case sensivitity is off.
2000-07-30Protoization.Kevin Buettner1-21/+7
2000-06-142000-06-14 Pierre Muller <muller@ics.u-strasbg.fr> Pierre Muller1-0/+430
Add support for Pascal language. Part 1: new files. * p-exp.y, p-lang.c, p-lang.h, p-typeprint.c, p-valprint.c: New files.