Commit Graph

35 Commits

Author SHA1 Message Date
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 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
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
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
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 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
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
Fred Fish 6c9638b444 Update FSF address. 1995-08-02 03:41:12 +00:00
Per Bothner 6137983598 * parser-defs.h (enum precedence): Added PREC_BUILTIN_FUNCTION.
* expression.h (enum exp_opcode):  Added UNOP_LOWER, UNOP_UPPER,
	UNUP_LENGTH.
	* expprint.c (dump_expression):  Handle the new exp_opcodes.
	(print_subexp):  Handle PREC_BUILTIN_FUNCTION.
	(print_simple_m2_func):  Removed.
	(print_subexp):  Remove support for Modula2 builtin functions.
	* m2-lang.c (m2_op_print_tab):  Add support for builtin functions.
	* ch-exp.y:  Parse LOWER, UPPER, and LENGTH builtins.
	(write_lower_upper_value):  Convenience function for LOWER and UPPER.
	(upper_lower_argument, length_argument):  Removed non-terminals.
	* ch-lang.c (chill_op_print_tab):  Entries for UPPER, LOWER, LENGTH.
	(type_lower_upper):  New function.  Calculate LOWER/UPPER of type.
	(value_chill_length):  New function.  Calcalate LENGTH of ARRAY/STRING.
	(evaluate_subexp_chill):  Handle UNOP_LOWER, UNOP_UPPER, UNOP_LENGTH.
This fixes PR 5015 (and 5826 which is a duplicate).
1995-06-14 19:59:35 +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
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 61932a8ee9 * gdbtypes.h, ch-typeprint.c, ch-valprint.c:
Change comments regarding TYPE_CODE_BOOL.
	* language.c (boolean_type): Always return 1 for TYPE_CODE_BOOL,
	regardless of the language.
	(value_true): Just call value_logical_not regardless of language.
	* coffread.c (coff_read_enum_type), stabsread.c (read_enum_type):
	Remove #if 0'd code which makes some enums TYPE_CODE_BOOL.
	* language.h: Improve comment for la_builtin_type_vector.
	* m2-lang.c (_initialize_m2_language): Don't add any fields to
	builtin_type_m2_bool.
1994-02-02 17:20:45 +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
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
Jim Kingdon 5573d7d4b1 Tue Sep 28 09:45:38 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* symmisc.c (print_symbol): Use %02x not %2x for LOC_CONST_BYTES.

	Clean up problems with targets and hosts that have 64 bit longs
	and pointers and 32 bit ints.
	* breakpoint.c, buildsym.c, c-lang.c, c-valprint.c, ch-lang.c,
	ch-valprint.c, core.c, cp-valprint.c, dbxread.c, exec.c,
	expprint.c, gdbtypes.c, infcmd.c, language.c, language.h,
	m2-lang.c, maint.c, mips-tdep.c, mipsread.c, partial-stab.h,
	printcmd.c, remote-vx.c, solib.c, source.c, stack.c, symfile.c,
	symmisc.c, symtab.c, valops.c, valprint.c, xcoffexec.c:
	Change all printf formats from %x to %lx if outputting an address.
	Change la_*_format to use long format.
	local_hex_string, local_hex_string_custom now take an unsigned long
	argument, change all callers.
	* coffread.c (read_coff_symtab):  Remove superfluous cast for
	complaint output.
	* dbxread.c (end_psymtab):  Cast MSYMBOL_INFO to long, not int.
	* findvar.c, value.h (write_register):  Change register value to long.
	* gdbtypes.h (struct type):  Change `bitsize' to long as
	TYPE_FIELD_STATIC_PHYSNAME uses this field as a pointer.
	* inferior.h (struct inferior_status):  Change type of stop_pc to
	CORE_ADDR.
	* language.h (local_octal_string, local_octal_string_custom):
	Remove prototype, the functions are neither defined nor used.
	* mipsread.c (parse_symbol):  Use temporary variable for bitsize as
	f->bitsize is a long now.
	* objfiles.c (add_to_objfile_sections, build_objfile_section_table):
	Use unsigned long casts instead of int for abusing sections_end
	pointer as integer.
	* stack.c (parse_frame_specification):  Change type of `args' to
	CORE_ADDR for SETUP_ARBITRARY_FRAME.

	* printcmd.c (make_vasize):  Allow redefinition via MAKEVA_SIZE.
	* mipsread.c (parse_type):  Alpha cc now supports the t->continued
	bit, update algorithm to match the way the compiler uses it.
