Commit Graph

86 Commits

Author SHA1 Message Date
Jason Molenda c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Jason Molenda 43ff13b418 import gdb-1999-07-05 snapshot 1999-07-05 17:58:44 +00:00
Jason Molenda ac9a91a77c import gdb-1999-06-01 snapshot 1999-06-01 15:44:41 +00:00
Jason Molenda 392a587b05 import gdb-1999-05-25 snapshot 1999-05-25 18:09:09 +00:00
Stan Shebs 7a292a7adf import gdb-19990422 snapshot 1999-04-26 18:34:20 +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 4ef1f46773 hp merge changes -- too numerous to mention here; see ChangeLog and
ChangeLog-gdbtk for details.
1998-12-28 23:06:13 +00:00
Michael Meissner c6c7035cfb Since d10v is public now, remove all sanitization statements 1997-02-20 16:05:18 +00:00
Peter Schauer a46d92a736 * c-exp.y (qualified_name): Replace explicit check for valid
destructor name with call to destructor_name_p.

	* c-lang.h, c-typeprint.c (cp_type_print_method_args):  Removed,
	no longer needed.

	* c-typeprint.c (c_type_print_varspec_prefix, c_type_print_base):
	Replace remaining fprintf_unfiltered calls with their filtered variant.
	(c_type_print_base):  Do not print return type for destructors from
	template classes.
	Replace cp_type_print_method_args with cplus_demangle call to get
	consistent type output for stubbed and unstubbed methods.

	* cp-valprint.c (cp_print_class_method):  Replace
	cp_type_print_method_args with cplus_demangle call to get consistent
	type output for stubbed and unstubbed methods.

	* gdbtypes.c, gdbtypes.h (get_destructor_fn_field):  New function
	to find the destructor field indices for a type.

	* gdbtypes.h (struct type):  Clarify comments for vptr_basetype
	and arg_types fields.
	(struct fn_field):  Remove args field, no longer used.

	* symtab.c (decode_line_1), valops.c (value_struct_elt,
	check_field_in):  Use get_destructor_fn_field to find the destructor
	field indices instead of assuming that the compiler passes the member
	function fields in a specific order.

	* symtab.c (find_methods):  Pass NULL instead of SYMBOL_BLOCK_VALUE
	to lookup_symbol.
	(list_symbol):  Replace cp_type_print_method_args with cplus_demangle
	call in zapped out code and explain why this code is zapped out.
1996-12-14 09:17:22 +00:00
Michael Snyder dc1b349d39 Added target function calls for SH, M32R and H8300.
Added some generic target-independant code for managing call-dummy frames.

Wed Nov 27 10:32:14 1996  Michael Snyder  <msnyder@cleaver.cygnus.com>

        * breakpoint.c: DELETE command will not delete CALL_DUMMY breakpoint.
        * blockframe.c: Add target-independant support for managing
                        CALL_DUMMY frames on the host side.
        * frame.h:      Declarations for generic CALL_DUMMY frame support.
        * h8300-tdep.c: Add target function calls using generic frame support.
        * config/h8300/tm-h8300.h: config for generic target function calls.
start-sanitize-m32r
        * m32r-tdep.c:  Add target function calls using generic frame support.
        * config/m32r/tm-m32r.h:   config for generic target function calls.
end-sanitize-m32r
        * sh-tdep.c:    Add target function calls using generic frame support.
        * config/sh/tm-sh.h:       config for generic target function calls.
start-sanitize-v850
        * v850-tdep.c:  Add target function calls using generic frame support.
        * config/v850/tm-v850.h:   config for generic target function calls.
end-sanitize-v850
        * valops.c:     ADD PUSH_RETURN_ADDRESS so that it doesn't have to be
                        done by PUSH_ARGUMENTS when there's no CALL_DUMMY.
