Commit Graph

57 Commits

Author SHA1 Message Date
Jeff Johnston 31c27f7773 2004-07-06 Jeff Johnston <jjohnstn@redhat.com>
* language.h (struct_language_defn): Add new function pointer:
        la_class_name_from_physname.  Also add new prototype for
        language_class_name_from_physname.
        * language.c (language_class_name_from_physname): New function.
        (unk_lang_class_name): Ditto.
        (unknown_language_defn, auto_language_defn): Change
        to add unk_lang_class_name function pointer for
        la_class_name_from_physname.
        (local_language_defn): Ditto.
        * dwarf2read.c (guess_structure_name): Change to call
        language_class_name_from_physname.
        (determine_class_name): Ditto.
        * cp-support.c (class_name_from_physname): Renamed.
        (cp_class_name_from_physname): New name of function.
        * cp-support.h: Ditto.
        * c-lang.c (c_language_defn): Change to add NULL
        for class_name_from_physname function pointer.
        (cplus_language_defn): Change to add cp_class_name_from_physname.
        * jv-lang.c (java_class_name_physname): New function.
        (java_find_last_component): New static routine.
        (java_language_defn): Add java_class_name_from_physname pointer.
        * ada-lang.c (ada_language_defn): Change to add NULL
        for class_name_from_physname function pointer.
        * f-lang.c (f_language_defn): Ditto.
        * m2-lang.c (m2_language_defn): Ditto.
        * objc-lang.c (objc_language_defn): Ditto.
        * p-lang.c (pascal_language_defn): Ditto.
        * scm-lang.c (scm_language_defn): Ditto.
2004-07-06 19:29:31 +00:00
Paul N. Hilfinger e85c3284f3 * language.h (language_defn): Add new la_post_parser field.
* parser-defs.h (null_post_parser): New declaration (default for
la_post_parser).

* parse.c (parse_exp_1): Move code to parse_exp_in_context and
insert call to that function.
(parse_exp_in_context): New function, including code formerly in
parse_exp_1.  Calls language-dependent post-parser after
prefixification.
(parse_expression_in_context): New exported function.
(null_post_parser): New definition.
* expression.h (parse_expression_in_context): Add declaration.

* p-lang.c (pascal_language_defn): Add trivial post-parser.
* c-lang.c (c_language_defn): Ditto.
(cplus_language_defn): Ditto.
(asm_language_defn): Ditto.
(minimal_language_defn): Ditto.
* f-lang.c (f_language_defn): Ditto.
* jv-lang.c (java_language_defn): Ditto.
* language.c (unknown_language_defn): Ditto.
(auto_language_defn): Ditto.
(local_language_defn): Ditto.
* m2-lang.c (m2_language_defn): Ditto.
* scm-lang.c (scm_language_defn): Ditto.
* obj-lang.c (objc_language_defn): Ditto.
2004-04-10 22:10:01 +00:00
David Carlton b368761e45 2004-01-23 David Carlton <carlton@kealia.com>
Partial workaround for PR c++/1511:
	* cp-namespace.c: Include frame.h.
	(cp_lookup_transparent_type): New
	(cp_lookup_transparent_type_loop): New.
	* cp-support.h: Declare cp_lookup_transparent_type.
	* symtab.c (basic_lookup_transparent_type): Renamed from
	lookup_transparent_type.
	(lookup_transparent_type): Replace old body by a call to
	current_language->la_lookup_transparent_type.
	* symtab.h: Update copyright.  Declare
	basic_lookup_transparent_type.
	* language.h: Update copyright.
	(struct language_defn): Add la_lookup_transparent_type.
	* language.c: Update copyright.
	(unknown_language_defn): Add basic_lookup_transparent_type.
	(auto_language_defn): Add basic_lookup_transparent_type.
	(local_language_defn): Add basic_lookup_transparent_type.
	* ada-lang.c: Update copyright.
	(ada_language_defn): Add basic_lookup_transparent_type.
	* c-lang.c: Update copyright.
	(c_language_defn): Add basic_lookup_transparent_type.
	(cplus_language_defn): Add basic_lookup_transparent_type.
	(asm_language_defn): Add basic_lookup_transparent_type.
	(minimal_language_defn): Add basic_lookup_transparent_type.
	* f-lang.c: Update copyright.
	(f_language_defn): Add basic_lookup_transparent_type.
	* jv-lang.c: Update copyright.
	(java_language_defn): Add basic_lookup_transparent_type.
	* m2-lang.c: Update copyright.
	(m2_language_defn): Add basic_lookup_transparent_type.
	* objc-lang.c: Update copyright.
	(objc_language_defn): Add basic_lookup_transparent_type.
	* p-lang.c: Update copyright.
	(p_language_defn): Add basic_lookup_transparent_type.
	* scm-lang.c: Update copyright.
	(scm_language_defn): Add basic_lookup_transparent_type.
	* Makefile.in (cp-namespace.o): Depend on frame.h.