1993-09-28 17:43:25 +00:00
Fred Fish c4413e2c9b * c-exp.y (exp:STRING): Convert C strings into array-of-char
constants with an explicit null byte terminator.  OP_STRING is
	now used for real string types.
	* c-lang.c (builtin_type_*):  Move declarations to lang.c since
	they are used by all languages.
	* c-lang.c (_initialize_c_language):  Move initializations of
	builtin_type_* to lang.c.
	* c-typeprint.c (c_type_print_varspec_prefix,
	c_type_print_varspec_suffix):  TYPE_CODE_PASCAL_ARRAY renamed
	to TYPE_CODE_STRING.
	* c-valprint.c (c_val_print):  Change the way character arrays
	are printed as strings to be consistent with the way strings
	are printed when pointer-to-char types are dereferenced.
	Remove test of print_max before calling val_print_string, which
	now does it's own test.
	* eval.c (evaluate_subexp):  Add case for OP_ARRAY.
	* expprint.c (print_subexp, dump_expression):  Add case for OP_ARRAY.
	* expression.h (enum exp_opcode):  Add OP_ARRAY and document.
	* gdbtypes.c (builtin_type_*):  Add declarations moved from
	c-lang.c.
	* gdbtypes.c (create_string_type):  New function to create real
	string types.
	* gdbtypes.c (recursive_dump_type):  TYPE_CODE_PASCAL_ARRAY
	renamed to TYPE_CODE_STRING.
	* gdbtypes.c (_initialize_gdbtypes):  Add initializations of
	builtin_type_* types moved from c-lang.c.
	* gdbtypes.h (enum type_code):  TYPE_CODE_PASCAL_ARRAY renamed
	to TYPE_CODE_STRING.
	* gdbtypes.h (builtin_type_string):  Add extern declaration.
	* gdbtypes.h (create_string_type):  Add prototype.
	* m2-lang.c (m2_create_fundamental_type):  TYPE_CODE_PASCAL_ARRAY
	renamed to TYPE_CODE_STRING.
	* m88k-tdep.c (pushed_size):  TYPE_CODE_PASCAL_ARRAY renamed to
	TYPE_CODE_STRING.
	* mipsread.c (_initialize_mipsread):  TYPE_CODE_PASCAL_ARRAY
	renamed to TYPE_CODE_STRING.
	* parse.c (length_of_subexp, prefixify_subexp):  Add case for
	OP_ARRAY.
	* printcmd.c (print_formatted):  Recognize TYPE_CODE_STRING.
	* typeprint.c (print_type_scalar):  TYPE_CODE_PASCAL_ARRAY renamed
	to TYPE_CODE_STRING.
	* valops.c (allocate_space_in_inferior):  New function and
	prototype, using code ripped out of value_string.
	* valops.c (value_string):  Rewritten to use new function
	allocate_space_in_inferior, but temporarily disabled until some
	other support is in place.
	* valops.c (value_array):  New function to create array constants.
	* valprint.c (val_print_string):  Add comment to document use,
	complete rewrite to fix several small buglets.
	* value.h (value_array):  Add prototype.
	* value.h (val_print_string):  Change prototype to match rewrite.
	**** start-sanitize-chill ****
	* ch-valprint.c (chill_val_print):  Add case for TYPE_CODE_STRING.
	* ch-exp.y (match_character_literal):  Disable recognition of
	control sequence form of character literals and document why.
	**** end-sanitize-chill ****