1996-11-27 19:10:07 +00:00
Fred Fish 3f550b5940 * configure.in: Add test for "long long" support.
* configure: Regenerate with autoconf.
	* acconfig.h: Add CC_HAS_LONG_LONG
	* config.in: Regenerate with autoheader.
	* config/mips/tm-mips64.h (FORCE_LONG_LONG): Remove
	* config/sparc/tm-sp64.h (CC_HAS_LONG_LONG): Remove.
	* config/mips/tm-vr4300el.h (CC_HAS_LONG_LONG): Remove.
	* config/mips/tm-vr4300.h (CC_HAS_LONG_LONG): Remove.
	* config/mips/xm-irix5.h (CC_HAS_LONG_LONG): Remove
	(PRINTF_HAS_LONG_LONG): Remove.
	(FORCE_LONG_LONG): Remove.
	* config/powerpc/xm-aix.h (UINT_MAX): Undef and use gdb's version.
	* config/convex/xm-convex.h (CC_HAS_LONG_LONG): Remove
	(PRINTF_HAS_LONG_LONG): Remove.
	* config/xm-nbsd.h (CC_HAS_LONG_LONG): Remove.
	(PRINTF_HAS_LONG_LONG): Remove.
	* config/pa/tm-hppa.h (GET_FIELD): Put parens around
	subtraction inside shift.  Put parens around subtraction
	in operand of bitwise and.
	(struct frame_info): Forward declare
 	if __STDC__ defined.
	(frame_saved_regs): Ditto.
	(struct value): Ditto.
	(struct type): Ditto.
	(struct inferior_status): Ditto.
	(init_extra_frame_info): Add prototype.
	(skip_prologue): Ditto.
	(frameless_function_invocation): Ditto.
	(frame_chain): Ditto.
	(frame_chain_valid): Ditto.
	(saved_pc_after_call): Ditto.
	(hppa_fix_call_dummy): Ditto.
	(hppa_push_arguments): Ditto.
	(pa_do_registers_info): Ditto.
	(in_solib_call_trampoline): Ditto.
	(in_solib_return_trampoline): Ditto.
	(push_dummy_frame): Ditto.
	* convex-tdep.c (decout): Use print_longest rather than
	fprintf_filtered.
	* defs.h: Remove use of FORCE_LONG_LONG and __GNUC__ to set
	CC_HAS_LONG_LONG.
	(INT_MIN): Fix so it works correctly when assigned to a long long.
	* valprint.c (longest_to_int): Rewrite to remove dependence
	on INT_MIN and INT_MAX.
	(print_longest): Rewrite the code that falls back to synthesized
	hex output when LONGEST value is not representable as in a long and
 	printf doesn't support printing long longs.
	* ch-valprint.c (chill_val_print): Cast 2nd arg of
	chill_print_type_scalar to LONGEST.
	chill_print_type_scalar): Make static and add prototype.
	* hppa-tdep.c (get_field): Ifdef out unused function.
	(set_field): Ditto.
	(extract_3): Ditto.
	(extract_5_store): Ditto.
	(extract_11): Ditto.
	(extract_12): Ditto.
	(deposit_17): Ditto.
	(extract_14): Convert to static and add prototype.
	(deposit_14): Ditto.
	(extract_21): Ditto.
	(deposit_21): Ditto.
	(extract_17): Ditto.
	(extract_5r_store): Ditto.
	(extract_5R_store): Ditto.
	(extract_5_load): Ditto.
	(find_proc_framesize): Ditto.
	(find_dummy_frame_regs): Ditto.
	(sign_extend): Ditto.
	(find_unwind_entry): Add prototype.
	(find_return_regnum): Ditto.
	(unwind_command): Ditto.
	(find_dummy_frame_regs): Add parens around subtraction in operand
	of bitwise-and.
	(skip_prologue): Add parens around operands of logical-and inside
	operand of logical-or.
	(sign_extend): Add parens around operands of subtraction inside
	operand of shift.
	(low_sign_extend): Ditto.
	* top.c (filename_completer): Convert old style decl of
	filename_completion_function into prototype.
	* f-lang.c (patch_common_entries): Ifdef out unused function.
	* stabsread.c (read_cfront_baseclasses): Remove unused local
	variable "msg_noterm".
	(resolve_cfront_continuation): Remove unused local variable "fip".
	(read_type): Remove unused variable xtypenums.
	(read_cfront_static_fields): Remove unused variable "i".
	(read_cfront_static_fields): Remove unused variable "nfields".
	(read_cfront_member_functions): Add missing comment terminator.
	(read_cfront_static_fields): Return 1 rather than random value.
	(read_cfront_baseclasses): Ditto.
	(read_cfront_baseclasses): Ditto.
	(read_cfront_baseclasses): Ditto.
	* somsolib.c (som_solib_create_inferior_hook): Remove unused
	variable "u".
	(som_solib_create_inferior_hook): Remove unused variable
	shadow_contents.
	(language.h): Add for needed prototypes.
	(som_solib_sharedlibrary_command): Add prototype.
	* hpread.c: (hpread_read_array_type): Add prototype.
	* somread.c (hpread_build_pysmtabs): Add prototype.
	(hpread_symfile_finish): Ditto.
	(hpread_symfile_init): Ditto.
	* hppah-nat.c (fetch_register): Convert old style decl
	to prototype.
	(gdbcore.h): Include for needed prototypes.
	(fetch_register): Remove unused variable "mess".
	* remote-pa.c (get_offsets): Ifdef out unused function.
	(remote_start_remote): Remove unused variable "timeout".
	(boot_board): Add prototype.
	(reaad_frame): Add prototype.
	(getpkt): Remove unused variable "bp".
	(remote_kill): Add prototype.
	(remote_mourn): Add prototype.
	(remote_insert_breakpoint): Add prototype.
	(remote_remove_breakpoint): Add prototype.
	* valops.c (value_push): Only use if PUSH_ARGUMENTS is not defined.
	* infcmd.c (do_registers_info): Only need prototype if
	DO_REGISTERS_INFO is not defined.
	(breakpoint_auto_delete_contents): Only need if
	CALL_DUMMY_BREAKPOINT_OFFSET is defined.