2004-01-23  David Carlton  <carlton@kealia.com>

	* gdb.cp/rtti.exp: Don't include full path in ${srcfile}.  Add
	test for cp_lookup_transparent_type.
	* gdb.cp/rtti1.cc: Update copyright.  Add n2::func and refer_to;
	call them.
2004-01-23 23:03:31 +00:00
Joel Brobecker 6084f43ac2 * language.h (language_defn): new field, la_word_break_characters.
* 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-10-06 22:38:03 +00:00
Paul N. Hilfinger 5f9769d172 * parser-defs.h (struct exp_descriptor): New definition, containing
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-25 08:40:45 +00:00
Paul N. Hilfinger f86f5ca3f5 2003-09-09 Paul N. Hilfinger <hilfingr@gnat.com>
* 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-09-09 08:05:43 +00:00
David Carlton 1fcb515536 2003-05-19 David Carlton <carlton@bactrian.org>
Partial fix for PR c++/827.
	* cp-support.h: Include symtab.h.
	Declare cp_lookup_symbol_nonlocal, cp_lookup_symbol_namespace.
	* cp-namespace.c: Update contributors.
	(cp_lookup_symbol_nonlocal): New.
	(lookup_namespace_scope, cp_lookup_symbol_namespace)
	(lookup_symbol_file): Ditto.
	* c-lang.c (cplus_language_defn): Use cp_lookup_symbol_nonlocal.
	* block.h: Declare block_scope, block_using, block_global_block.
	* block.c (block_scope): New.
	(block_using, block_global_block): Ditto.
	* Makefile.in (cp_support_h): Depend on symtab_h.
	* config/djgpp/fnchange.lst: Add testsuite/gdb.c++/namespace1.cc.

2003-05-19  David Carlton  <carlton@bactrian.org>

	* gdb.c++/namespace.exp: Add namespace scope and anonymous
	namespace tests.
	Bump copyright date.
	* gdb.c++/namespace.cc: Add anonymous namespace and namespace C.
	(main): Call C::D::marker2.
	* gdb.c++/namespace1.cc: New file.
2003-05-20 03:56:29 +00:00
David Carlton 5f9a71c3d7 2003-05-19 David Carlton <carlton@bactrian.org>
* 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-20 01:55:18 +00:00
Andrew Cagney 973177d3c5 2003-05-15 Andrew Cagney <cagney@redhat.com>
* 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-05-15 22:18:43 +00:00
Joel Brobecker 20a0e81d7a * defs.h (language): Add language_minimal enum value.
* c-lang.c (minimal_language_defn): New language definition.
        (_initialize_c_language): Add the new minimal language to the list
        of languages known to GDB.