1993-01-16 05:15:58 +00:00
Fred Fish a8a69e6332 * Makefile.in (VERSION): Bump to 4.7.4.
* Makefile.in (SFILES_MAINDIR):  Add typeprint.c, c-typeprint.c,
	  m2-typeprint.c, c-valprint.c cp-valprint.c m2-valprint.c.
	* Makefile.in (HFILES):  Add valprint.h.
	* Makefile.in (OBS):  Add typeprint.o, c-typeprint.o,
	  m2-typeprint.o, c-valprint.o, cp-valprint.o m2-valprint.o.
	* typeprint.c, typeprint.h:  New files for language independent
	  type printing functions.
	* c-typeprint.c, m2-typeprint.c:  New files for language dependent
	  type printing functions and definitions.
	* valprint.h:  New include file for language independent value
	  printing definitions.
	* c-valprint.c, cp-valprint.c, m2-valprint.c:  New files for language
	  dependent value printing functions.
	* c-exp.y (production ptype):  Add range_type variable and use new
	  create_range_type function.
	* c-exp.y (tokentab2, tokentab3), c-lang.c (c_op_print_tab),
	  infcmd.c (path_var_name), language.c (unk_op_print_tab),
	  m2-lang.c (m2_op_print_tab):  Change from ANSI-obsolescent
	  "const static" to ANSI-conformant "static const".
	* c-exp.y (c_create_fundamental_type):  Remove unused nbytes.
	* c-exp.y (c_language_defn, cplus_language_defn):  Add c_print_type,
	  and c_val_print.
	* c-lang.h (c_print_type, c_val_print):  Add prototypes.
	* coffread.c (decode_type):  Add range_type variable and call to
	  new create_range_type function.
	* complaints.c (complain):  Remove unused val variable.
	* complaints.c (_initialize_complaints):  Make it void.
	* convex-tdep.c (value_of_trapped_internalvar):  Add range_type
	  variable and call new create_range_type function.
	* defs.h (enum val_prettyprint):  Move enum from value.h to here
	  so we can avoid having to include value.h just for prototypes that
	  need the enum (thanks ANSI).
	* dwarfread.c (struct_type):  Local anonymous_size variable is
	  only used if !BITS_BIG_ENDIAN.
	* dwarfread.c (decode_subscript_data_item):  Add rangetype
	  variable and call new create_range_type function.
	* elfread.c (elf_symfile_read):  Remove unused dbx and text_sect
	  variables.
	* eval.c (evaluate_subexp):  Remove unused local variable name
	  and the statement with no side effects that initializes it.
	* expprint.c (print_subexp):  Change local_printstr to
	  LA_PRINT_STRING.
	* gdbtypes.c (create_range_type):  New function that creates
	  a range type using code fragments from object file readers as
	  an example of what has to be initialized.
	* gdbtypes.c (create_array_type):  Removed index_type, low_bound,
	  and high_bound parameters, replaced with a single range_type
	  parameter.  Change function body to use passed in range_type
	  rather than handcrafting one.
	* gdbtypes.h (create_range_type):  Add prototype.
	* gdbtypes.h (create_array_type):  Change prototype parameters.
	* infrun.c (normal_stop):  Remove unused local variables tem and c.
	* infrun.c (hook_stop_stub):  Return 0 rather than random value.
	* language.c (unk_lang_print_type, unk_lang_val_print):  Add
	  stub functions that call error if called.
	* language.c (unknown_language_defn, auto_language_defn,
	  local_language_defn):  Add initializers unk_lang_print_type and
	  unk_lang_val_print.
	* language.h (struct language_defn):  Reformat for larger
	  comments, add la_print_type and la_val_print members.  Add
	  LA_PRINT_TYPE and LA_VAL_PRINT macros.  Change local_printchar
	  to LA_PRINT_CHAR and local_printstr to LA_PRINT_STRING.
	* m2-lang.c (m2_create_fundamental_type):  Remove unused local
	  variable nbytes.
	* m2-lang.c (m2_language_defn):  Add initializers m2_print_type
	  and m2_val_print.
	* m2-lang.h (m2_print_type, m2_val_print):  Add prototypes.
	* main.c (execute_command): Remove unused local variable cmdlines.
	* main.c (echo_command), stabsread.c (read_type), printcmd.c
	  (clear_displays), symmisc.c (block_depth), values.c
	  (clear_value_history):
	  Make testing of truth value of assignment result explicit.
	* mipsread.c (upgrade_type):  Update FIXME to include future use
	  of create_range_type.
	* printcmd.c (ptype_command, ptype_eval, whatis_command,
	  whatis_exp, maintenance_print_type):  Move prototypes and functions
	  to new typeprint.c.
	* printcmd.c (_initialize_printcmd):  Move add_com calls for
	  ptype_command and whatis_command to new typeprint.c.
	* ser-bsd.c (serial_open):  Remove unused variable sgttyb.
	* source.c (find_source_lines):  Local variable c only used
	  when LSEEK_NOT_LINEAR is defined.
	* stabsread.c (read_array_type):  Use new create_range_type
	  function.
	* stabsread.c (read_range_type):  Add new index_type variable and
	  call new create_range_type function rather than handcrafting
	  range types.
	* symmisc.c (type_print_1):  Change usages to LA_PRINT_TYPE.
	* symtab.c (typedef_print usages):  Use c_typedef_print, renamed.
	* symtab.c (type_print_base usages):  Use c_type_print_base.
	* symtab.c (type_print_varspec_prefix usages):  Use
	  c_type_print_varspec_prefix.
	* symtab.c (type_print_method_args usages):  Use
	  cp_type_print_method_args.
	* valprint.c:  Completely ripped apart and the fragments used
	  to create c-valprint.c, cp-valprint.c, m2-valprint.c, and
	  valprint.h.  Remaining stuff is language independent.
	* value.h (struct fn_field):  Forward declare for prototypes.
	* value.h (type_print_1):  Remove prototype.
	* value.h (enum val_prettyprint):  Moved to defs.h.
	* value.h (typedef_print):  Prototype renamed to c_typedef_print.
	* value.h (baseclass_offset):  Add prototype.
	**** start-sanitize-chill ****
	* Makefile.in (SFILES_MAINDIR):  Add ch-typeprint.c, ch-valprint.c.
	* Makefile.in (OBS):  Add ch-typeprint.o, ch-valprint.o.
	* ch-typeprint.c:  New file for language dependent type printing.
	* ch-valprint.c:  New file for language dependent value printing.
	* ch-exp.y (parse_number):  Remove prototype and stub function.
	* ch-exp.y (decode_integer_literal):  Removed unused digits and
	  temp variables.
	* ch-exp.y (convert_float):  Completely ifdef out for now.
	* ch-exp.y (tokentab2, tokentab3, tokentab4, tokentab5),
	  ch-lang.c (chill_op_print_tab):
	  Change from ANSI-obsolescent "const static" to ANSI-conformant
	  "static const".
	* ch-exp.y (yylex):  Add unhandled storage class enumeration
	  literals to switch statement for completeness.
	* ch-lang.c (chill_create_fundamental_types):  Remove unused
	  nbytes variable.  Change dummy type to 2 bytes to match int.
	  Handle FT_VOID types gratuituously added to chill DWARF by
	  compiler.  Change FT_CHAR case to generate an TYPE_CODE_CHAR
	  type rather than a one byte TYPE_CODE_INT type.
	* ch-lang.c (chill_language_defn):  Add chill_print_type and
	  chill_val_print.
	* ch-lang.h (chill_print_type, chill_val_print):  Add prototypes.
	**** end-sanitize-chill ****