1996-07-28 06:32:48 +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 b52cac6b76 * core-aout.c (fetch_core_registers): Cast core_reg_size to int
before testing against reg_ptr.
	* eval.c (evaluate_subexp_standard): Cast type of
	TYPE_FN_FIELD_VOFFSET to int.
	* findvar.c (extract_signed_integer, extract_unsigned_integer,
	extract_long_unsigned_integer): Cast type of sizeof to int.
	* values.c (unpack_field_as_long, modify_field): Ditto.
	* valops.c (value_assign, call_function_by_hand): Ditto.
	* infcmd.c (do_registers_info): Ditto.
	* ser-tcp.c (tcp_open): Ditto
	* remote.c (putpkt): Ditto.
	* dcache.c (dcache_peek): Ditto.
	* dcache.c (dcache_poke): Ditto.
	* m2-exp.y (yylex): Ditto.
	* gnu-regex.c (re_match_2): Ditto.
	* f-lang.c (ADD_BF_SYMNUM, saved_bf_list_end, tmp_bf_ptr): Ifdef
	out unused macro definition and variables.
	* inftarg.c (proc_wait): Move from main.c to here, and make static.
	* valprint.c (val_print_string): Change bufsize from int to unsigned.
	* main.c (wait.h): Include
	* top.c (command_line_input): Remove unused variable "c".
	* f-typeprint.c (f_type_print_varspec_prefix): Add missing enum
	value TYPE_CODE_TYPEDEF to switch statement.
	(f_type_print_varspec_suffix): Add missing enum value
	TYPE_CODE_TYPEDEF to switch statement.
	* ch-exp.c (parse_primval): Add remaining enumeration values to
	switch statement, with no specific action.
	(ch_lex): Add LOC_UNRESOLVED in switch statement.
	(pushback_token): Ifdef out, since code using it is ifdef'd out.
	* stabsread.c (cleanup_undefined_types): Remove unused label
	"badtype".
	* objfiles.h (print_symbol_bcache_statistics): Add prototype.
	* maint.c (objfiles.h): Include.
	(maintenance_print_statistics): Remove unused variable "temp".
	* minsyms.c (lookup_minimal_symbol_solib_trampoline): Remove
	unused variable "found_file_symbol".
	* m2-exp.y (yylex): Add LOC_UNRESOLVED case to switch.
	* language.c (lang_bool_type): Use existing function local type
	variable rather than create block local variables.
	* solib.c (disable_break): Enclose in ifndef SVR4_SHARED_LIBS.
	* infptrace.c (wait.h, command.h): Include.
	* ser-tcp.c (gdb_string.h): Include
	* i386-tdep.c (codestream_seek): Change "place" to CORE_ADDR.
	(i386_get_frame_setup): Change "pc" from int to CORE_ADDR.
	* command.c (complete_on_enum): Make assignment used as truth value
	explictly check against NULL.
	(wait.h): Include.
	* infrun.c (wait_for_inferior): Ifdef out prologue_pc since code
	that uses it is ifdef'd out.
	* parser-defs.h: Add prototype for write_dollar_variable.
	* infrun.c: Add prototype for write_pc_pid.
	* breakpoint.h: Add prototype for re_enable_breakpoints_in_shlibs.
	* symmisc.c (bcache.h): Include.
	* bcache.h: Add prototype for print_bcache_statistics.
	* symfile.c: Include <time.h>.
	* printcmd.c (print_scalar_formatted): Change len to unsigned int.
	* valarith.c (value_equal): Cast result of TYPE_LENGTH to int.
	* valarith.c (value_binop): Change result_len, promoted_len1,
 	and promoted_len2 to unsigned int.
	* valarith.c (value_subscripted_rvalue): Change elt_offs and
 	elt_size to unsigned int.
	* valops.c (value_array): Change typelength to unsigned int.
	(destructor_name_p): Change len to unsigned int.
	* scm-lang.h (scm_parse): Add prototype for scm_unpack.
	* symfile.c (decrement_reading_symtab): Change return type to void.
	* valarith.c (value_subscript): Remove unused variable "word".
	(value_subscript): Remove unused variable "tint".
	* valops.c (auto_abandon): Ifdef out, since code using it is also
	ifdef'd out.
	* eval.c (init_array_element): Remove unused variable "val".
	* Makefile.in (values.o): Depends on scm-lang.h.
	(command.o): Depends upon wait_h.
	(ser-tcp.o): Depends upon gdb_string.h.
	(infptrace.o): Depends upon wait_h and command_h.
	(maint.o): Depends on objfiles.h and symfile.h.
	* values.c (allocate_repeat_value): Remove unused variable
	"element_type".
	(scm-lang.h): Include.
	* breakpoint.c (create_longjmp_breakpoint): Enclose in
	GET_LONGJMP_TARGET define, unused otherwise.
	* config/i386/nm-linux.h: Add prototypes for i386_insert_watchpoint,
	i386_remove_watchpoint and i386_stopped_by_watchpoint.
1996-03-30 05:45:10 +00:00
Fred Fish 75225aa25d * valops.c (value_assign): Make copy of internal variable value
before returning it as a new value, since it is owned by the
	internal variable and will be freed along with it.