2003-05-08 17:35:21 +00:00
Adam Fedor 9a3d7dfd2e * Makefile.in (c_lang.o, jv_lang.o, language.o): Add $(demangle_h).
* 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-04-02 03:02:46 +00:00
Adam Fedor f636b87d5a * Makefile.in (infrun.o): Add $(language_h)
* 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.
2003-03-26 03:39:44 +00:00
David Carlton a15ef5f5e3 2002-09-20 David Carlton <carlton@math.stanford.edu>
* c-lang.c: #include "gdb_string.h"
2002-09-20 17:37:11 +00:00
Kevin Buettner 234b45d446 Add support for distinct host and target character sets. 2002-09-20 00:24:01 +00:00
Tom Tromey a741e51424 * c-lang.c (c_emit_char): Don't treat \0 specially unless quoter
is "'".
2002-09-17 17:01:47 +00:00
Andrew Cagney 5ae5f59288 Fix some K&R isms. 2002-07-11 13:50:50 +00:00
Jim Blandy 84f0252a03 Expand preprocessor macros in C expressions.
* c-lang.h: #include "macroexp.h", for macro_lookup_ftype.
(scan_macro_expansion, scanning_macro_expansion,
finished_macro_expansion): New function declarations.
(expression_macro_lookup_func, expression_macro_lookup_baton): New
variable declarations.
* parser-defs.h (expression_context_pc): New declaration.
* parse.c (expression_context_pc): New variable.
(parse_exp_1): Set expression_context_pc, as well as
expression_context_block.
* c-exp.y (yylex): If we're not already reading the result of a
macro expansion, try to macro-expand the next token.  When we're
done scanning a macro expansion, switch back to the mainline text.
Commas and `if's in a macro's expansion don't terminate the input.
* c-lang.c: #include "macroscope.h" and "gdb_assert.h".
(macro_original_text, macro_expanded_text,
expression_macro_lookup_func, expression_macro_lookup_baton): New
variables.
(scan_macro_expansion, scanning_macro_expansion,
finished_macro_expansion, scan_macro_cleanup, null_macro_lookup,
c_preprocess_and_parse): New functions.
(c_language_defn, cplus_language_defn, asm_language_defn): Call
c_preprocess_and_parse, instead of c_parse.
* Makefile.in (c_lang_h): Note that this #includes macroexp.h.
(c-lang.o): Note dependency on macroscope.h and gdb_assert.h.
2002-05-17 17:57:48 +00:00
Daniel Jacobowitz f65ca430eb 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
Fix PR gdb/422.
        * c-lang.c (c_create_fundamental_type): Handle FT_COMPLEX,
        FT_DBL_PREC_COMPLEX, and FT_EXT_PREC_COMPLEX.
        * dwarf2read.c (read_base_type): Set TYPE_TARGET_TYPE for
        complex types.
        * stabsread.c (rs6000_builtin_type): Likewise.
        (read_sun_floating_type): Likewise.
2002-03-21 00:53:44 +00:00
Michael Chastain 6c6ea35e34 2002-02-13 Michael Chastain <mec@shout.net>
* 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.
2002-02-13 18:49:30 +00:00
Jim Blandy ae23c7a369 * c-lang.c (c_emit_char): Print ASCII 11 as '\v', to match
ISO C, and our parser.  Print ASCII 0 as '\0', since that's what
people are used to seeing.
2001-12-19 06:29:18 +00:00
Jim Blandy 78a5120271 * c-lang.c (c_printstr, c_builtin_types, cplus_builtin_types):
Fix indentation.
2001-12-19 03:07:08 +00:00
Fred Fish 6edc140fcf Approved by Jim Blandy:
2001-12-08  Fred Fish  <fnf@redhat.com>
	* c-lang.c (c_create_fundamental_type): For FT_CHAR, pass
	TYPE_FLAG_NOSIGN to init_type() rather than setting it after the
	type is created.
2001-12-09 07:32:21 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
Jimmy Guo 63872f9d95 2000-08-10 Jimmy Guo <guo@cup.hp.com>
* 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-08-11 01:02:35 +00:00
Kevin Buettner fba45db2fa Protoization. 2000-07-30 01:48:28 +00:00
Kevin Buettner a14ed312fd PARAMS removal. 2000-05-28 01:12:42 +00:00
Jim Kingdon 745b8ca0fc Clean up compiler warnings:
* bcache.h, bcache.c, c-valprint.c, coffread.c, stabsread.c,
	stack.c, valprint.c: Change variables to unsigned.
	* bcache.c: Rearrange to avoid warnings about variables not being set.
	* c-lang.c, ch-lang.c, f-lang.c, m2-lang.c: Include valprint.h
	rather than declaring print_max and repeat_count_threashold
	ourselves (incorrectly).
	* valprint.h: Do declare repeat_count_threashold.
	* ch-exp.c: Use default case for internal error.
	* findvar.c: Don't omit argument type.
	* symtab.c: Remove unused variable.
2000-02-08 04:39:02 +00:00
Jason Molenda d9fcf2fb1c import gdb-2000-02-01 snapshot 2000-02-02 00:21:19 +00:00
Jason Molenda 2df3850c7b import gdb-1999-10-11 snapshot 1999-10-12 04:37:53 +00:00
Jason Molenda c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Jason Molenda 392a587b05 import gdb-1999-05-25 snapshot 1999-05-25 18:09:09 +00:00
Stan Shebs c906108c21 Initial creation of sourceware repository 1999-04-16 01:35:26 +00:00
Stan Shebs 071ea11e85 Initial creation of sourceware repository 1999-04-16 01:34:07 +00:00
David Taylor 65b07ddca8 all remaining *.c *.h files from hp merge. 1998-12-31 21:58:30 +00:00
Stu Grossman 242c0d8180 * c-lang.c (emit_char c_printchar c_printstr), c-lang.h (c_printstr)
ch-lang.c (chill_printstr chill_printchar) c-valprint.c (c_val_print)
	ch-valprint.c (chill_val_print) expprint.c (print_subexp) f-lang.c
	(f_printstr f_printchar emit_char) f-valprint.c (f_val_print) jv-lang.c
	(java_printchar java_emit_char) jv-valprint.c (java_value_print
	java_val_print) language.c (unk_lang_printchar unk_lang_printstr
	unk_lang_emit_char) language.h (struct language_defn LA_PRINT_STRING
	LA_EMIT_CHAR) m2-lang.c (m2_printstr m2_printchar emit_char) printcmd.c
	(print_formatted) scm-lang.c (scm_printstr) valprint.c
	(val_print_string) value.h (val_print_string):  Add emit_char routines
	to language_desc struct to allow finer control over language specific
	character output issues.  Add character width arg to printstr routines
	to allow handling of wchar_t/Unicode strings.  Fix c_printstr to handle
	wide characters.  Supply width argument to LA_PRINT_STRING and
	val_print_string.

	* jv-lang.c (java_object_type dynamics_objfile java_link_class_type
	get_dynamics_objfile get_java_object_type) jv-lang.h
	(get_java_object_type):  Make lots of things static.

	* expprint.c (dump_prefix_expression dump_subexp):  Move opcode name
	printing to common routine (op_name).
	* (dump_subexp):  Add support for OP_SCOPE.
1998-10-05 19:42:04 +00:00
Stu Grossman 8501c74270 * defs.h: Define CONST_PTR as blank if compiling with Microsoft
C, else it's `const'.
	* c-lang.c c-lang.h ch-lang.c f-lang.c language.c m2-lang.c
	scm-lang.c: Microsoft C can't hack const pointers.  Use CONST_PTR
	macro instead.
	* configure configure.in defs.h:  Use AC_C_CONST to figure out if
	the compiler supports const.  Gets rid of some cruft in defs.h.
	* dwarf2read.c:  <string.h> -> "gdb_string.h"
	* remote-sim.c:  Add prototypes.  Fix call to gdbsim_kill.
	* sparcl-tdep.c (download):  Add prototypes to write_routine and
	start_routine args.

	* mswin/gdbwin.c:  Don't include both varargs.h AND stdarg.h.  Get
	rid of varargs.h  Include string.h.
	* (gdbwin_update gdbwin_fputs regs_changed_f bpt_changed_f
	update):  Fix prototypes, fix calls.
	* (update):  Return value for catch_errors.
	* (run_execute_command togdb_command_from_tty togdb_command):
	Cleanup catching of errors from calls to execute_command.  Also,
	dup command string to avoid modifying const strings.
	* (togdb_breakinfo_i_init togdb_breakinfo_i_next):  Use 0 instead
	of NULL when see if b->address isn't set.
	* (bi_disable_bpt bi_enable_bpt bi_delete_all
	bi_delete_breakpoint):  Add arg to calls to update.
	* (gui_command):  Add prototype.
	* (mswin_query):  Fix prototype.
	* (_initialize_gdbwin):  Dup string to avoid modifying const.
	* (info_path togdb_get_info_path):  Remove const from decls cuz
	this can't be const (it points at malloc'ed memory).
	* (togdb_searchpath):  Remove const from path.  Dup string to
	avoid modifying const strings.
	* rindex -> strrchr.
	* (gdbwin_list_symbols):  Regexp param is const.
	* Fix lots of refs to psymtabs to deref correct pointers.
	* (togdb_set_breakpoint_sal):  Call set_breakpoint_sal with sal,
	not &sal.
	* mswin/gdbwin.h (togdb_searchpath togdb_get_info_path
	toget_set_info_path):  Fix prototypes to match reality.
	* mswin/gui.cpp:  Define _beginthreadex and _endthreadex routines
	with proper prototypes.
	* mswin/iface.cpp (gdbwin_fputs):  Define with correct number of args.
	* mswin/ser-win32s.c:  Fix defs of min and max.
	* mswin/serdll32.c (OpenComm16):  Make cbInQueue and cbOutQueue be
	USHORT.
	* (WriteComm16):  Change lpBug from LPVOID to LPCSTR.
	* mswin/serdll32.h:  Fix prototypes for OpenComm16 and WriteComm16.