1992-12-18 20:21:32 +00:00
Fred Fish d62e7a20d8 * c-lang.c (_initialize_c_language): Name changed from
_initialize_c_exp.
	* m2-lang.c (_initialize_m2_language):  Name changed from
	_initialize_m2_exp.
	* m2-lang.c (_initialize_m2_language):  Change malloc to xmalloc since
	it is no longer inside m2-exp.y, where it was remapped by Makefile.
	**** start-sanitize-chill ****
	* ch-lang.c (_initialize_chill_language):  Name changed from
	_initialize_chill_exp.
	**** end-sanitize-chill ****
1992-12-09 07:01:43 +00:00
Fred Fish 22e3975901 * c-exp.y, m2-exp.y: Migrate code that has nothing to do with
expression parsing into c-lang.c and m2-lang.c respectively.
	* c-lang.c, m2-lang.c:  New files, code migrated from c-exp.y and
	m2-exp.y respectively.
	* c-lang.h, m2-lang.h:  New files, internal interfaces between c-*
	and m2-* files respectively.
	* Makefile.in (SFILES_MAINDIR):  Add c-lang.c, m2-lang.c.
	* Makefile.in (HFILES):  Add c-lang.h, m2-lang.h.
	* Makefile.in (OBS):  Add c-lang.o, m2-lang.o.
	* expression.h (struct block):  Forward declaration for prototypes.
	* language.h (struct objfile):  Forward declaration for prototypes.
	**** start-sanitize-chill ****
	* Makefile.in (SFILES_MAINDIR):  Add ch-lang.c.
	* Makefile.in (HFILES):  Add ch-lang.h.
	* Makefile.in (OBS):  Add ch-lang.o.
	* ch-exp.y:  Migrate code that has nothing to do with expression
	parsing into ch-lang.c.
	* ch-lang.c:  New file, code migrated from c-exp.y.
	* ch-lang.h:  New file, internal interface between ch-* files.
	**** end-sanitize-chill ****
1992-12-09 06:50:30 +00:00