1996-03-28 15:03:16 +00:00
Stu Grossman aa220473ba * Add native support for long double data type.
* c-exp.y (%union):  Change dval to typed_val_float.  Use DOUBLEST
	to store actual data.  Change types of INT and FLOAT tokens to
	typed_val_int and typed_val_float respectively.  Create new token
	DOUBLE_KEYWORD to specify the string `double'.  Make production
	for FLOAT use type determined by parse_number.  Add production for
	"long double" data type.
	* (parse_number):  Use sscanf to parse numbers as float, double or
	long double depending upon the type of typed_val_float.dval.  Also
	allow user to specify `f' or `l' suffix to explicitly specify
	float or long double constants.  Change typed_val to
	typed_val_int.
	* (yylex):  Change typed_val to typed_val_int.  Also, scan for
	"double" keyword.
	* coffread.c (decode_base_type):  Add support for T_LNGDBL basic
	type.
	* configure, configure.in:  Add check for long double support in
	the host compiler.
	* defs.h:  Define DOUBLEST appropriatly depending on whether
	HAVE_LONG_DOUBLE (from autoconf) is defined.  Also, fix prototypes
	for functions that handle this type.
	* expression.h (union exp_element):  doubleconst is now type
	DOUBLEST.
	* m2-exp.y f-exp.y (%union):  dval becomes type DOUBLEST.
	* findvar.c (extract_floating):  Make return value be DOUBLEST.
	Also, add support for numbers with size of long double.
	* (store_floating):  Arg `val' is now type DOUBLEST.  Handle all
	floating types.
	* parser-defs.h parse.c (write_exp_elt_dblcst):  Arg expelt is now
	DOUBLEST.
	* valarith.c (value_binop):  Change temp variables v1, v2 and v to
	type DOUBLEST.  Coerce type of result to long double if either op
	was of that type.
	* valops.c (value_arg_coerce):  If argument type is bigger than
	double, coerce to long double.
	* (call_function_by_hand):  If REG_STRUCT_HAS_ADDR is defined, and
	arg type is float and > 8 bytes, then use pointer-to-object
	calling conventions.
	* valprint.c (print_floating):  Arg doub is now type DOUBLEST.
	Use appropriate format and precision to print out floating point
	values.
	* value.h:  Fixup prototypes for value_as_double,
	value_from_double, and unpack_double to use DOUBLEST.
	* values.c (record_latest_value):  Remove check for invalid
	floats.  Allow history to store them so that people may examine
	them in hex if they want.
	* (value_as_double unpack_double):  Change return value to DOUBLEST.
	* (value_from_double):  Arg `num' is now DOUBLEST.
	* (using_struct_return):  Use RETURN_VALUE_ON_STACK macro (target
	specific) to expect certain types to always be returned on the stack.
1996-02-17 00:07:35 +00:00
Per Bothner 34cfa2dab5 * stabsread.c (read_struct_type): Trivial simplification.
* valops.c (call_function_by_hand):  Use invisible references
	for TYPE_CODE_SET and TYPE_CODE_BITSTRING too.
1996-01-12 07:12:42 +00:00
Per Bothner 5f3e7bfcbf * valops.c (value_slice): Implement (value) bitstring slices.
* valprint.c (val_print):  If TYPE_LENGTH is zero, don't automatically
	print "<incomplete type>" - Chill has zero-length (string) types.
1995-12-01 08:06:45 +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
Peter Schauer 09af586854 * alpha-tdep.c, mips-tdep.c (init_extra_frame_info):
Do not set saved registers from heuristics for a sigtramp frame.

	* dwarfread.c (enum_type):  Determine signedness of enum type
	from enumerators.

	* mips-tdep.c:  Include gdb_string.h, gcc -Wall lint.

	* rs6000-nat.c (xcoff_relocate_core):  Fix typo.

	* valops.c (value_repeat):  Fix length of memory transfer to
	match recent allocate_repeat_value change.
1995-10-21 13:14:53 +00:00
Per Bothner 4c2260aa5c * valops.c (search_struct_field): Also allow "else" as a variant name, 1995-09-27 18:47:22 +00:00
Per Bothner 37d190e005 * eval.c (evaluate_struct_tuple): New function. Used to evaluate
structure tuples.  Now also handles Chill variant records.
	(get_label):  New function, used by evaluate_struct_tuple.
	(evaluate_subexp_standard case OP_ARRAY):  Use evaluate_struct_tuple.
	(evaluate_labeled_field_init):  Removed.
	* valops.c (search_struct_field):  Generalize to work with Chill
	variant records.
1995-09-27 17:24:45 +00:00
Per Bothner b46805224b * gdbtypes.c (create_set_type): Set TYPE_LENGTH in bytes, not bits.
* valops.c (value_bitstring):  TYPE_LENGTH is bytes, not bits.

	* gdbtypes.c (force_to_range_type):  Calculate upper limit of
	TYPE_CODE_CHAR depending on TYPE_LENGTH (instead of just using 255).
1995-09-19 22:39:04 +00:00
J.T. Conklin 2b57629364 * configure.in: Check for working mmap, ansi headers, string.h,
strings.h, and memory.h.
* configure: Regenerated.

* gdb_stat.h: New file, "portable" <sys/stat.h>.
* gdb_string.h: New file, "portable" <string.h>.

* altos-xdep.c, arm-tdep.c, arm-xdep.c, convex-tdep.c,
convex-xdep.c, coredep.c, cxux-nat.c, dbxread.c, exec.c,
gould-xdep.c, hppa-tdep.c, i386aix-nat.c, i386b-nat.c,
i386mach-nat.c, i386v-nat.c, infptrace.c, m88k-nat.c, main.c,
mdebugread.c, objfiles.c, os9kread.c, procfs.c, pyr-xdep.c,
rs6000-nat.c, source.c, standalone.c, stuff.c, sun386-nat.c,
symfile.c, symm-nat.c, symm-tdep.c, symtab.c, top.c, ultra3-nat.c,
ultra3-xdep.c, umax-xdep.c, xcoffread.c: Include "gdb_stat.h"
instead of <sys/stat.h>.