1996-08-13 00:01:37 +00:00
Fred Fish b607efe714 See gdb ChangeLog entry with header:
Thu Jul 25 19:41:31 1996  Fred Fish  <fnf@cygnus.com>

for a rather huge set of changes.  I was going to put them here, but it
made cvs dump core.  :-(
1996-07-26 03:01:51 +00:00
Per Bothner 5e54886116 * ch-exp.y: Replaced by ...
* ch-exp.c:  New file.  Use recursive-descent.
	Recognize labelled array tuples and powerset ranges.
	* Makefile.in:  Update for no longer using yacc for ch-exp.

	* c-lang.c:  Make various functions non-static.
	* c-lang.h:  Add bunches of prototypes.
	* cp-valprint.c (cp_print_value_fields):  Also take address.
	(cp_print_value):  Likewise.  Use baselcass_offset.
	* stabsread.c (current_symbol):  New static variable.
	(type_synonym_name):  Remove.
	(read_type):  If copying, make copy be a TYPE_CODE_TYPEDEF.
	(read_array_type):  Don't need to handle undefined element type here.
	(cleanup_undefined_types):  Ditto.
	(read_range_type):  Look for Chill ranges.
	* valops.c (value_assign):  Fix case lval_internalvar - don't try
	to assign into old value (which might be too small!).
	(value_coerce_array):  No longer need special VALUE_REPEATED handling.
	(value_arg_coerce):  Cleaner array->pointer decay mechanism.
	(search_struct_field):  Use baseclass_offset rather than
	baseclass_addr.
	(value_slice):  Use get_discrete_bounds.
	* value.h (COERCE_VARYING_ARRAY):  Take type argumnt as well.
	* values.c (baseclass_offset):  Change parameter interface.
	(baseclass_addr):  Removed.
	* c-typeprint.c, c-valprint.c, ch-valprint.c, values.c, valops.c:
	Add check_typedef/CHECK_TYPEDEF as needed.
1995-11-30 03:26:34 +00:00
Fred Fish 6c9638b444 Update FSF address. 1995-08-02 03:41:12 +00:00
Per Bothner 7398958c7d * language.h (struct language_defn): New field evaluate_exp.
* c-lang.c (c_language_defn, cplus_language_defn, asm_langauge_defn),
	f-lang.c (f_language_defn), language.c (unknown_language_defn,
	auto_language_defn, local_language_defn), m2-lang.c (m2_language_defn):
	Set evaluate_exp to evaluate_subexp_standard.
	* ch-lang.c (evaluate_subexp_chill):  New function.  Chill-specific
	support for MULTI_SUBSCRIPT.
	(chill_language_defn):  Set evaluate_exp to evaluate_subexp_chill.
	* eval.c (enum noside):  Move from here ....
	* expression.h (enum noside):  ... to here.
	(evaluate_subexp_standard):  New prototype.
	* eval.c (evaluate_subexp):  Renamed to evaluate_subexp_standard.
	Removed lo-longer-needed test for chill_varying_type.
	(evaluate_subexp):  New.  Calls exp->language_defn->evaluate_exp.
1995-02-12 19:21:04 +00:00
Per Bothner ead95f8ac2 * eval.c (evaluate_subexp): Clean up handling of
OP_UNDETERMINED_ARGLIST (no backtracking, more general).

	* f-valprint.c (f_val_print):  Print TYPE_CODE_STRING using
	LA_PRINT_STRING, and not val_print_string (which reads from inferior).

	* ch-lang.c (chill_is_varying_struct), ch-lang.h:  Remve function
	duplicate function made redundant by chill_varying_type.

	Re-write of f77 string and complex number support:

	* language.h (struct language_defn):  New fields string_lower_bound
	and string_char_type.
	* c-lang.c (c_language_defn, cplus_language_defn, asm_language_defn),
	language.c (unknown_language_defn, auto_language_defn,
	local_language_defn), m2-lang.c (m2_language_defn), f-lang.c
	(f_language_defn), ch-lang.c (chill_language_defn):  Set new fields.
	* gdbtypes.c (create_string_type):  Use new string_char_type field.
	* valops.c (value_string):  Use new string_lower_bound field.

	* defs.h (TARGET_COMPLEX_BIT, TARGET_DOUBLE_COMPLEX_BIT):  Removed.
	* f-lang.c (f_create_fundamental_type, _initialize_f_language),
	m2-lang.c (m2_create_fundamental_type),
	gdbtypes.c (_initialize_gdbtypes):  Set TYPE_TARGET_TYPE of complex
	types.  Set their TYPE_CODEs to TYPE_CODE_COMPLEX.
	* mdebugread.c (mdebug_type_complex, mdebug_type_double_complex):
	Removed.  Use builtin_type_complex and builtin_type_double_complex.

	* gdbtypes.h (enum type_code):  Removed TYPE_CODE_LITERAL_STRING
	and TYPE_CODE_LITERAL_COMPLEX.
	* c-typeprint.c, f-typeprint.c, f-valprint.c, eval.c:  Removed uses of
	TYPE_CODE_LITERAL_STRING and TYPE_CODE_LITERAL_COMPLEX.
	* gdbtypes.c, gdbtypes.h (f77_create_literal_complex_type,
	f77_create_literal_string_type):  Removed.
	* value.h (VALUE_LITERAL_DATA, VALUE_SUBSTRING_MEMADDR,
	VALUE_SUBSTRING_MYADDR):  Removed.

	* expression.h (enum exp_opcode):  Rename OP_F77_LITERAL_COMPLEX to
	OP_COMPLEX.
	* parse.c:  Update accordingly.

	* f-valprint.c (f77_print_cmplx):  Removed.
	(f_val_print case TYPE_CODE_COMPLEX):  Re-write to use print_floating.

	* f-exp.y (STRING_LITERAL):  Use OP_STRING instead of OP_ARRAY.
	* eval.c (evaluate_subexp):  For case OP_ARRAY, don't call
	f77_value_literal_string.
	* valops.c, value.h (f77_value_literal_string, f77_value_substring,
	f77_assign_from_literal_string, f77_assign_from_literal_complex):
	Removed.
	(value_assign):  No longer need to handle literal types.
	* valops.c (f77_value_literal_complex), value.h:  Re-written and
	renamed to value_literal_complex.  Last arg is now a (complex) type.
	* valops.c (f77_cast_into_complex):  Re-written and renamed to
	cast_into_complex.
	* eval.c (evaluate_subexp):  Update accordingly.
1995-02-02 03:37:26 +00:00
Per Bothner acc4efdecd * language.h (struct language_defn): New field c_style_arrays.
* language.c (unknown_language_defn, auto_language_defn,
	local_language_defn), c-lang.c (c_language_defn, cplus_language_defn,
	asm_language_defn):  Set c_style_arrays to true.
	* m2-lang.c (m2_language_defn), ch-lang.c (chill_language_defn),
	f-lang.c (f_language_defn):  Set c_style_arrays to false.
	* valops.c (value_string):  If c_style_array is not set,
	allocate string in gdb (not inferior) using allocate_value.

	* value.h (COERCE_ARRAY), valops.c (value_addr, value_arg_coerce):
	Only call value_coerce_array if current_language->c_style_arrays.
	* values.c:  Add #include "language.h".  (Needed for COERCE_ARRAY.)

	* valops.c (chill_varying_type):  New predicate.
	* valops.c (value_cast):  Support assigning a fixed string or array
	to a variable string/array structure.

	* valarith.c (value_subscripted_rvalue):  Extra parameter lowerbound.
	Check index>=lowerbound, and then add lowerbound to index here,
	instead of in caller.  Generalize to arbitrary lval_types.
	(value_subscript):  Use enhanced value_subscripted_rvalue if
	c_style_arrays is false (and index is in range).
1995-01-26 02:32:25 +00:00
Stan Shebs 043b05b26b * language.h (struct language_defn): Remove unused field
la_longest_float.
	(longest_float): Remove, no longer used.
	* language.c (unknown_language_defn, auto_language_defn,
	local_language_defn): Remove init of la_longest_float field.
	* c-lang.c (c_language_defn, cplus_language_defn,
	asm_language_defn): Ditto.
	* m2-lang.c (m2_language_defn): Ditto.
1994-08-03 19:15:42 +00:00
Peter Schauer cef0333efd * dbxread.c, elfread.c, mipsread.c, nlmread.c, os9kread.c:
Move "no debugging symbols found" test to symfile.c.
	* symfile.c (syms_from_objfile, reread_symbols):  Add
	"no debugging symbols found" test.
	* coffread.c (init_stringtab):  Handle stripped files with a
	stringtab offset of zero gracefully.
	* osfsolib.c (solib_create_inferior_hook):  Use DYNAMIC flag from
	BFD instead of stop_pc heuristic to determine if it is a dynamically
	linked object file.
	* procfs.c (wait_fd):  Handle ENOENT error return from PIOCWSTOP
	ioctl, it indicates that the process has exited.
1994-07-06 08:01:52 +00:00
Peter Schauer 2c06801014 * c-lang.c (asm_language_defn): New definitions for language_asm,
mostly copied from c_language_defn, to avoid warnings when
	switching between c and asm stack frames.
1994-06-21 06:58:41 +00:00
Per Bothner e10cfcaa37 Fix value_print, which used to be ostensibly langauge-indepentdent,
but would print pointers and arrays in C syntax.  Instead, call
	a language-specific function.  See ChangeLog for details.
1994-06-05 01:43:40 +00:00
Jim Kingdon eade0c6ce8 * printcmd.c (decode_format): Don't blithely set the size for
an address to 'w'.  Make it 'g' or 'h', depending on TARGET_PTR_BIT.

	* defs.h: Just typedef CORE_ADDR to bfd_vma.  Include bfd.h.
	If BFD64, make a LONGEST a BFD_HOST_64_BIT.
	* defs.h (longest_to_int): Don't depend on CC_HAS_LONG_LONG; instead
	always just check against INT_MIN and INT_MAX (this also fixes things
	if sizeof (long) > sizeof (int), e.g. Alpha).
	* config/pa/tm-hppa.h, config/i386/sun386.h, config/rs6000/tm-rs6000.h:
	Don't define LONGEST or BUILTIN_TYPE_LONGEST.
	* gdbtypes.h: Remove BUILTIN_TYPE_LONGEST and
	BUILTIN_TYPE_UNSIGNED_LONGEST.
	* language.h, c-lang.c, ch-lang.c, m2-lang.c: Remove longest_int
	and longest_unsigned_int.
	* value.h (struct value): Just align to LONGEST, rather than worrying
	about CC_HAS_LONG_LONG.
	* valarith.c (value_binop, _initialize_valarith): Figure out type
	ourself based on sizeof (LONGEST) rather than relying on
	BUILTIN_TYPE_LONGEST.  The point is that we don't depend on
	CC_HAS_LONG_LONG anymore.
	* valprint.c (val_print_type_code_int): Just call
	extract_unsigned_integer directly, rather than going through
	unpack_long.
	* printcmd.c (decode_format): Remove code which would sometimes
	change 'g' size to 'w' for integers.  print_scalar_formatted handles
	printing huge integers well enough, thank you.
1994-02-03 03:18:58 +00:00
Jim Kingdon dda398c369 * gdbtypes.h: Add TYPE_FLAG_TARGET_STUB.
* gdbtypes.c (check_stub_type): On TYPE_FLAG_TARGET_STUB, do
	what cleanup_undefined_types does for arrays, except we clear
	TYPE_FLAG_TARGET_STUB if we fix up the type.
	* stabsread.c (cleanup_undefined_types): Add comments about how
	doing arrays here is no longer the clean way to do it.
	(read_array_type): Set TYPE_FLAG_TARGET_STUB as well as calling
	add_undefined_type.
	* c-typeprint.c, ch-typeprint.c: Move call to check_stub_type
	outside switch so it happens for all type codes.
	* cp-valprint.c (cp_print_value_fields): Recurse to val_print,
	instead of c_val_print, so that check_stub_type gets called.

	* gdbtypes.h, gdbtypes.c, m2-lang.c, ch-lang.c, c-lang.c: Remove
	TYPE_FLAG_SIGNED.  It was inconsistently set, never checked
	(except in recursive_dump_type), and is pointless.
1993-11-15 20:13:30 +00:00
Jim Kingdon 5576858065 * c-lang.c (c_printstr): Print "" to stream (like all the other
output from this function), not gdb_stdout.
1993-11-05 03:01:47 +00:00
Thomas Lord 199b2450f6 Change the stream argument to _filtered to GDB_FILE *.
Change all references to stdout/stderr to gdb_stdout/gdb_stderr.

Replace all calls to stdio output functions with calls to
corresponding _unfiltered functions (`fprintf_unfiltered')

Replaced calls to fopen for output to gdb_fopen.

Added sufficient goo to utils.c and defs.h to make the above work.

The net effect is that stdio output functions are only directly used
in utils.c.  Elsewhere, the _unfiltered and _filtered functions and
GDB_FILE type are used.

In the near future, GDB_FILE will stop being equivalant to FILE.

The semantics of some commands has changed in a very subtle way:
called in the right context, they may cause new occurences of
prompt_for_continue() behavior.  The testsuite doesn't notice anything
like this, though.

Please respect this change by not reintroducing stdio output
dependencies in the main body of gdb code.  All output from commands
should go to a GDB_FILE.

Target-specific code can still use stdio directly to communicate with
targets.
1993-11-01 22:25:23 +00:00