* alpha-tdep.c, breakpoint.c, buildsym.c, c-typeprint.c,
ch-typeprint.c, coffread.c, command.c, core-sol2.c, core-svr4.c,
core.c, corelow.c, cp-valprint.c, dbxread.c, dcache.c, demangle.c,
dpx2-nat.c, dstread.c, dwarfread.c, elfread.c, environ.c, eval.c,
exec.c, f-lang.c, f-typeprint.c, f-valprint.c, findvar.c,
fork-child.c, gdbtypes.c, hpread.c, i386-tdep.c, infcmd.c,
inflow.c, infptrace.c, infrun.c, irix5-nat.c, language.c,
m2-typeprint.c, main.c, mdebugread.c, minsyms.c, mipsread.c,
monitor.c, nlmread.c, objfiles.c, os9kread.c, osfsolib.c, parse.c,
printcmd.c, procfs.c, regex.c, remote-adapt.c, remote-arc.c,
remote-array.c, remote-bug.c, remote-e7000.c, remote-eb.c,
remote-es.c, remote-hms.c, remote-mm.c, remote-os9k.c,
remote-pa.c, remote-sim.c, remote-st.c, remote-udi.c,
remote-utils.c, remote-vx.c, remote-vx29k.c, remote-vx68.c,
remote-vx960.c, remote-vxmips.c, remote-vxsparc.c, remote.c,
solib.c, somread.c, source.c, stabsread.c, stack.c, symfile.c,
symmisc.c, symtab.c, target.c, top.c, typeprint.c, utils.c,
valarith.c, valops.c, valprint.c, values.c, xcoffread.c: Include
"gdb_string.h" instead of <string.h>.
* gdbtk.c: Likewise.

* config/xm-sysv4.h, i386/xm-ptx.h, m68k/xm-sun3os4.h,
sparc/xm-sun4os4.h (HAVE_MMAP): Removed.

* config/xm-lynx.h, config/i386/xm-ptx.h,
config/m68k/nm-apollo68b.h, config/m68k/xm-hp300hpux.h,
config/mips/xm-irix3.h, config/mips/xm-mips.h,
config/mips/xm-news-mips.h, config/mips/xm-riscos.h,
config/pa/hppah.h, config/rs6000/xm-rs6000.h,
config/sparc/xm-sun4os4.h, config/sparc/xm-sun4sol2.h,
config/vax/xm-vaxbsd.h, config/vax/xm-vaxult.h,
config/vax/xm-vaxult2.h (MEM_FNS_DECLARED): Removed.
* config/mips/xm-irix3.h, config/mips/xm-mips.h,
config/pa/xm-hppah.h (memcpy, memset): Removed declarations.
1995-08-01 20:14:27 +00:00
Jim Kingdon 2e12bf4fd1 * valops.c (value_repeat), eval.c (evaluate_subexp_standard):
If VALUE_REPEATED is already set, just error out.
1995-03-14 16:31:28 +00:00
Jim Kingdon 36633dcc4a * valops.c (value_cast, value_slice), parse.c (follow_types): Add
FIXME-type-allocation comments.
1995-03-14 14:59:24 +00:00
Jim Kingdon e70bba9f27 * valops.c (value_cast): Don't use backslash newline--pre-ANSI
compilers (such as SunOS4 /bin/cc) don't generally support it
	except in some contexts.
1995-03-06 23:12:02 +00:00
Per Bothner f7a69ed795 * valops.c (value_cast): Cehck for cast to array type *before*
we coerce array to pointer (in case arg2 is already array).

	* valops.c (call_function_by_hand):  Set using_gcc to 2 if using
	gcc2.  Needed for REG_STRUCT_HAS_ADDR to work on sparc.
	Also check REG_STRUCT_HAS_ADDR for union, array and string types.

	* valops.c (call_function_by_hand):  Re-arrange code for pushing
	paramaters on the stack so we can do better STACK_ALIGN.

	* valops.c (call_function_by_hand):  Call error if the number
	of arguments is fewer than parameter types in function type.
1995-03-04 02:24:26 +00:00
Jeff Law 13ffa6bece * valops.c (value_struct_elt_for_reference): Work around macro
bugs in HP's compilers.
	* c-exp.y (block): Likewise.
1995-03-03 22:15:23 +00:00
Per Bothner 5222ca60be * valops.c (value_arg_coerce): Now takes param_type argument.
(call_function_by_hand):  Convert arguments with value_arg_coerce
	early, and overwrite original args with converted args.
	No longer need multiple calls to value_arg_coerce.
	(value_arg_push):  Removed.
	* hppa-tdep.c (hppa_push_arguments):  No longer call value_arg_coerce.
	* mips-tdep.c (mips_push_arguments):  Likewise.
	* alpha-tdep.c (alpha_push_arguments):  Likewise.
	* rs6000-tdep.c (push_arguments, ran_out_of_registers_for_arguments):
	Likewise.
	* value.h (value_arg_coerce):  Remove declaration.  (It's now static.)

	* valops.c (value_cast):  Do COERCE_VARYING_ARRAY after COERCE_REF.
1995-02-12 18:51:42 +00:00
Per Bothner f91a9e05e0 * ch-exp.y (value_string_element, string_primitive_value,
start_element, left_element, right_element, slice_size,
	lower_element, upper_element, first_element):  Removed.
	(value_string_slice, value_array_slice):  Replaced by ...
	(slice):  New non-terminal, with working slice support.
	(primitive_value_lparen, rparen):  New non-terminals.
	(maybe_tuple_elements):  New non-terminal, to allow empty tuples.
	(idtokentab):  Added "up".

	* value.h (COERCE_VARYING_ARRAY):  New macro.
	* valarith.c (value_subscript):  Use it.
	* valops.c (value_cast):  Likewise.  Also, do nothing if already
	correct type, and allow converting from/to range to/from scalar.

	* valops.c, value.h (varying_to_slice, value_slice):  New functions.
	* eval.c (OP_ARRAY):  Add cast for array element.
	* expression.h (TERNOP_SLICE, TERNOP_SLICE_COUNT):  New exp_opcodes.
	* valops.c (chill_varying_type):  Moved function frp, here ...
	* gdbtypes.c (chill_varying_type), gdbtypes.h: ... to here.
	* parse.c (length_of_subexp, prefixify_subexp):  Add support
	for TERNOP_SLICE, TERNOP_SLICE_COUNT.
	* expprint.c (print_subexp, dump_expression):  Likewise.
	* eval.c (evaluate_subexp):  Likewise.

	* eval.c (evaluate_subexp case MULTI_SUBSCRIPT):  Don't call
	value_x_binop on a Chill varying string.
1995-02-01 21:02:51 +00:00
Per Bothner 6d34c23688 Add support for Chill bitstring literals (e.h. H'FF00').
* ch-exp.y (match_bitstring_literal):  Fix for proper endianness.
	* expprint.c (print_subexp):  Don't call error on OP_BITSTRING,
	just print B'<unimlemented>'.
	* gdbtypes.c (create_set_type):  Fix bug in length calculation.
	* valops.c, value.h (value_bitstring):  New function.
	* eval.c (evaluate_subexp):  Implement support for OP_BITSTRING.

	* ch-typeprint.c (chill_type_print_base): For TYPE_CODE_FUNC,
	check that return type is non-void, and print in proper Chill syntax.
1995-01-23 21:20:58 +00:00
Peter Schauer 9ed8604f38 * top.c (line_completion_function): Renamed from
symbol_completion_function, takes the line buffer and the
	point in the line buffer as additional arguments.
	(readline_line_completion_function):  New function, interface
	between readline and line_completion_function.
	(init_main):  Use it.
	(complete_command):  Use line_completion_function instead of
	abusing rl_line_buffer. Free completion strings after printing
	them.
	* symtab.c (completion_list_add_name):  Recheck for duplicates
	if we intend to add a modified symbol.

	* gdbtypes.h (cplus_struct_type):  nfn_fields_total no longer
	includes the number of methods from the baseclasses.
	* stabsread.c (attach_fn_fields_to_type):  No longer add the
	number of methods from the baseclasses to TYPE_NFN_FIELDS_TOTAL,
	the baseclass type might not have been completely filled in yet.
	* symtab.c (total_number_of_methods):  New function to compute
	the total number of methods for a type, including the methods
	from baseclasses.
	(decode_line_1):  Use it instead of TYPE_NFN_FIELDS_TOTAL to
	allocate the symbol array for find_methods.

	* stabsread.c (scan_file_globals):  Add default case to minimal
	symbol type switch, to avoid gcc -Wall warnings.

	* config/rs6000/tm-rs6000.h (INIT_EXTRA_FRAME_INFO):
	Don't test for zero backchain pointer to recognize a signal
	handler frame, if read() gets interrupted by a signal, the
	backchain will be non zero.
	(SIG_FRAME_FP_OFFSET):  Move to here from rs6000-tdep.c,
	improve comment.
	(SIG_FRAME_PC_OFFSET):  New definition.
	(FRAME_SAVED_PC):  Return saved pc from sigcontext if this
	is a signal handler frame.
	* rs6000-tdep.c (function_frame_info):  Do not error out
	if we can't access the instructions.

	* config/rs6000/tm-rs6000.h (CONVERT_FROM_FUNC_PTR_ADDR):
	New definition to get the function address from a function pointer.
	* valops.c (find_function_addr):  Use it when calling a user
	function through a function pointer.
1994-10-29 09:51:32 +00:00
Stan Shebs a91a61923d Initial Fortran language support, adapted from work by Farooq Butt
(fmbutt@engage.sps.mot.com).
	* Makefile.in: Add Fortran-related files and dependencies.
	* defs.h (language_fortran): New language enum.
	* language.h (_LANG_fortran): Define.
	(MAX_FORTRAN_DIMS): Define.
	* expression.h: Reformat to standard.
	(MULTI_F77_SUBSCRIPT, OP_F77_UNDETERMINED_ARGLIST,
	OP_F77_LITERAL_COMPLEX, OP_F77_SUBSTR): New expression opcodes.
	* gdbtypes.h (TYPE_CODE_COMPLEX, TYPE_CODE_LITERAL_COMPLEX,
	TYPE_CODE_LITERAL_STRING): New type codes.
	(type): New fields upper_bound_type and lower_bound_type.
	(TYPE_ARRAY_UPPER_BOUND_TYPE, TYPE_ARRAY_LOWER_BOUND_TYPE,
	TYPE_ARRAY_UPPER_BOUND_VALUE, TYPE_ARRAY_LOWER_BOUND_VALUE): New
	macros.
	(builtin_type_f_character, etc): Declare.
	* value.h (VALUE_LITERAL_DATA, VALUE_SUBSTRING_START): Define.
	* f-exp.y: New file, Fortran expression grammar.
	* f-lang.c: New file, Fortran language support functions.
	* f-lang.h: New file, Fortran language support declarations.
	* f-typeprint.c: New file, Fortran type printing.
	* f-valprint.c: New file, Fortran value printing.
	* eval.c (evaluate_subexp): Add code for new expression opcodes,
	fix wording of error message.
	* gdbtypes.c (f77_create_literal_complex_type,
	f77_create_literal_string_type): New functions.
	* language.c (set_language_command): Add Fortran info.
	(calc_f77_array_dims): New function.
	* parse.c (length_of_subexp, prefixify_subexp): Add cases for new
	expression opcodes.
	* symfile.c (deduce_language_from_filename): Recognize .f and .F
	as Fortran source files.
	* valops.c (f77_value_literal_string, f77_value_substring,
	f77_value_literal_complex): New functions.
1994-08-19 21:59:05 +00:00
Jim Kingdon 30974778c1 * value.h (struct value): Add modifiable field.
* values.c (allocate_value, record_latest_value, value_copy): Set it.
	(record_latest_value): Don't mess with VALUE_LVAL of value.
	* valops.c (value_assign): Check it.  Reword existing error
	message on not_lval.
1994-03-01 02:20:39 +00:00
Peter Schauer 67e9b3b31b * valops.c (value_assign): Set `type' after coercing toval.
* c-valprint.c (c_val_print), ch-valprint.c (chill_val_print):
	Use extract_unsigned_integer to get the address of a reference.
1994-01-25 21:03:56 +00:00
Jim Kingdon 008d4449a7 Sat Dec 25 09:50:29 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* valops.c (value_struct_elt): Check for (value)-1 return from
	search_struct_method.
1993-12-25 19:28:47 +00:00
Per Bothner 852b3831ce * valops.c (value_coerce_array): Handle STRINGs as well as ARRAYs. 1993-12-21 22:22:45 +00:00
Kung Hsu 6ebc9cddfc Modified Files:
ChangeLog valops.c

        * valops.c(search_struct_method): to use unified search so type
	conversion operator works in calling method. (this file should be
	checked in with last commit, I missed it).
1993-11-18 18:54:11 +00:00
Kung Hsu 4062025808 Modified Files:
ChangeLog eval.c valops.c

        * valops.c (typecmp): improve prototype matching when calling
        a method. Make 'p (*(ostream *) &cout) << "lll" ' to work.
        * eval.c(evalute_subexp): fix operator search problem when call
        like  p x.'operator+'(i).
1993-11-17 18:07:58 +00:00
Peter Schauer ad09cb2bd3 * findvar.c (value_of_register, value_from_register),
hppa-tdep.c (pa_print_fp_reg), infcmd.c (do_registers_info),
	valops.c (value_assign):   Use REGISTER_CONVERT_TO_* only if
	REGISTER_CONVERTIBLE is defined, otherwise just copy the content.
	Pass desired type to REGISTER_CONVERT_TO_*.

	* config/m68k/tm-m68k.h, config/i960/tm-i960.h (REGISTER_CONVERT_*):
	Pass length of desired type to store/extract_floating.
	* config/i386/tm-arm.h, config/i386/tm-i386aix.h,
	config/i386/tm-sun386.h, config/i386/tm-symmetry.h,
	config/m88k/tm-m88k.h config/rs6000/tm-rs6000.h (REGISTER_CONVERT_*):
	Use extract_floating and store_floating with length of desired type.
	* config/m68k/tm-news.h (STORE,EXTRACT_RETURN_VALUE):  Add type
	parameter to REGISTER_CONVERT_*.

	* config/a29k/tm-a29k.h, config/convex/tm-convex.h,
	config/gould/tm-np1.h, config/gould/tm-pn.h, config/h8300/tm-h8300.h,
	config/h8500/tm-h8500.h, config/i386/tm-i386v.h,
	config/mips/tm-mips.h, config/ns32k/tm-merlin.h,
	config/ns32k/tm-umax.h, config/pa/tm-hppa.h, config/pyr/tm-pyr.h,
	config/sh/tm-sh.h, config/sparc/tm-sparc.h, config/tahoe/tm-tahoe.h,
	config/vax/tm-vax.h, config/z8k/tm-z8k.h (REGISTER_CONVERTIBLE,
	REGISTER_CONVERT_TO_RAW, REGISTER_CONVERT_TO_VIRTUAL):  Remove
	versions for which REGISTER_CONVERTIBLE is always false.
	* z8k-tdep.c (register_convert_to_virtual, register_convert_to_raw):
	Remove, no longer used.

	* alpha-tdep.c (alpha_register_convert_to_raw,
	alpha_register_convert_to_virtual):  New routines to handle
	the different raw formats in alpha floating point registers.
	* config/alpha/tm-alpha.h (REGISTER_CONVERTIBLE,
	REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW):  Use them.
1993-11-02 21:51:10 +00:00
Jim Kingdon 4d52ec8623 * valops.c (value_assign): Change bitfield code to use a buffer of
the correct size, rather than an int.
1993-10-28 14:27:39 +00:00
Jim Kingdon 79971d11cc * valops.c (value_assign): Call reinit_frame_cache when assigning
to a register.
1993-10-26 15:49:39 +00:00
Jim Kingdon 443abae18c * findvar.c, value.h (symbol_read_needs_frame): New function.
* c-exp.y, m2-exp.y: Call it instead of having our own switch on
	the symbol's class.
	* valops.c (value_of_variable): Use symbol_read_needs_frame to
	decide whether we care about finding a frame.
1993-10-08 20:33:22 +00:00
Peter Schauer cef4c2e7a5 Changes to support alpha OSF/1 in native mode.
* alpha-nat.c, alpha-tdep.c, config/alpha/alpha-osf1.mt,
	  config/alpha/nm-alpha.h, config/alpha/tm-alpha.h, osfsolib.c:
	New files.
	* Makefile.in:  Add new files and dependencies.
	* configure.in:  Add alpha target.
	* config/alpha/alpha-osf1.mh (NATDEPFILES):  Add osfsolib.o
	* config/alpha/alpha-osf1.mh (MH_CFLAGS):  Remove, we can handle
	shared libraries now.
	* config/alpha/xm-alpha.h:  Cleanup, get MAKEVA_* defines right.

	* defs.h (CORE_ADDR):  Make its type overridable via CORE_ADDR_TYPE,
	provide `unsigned int' default.
	* breakpoint.c (breakpoint_auto_delete):  Delete only if we really
	stopped for the breakpoint.
	* stabsread.c, stabsread.h (define_symbol):  Change valu parameter
	to a CORE_ADDR.
	* stabsread.c (read_range_type):  Handle the case where the lower
	bound overflows and the upper doesn't and the range is legal.
	* infrun.c (resume):  Do not step a breakpoint instruction if
	CANNOT_STEP_BREAKPOINT is defined.

	* inferior.h (CALL_DUMMY_LOCATION):  New variant AT_ENTRY_POINT.
	Now that we have the bp_call_dummy breakpoint the call dummy code
	is no longer needed. PUSH_DUMMY_FRAME, PUSH_ARGUMENTS and
	FIX_CALL_DUMMY can be used to set up everything for the dummy.
	The breakpoint for the dummy is set at the entry point and thats it.
	* blockframe.c (inside_entry_file, inside_entry_func):  Do not stop
	backtraces if pc is in the call dummy at the entry point.
	* infcmd.c (run_stack_dummy):  Handle AT_ENTRY_POINT case. Use
	the expected breakpoint pc when setting up the frame for
	set_momentary_breakpoint.
	* symfile.c (entry_point_address):  New function for AT_ENTRY_POINT
	support.
	* valops.c (call_function_by_hand):  Handle AT_ENTRY_POINT case.
1993-10-05 19:44:57 +00:00
Kung Hsu 5b5c6d94a2 CVS: 1993-09-23 00:19:11 +00:00
Peter Schauer 30d20d1545 * findvar.c (extract_signed_integer): Cast *p to LONGEST before doing
the xor and subtract.  Otherwise it will not sign extend if the type
	of LONGEST is larger than int.
	* cp-valprint.c (cp_print_class_method):  Inhibit core dump if
	domain is an undefined cross reference.
	* valops.c (call_function_by_hand):  Set real_pc to correct
1993-09-17 11:46:50 +00:00
Jim Kingdon 860a1754fd * infcmd.c, inferior.h (run_stack_dummy): If we stop somewhere
besides the dummy, return 1 rather than calling error().
	Let caller print the error message.  Remove name argument.
	* valops.c (call_function_by_hand): Deal with changes to calling
	sequence of run_stack_dummy.  Discard restore_inferior_status cleanup
	if run_stack_dummy returns 1.
1993-08-27 03:22:33 +00:00
Jim Kingdon 479fdd26ee * blockframe.c (block_innermost_frame): Uncomment.
Return NULL if passed NULL.
	* frame.h: Declare it.
	* expression.h (union exp_element): Add field block.
	* parse.c (write_exp_elt_block): New function.
	* expression.h (OP_VAR_VALUE): Now takes additional struct block *.
	* *-exp.y: Write block for OP_VAR_VALUE.
	* eval.c, expprint.c, parse.c: Deal with block for OP_VAR_VALUE.
	* valops.c, value.h (value_of_variable), callers:
	Add second argument, for block.
1993-08-18 19:33:39 +00:00
Jim Kingdon 34df79fc9d * findvar.c, defs.h
({extract,store}_{signed_integer,unsigned_integer,address}):
	New routines to replace SWAP_TARGET_AND_HOST.
	All over: All uses of SWAP_TARGET_AND_HOST on integers replaced.
1993-07-10 01:35:53 +00:00