Commit Graph

58 Commits

Author SHA1 Message Date
Jim Blandy a44999d56d * value.h (struct value): Doc fix, and rearrange members to place
them near their explanations.
2001-05-21 20:02:22 +00:00
Daniel Berlin 2b12787743 2001-05-07 Daniel Berlin <dan@cgsoftware.com>
Changes by Jim Ingham:

	* values.c (value_change_enclosing_type): New function.  If the
	new enclosing type is larger than the old one, we need to allocate
	more space.
	* value.h: Add value_change_enclosing_type prototype.
	* valops.c (value_cast): Use it.
	(value_assign): Use it.
	(value_addr): Use it.
	(value_ind): Use it.
	(value_full_object): Use it.

2001-05-07  Daniel Berlin  <dan@cgsoftware.com>

	* values.c (value_static_field): Handle static fields that have a constant value.
2001-05-19 15:20:14 +00:00
Jim Blandy 015a42b4cf (Changes from Daniel Berlin, with revisions by Jim Blandy.)
Abstract out operations specific to particular C++ ABI's, and
invoke them through a function table.  This removes the C++ ABI
dependencies scattered throughout the code, and allows us to
cleanly add support for new C++ ABI's.
* cp-abi.h, cp-abi.h, gnu-v2-abi.c, hpacc-abi.c: New files.
* c-typeprint.c, c-valprint.c, dbxread.c, eval.c, gdbtypes.c,
jv-typeprint.c, linespec.c, symtab.c, typeprint.c, valops.c:
#include "cp-abi.h".  These files all use functions now declared
there.
* symtab.h (OPNAME_PREFIX_P, VTBL_PREFIX_P, DESTRUCTOR_PREFIX_P):
Deleted.  These services are now provided by functions declared in
cp-abi.h.
* value.h (value_rtti_type, value_virtual_fn_field): Same.
* values.c (value_virtual_fn_field): Same, for this definition.
* valops.c (value_rtti_type): Same.
* c-typeprint.c (c_type_print_base): Use the functions from
"cp-abi.h", instead of the old macros, or hard-coded ABI-specific
tests.
* dbxread.c (record_minimal_symbol): Same.
* gdbtypes.c (get_destructor_fn_field, virtual_base_index,
virtual_base_index_skip_primaries): Same.
* jv-typeprint.c (java_type_print_base): Same.
* linespec.c (find_methods, decode_line_1): Same.
* symtab.c (gdb_mangle_name): Same.
* Makefile.in (SFILES): Add the new .c files mentioned above.
(cp_abi_h): New variable.
(COMMON_OBS): Add gnu-v2-abi.o, hpacc-abi.o, and cp-abi.o.
(cp-abi.o, gnu-v2-abi.o, hpacc-abi.o): New targets.
(c-typeprint.o, c-valprint.o, dbxread.o, eval.o, gdbtypes.o,
jv-typeprint.o, symtab.o, linespec.o, typeprint.o, valops.o): Add
dependency on $(cp_abi_h).
2001-04-27 00:19:09 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
Andrew Cagney 4e052eda91 Create new file regcache.h. Update all uses. 2001-03-01 01:39:22 +00:00
Andrew Cagney 60edd51d05 Move get_saved_register to frame.h. 2001-02-22 16:48:19 +00:00
John R. Moore 338d7c5c40 Changed free() to xfree() where appropriate. Also changed Copyright to
include 2001.
2001-02-02 20:01:16 +00:00
Nicholas Duffek 7302a204c4 * regcache.c (set_register_cached, register_buffer,
real_register, pseudo_register fetch_register, store_register):
	New functions.
	(register_changed, read_relative_register_raw_bytes_for_frame,
	registers_changed, registers_fetched, read_register_bytes,
	read_register_gen, write_register_gen, read_register,
	read_signed_register, write_register, supply_register): Replace
	register_valid[] with register_cached() and
	set_register_cached().
	(read_register_bytes, read_register_gen, write_register_gen,
	read_register, read_signed_register, write_register,
	supply_register): Replace registers[] with register_buffer().
	(read_register_bytes, read_register_gen, read_register,
	read_signed_register): Call fetch_register().
	(write_register_gen, write_register): Call real_register() and
	store_register().
	(write_register_bytes): Call store_register().
	* value.h (set_register_cached, register_buffer): Prototype.
	* remote.c (remote_fetch_registers): Allocate regs[] with a
	run-time size.  Replace register_valid[] with
	set_register_cached().
	(store_register_using_P, remote_store_registers): Replace
	registers[] with register_buffer().
2001-01-09 00:12:48 +00:00
Nicholas Duffek 5ebd2499d3 * regcache.c: Change "write-back" comment to "write-through".
Change "regno" to "regnum".
	(read_register, read_signed_register): Remove "raw" from return
	value description.
	(supply_register): Spelling fix.
	* value.h: Change "regno" to "regnum".
2001-01-09 00:11:28 +00:00
David Taylor bb518678ac * eval.c (parse_and_eval_long): New function.
* value.h: Declare it.

	* breakpoint.c (breakpoints_info, maintenance_info_breakpoints):
	Call parse_and_eval_long, not parse_and_eval_address.
	* command.c (do_setshow_command): Ditto.
	* infcmd.c (step_1, signal_command, continue_command): Ditto.
	* infrun.c (signals_info): Ditto.
	* stack.c (set_backtrace_limit_command, backtrace_command_1,
	up_silently_base, down_silently_base): Ditto.
	* tracepoints.c (tracepoints_info, trace_find_command,
 	trace_find_tracepoint_command): Ditto.
	* valprint.c (set_radix): Ditto.
	* values.c (show_values): Ditto.
2000-10-30 15:32:51 +00:00
Pierre Muller a5238fbc03 2000-09-04 Pierre Muller <muller@ics.u-strasbg.fr>
* c-typeprint.c (c_typedef_print): remove (replaced by typedef_print in
	typeprint.c).
	* typeprint.c (typedef_print): new function. (old c_typedef_print
	function with pascal language support added).
	* value.h (c_printdef_print): removed.
	(typedef_print): declare.
	* symtab.c (print_symbol_info): call to c_typedef_print replaced by
	call to typedef_print.
2000-09-04 08:29:25 +00:00
David Taylor 2dc4e391d4 Fri Aug 25 16:57:05 2000 David Taylor <taylor@texas.cygnus.com>
* regcache.c (register_changed): New function.
	* value.h: Declare it.
2000-08-25 21:03:00 +00:00
Eli Zaretskii d7491b3f51 * value.h (struct value) <lazy>: Add a comment about its use for
watchpoints.
2000-08-16 08:03:43 +00:00
Andrew Cagney 173155e866 Add read_signed_register{,_pid}(). Change return type of
read_register{,_pid}() to ULONGEST.
2000-07-11 05:42:25 +00:00
Michael Snyder 32178cabe9 2000-07-07 Michael Snyder <msnyder@cleaver.cygnus.com>
* findvar.c (_initialize_findvar, build_findvar, write_fp, read_fp,
        generic_target_write_fp, generic_target_read_fp, write_sp, read_sp,
        generic_target_write_sp, generic_target_read_sp, write_pc, read_pc,
        generic_target_write_pc, generic_target_read_pc, write_pc_pid,
        read_pc_pid, supply_register, write_register_pid, write_register,
        read_register_pid, read_register, write_register_bytes,
        read_register_bytes, write_register_gen, read_register_gen,
        registers_fetched, registers_changed, find_saved_register,
        read_relative_register_raw_bytes, default_get_saved_register,
        read_relative_register_raw_bytes_for_frame, get_saved_register):
        Move from this file into new file regcache.c.
        (register_valid, registers_pid, registers): Ditto.
        * regcache.c: New file to hold the register cache.
        (register_cached): New function to read register_valid array.
        * value.h (register_cached): Declare.
        * defs.h (default_get_saved_register): Delete decl of static function.
        * Makefile.in: Add regcache module.
2000-07-10 06:16:51 +00:00
Kevin Buettner a14ed312fd PARAMS removal. 2000-05-28 01:12:42 +00:00
Michael Snyder cbda0a99a3 2000-04-27 Michael Snyder <msnyder@seadog.cygnus.com>
* jv-valprint.c (java_val_print): Add arg declaration,
        fix compiler warning.
        * corelow.c (core_open): Call set_gdbarch_from_file so that
        gdbarch becomes aware of the architecture encoded in the
        corefile.
        * findvar.c (write_register_gen): Export this useful interface.
        * value.h (write_register_gen): Declare.
2000-04-27 15:33:01 +00:00
Jim Blandy 4478b372e9 * gdbarch.sh (POINTER_TO_ADDRESS, ADDRESS_TO_POINTER): Two new
functions which architectures can redefine, defaulting to
generic_pointer_to_address and generic_address_to_pointer.
* findvar.c (extract_typed_address, store_typed_address,
generic_pointer_to_address, generic_address_to_pointer): New
functions.
(POINTER_TO_ADDRESS, ADDRESS_TO_POINTER): Provide default
definitions.
(extract_address, store_address): Doc fixes.
* values.c (value_as_pointer): Doc fix.
(value_from_pointer): New function.
* defs.h (extract_typed_address, store_typed_address): New
declarations.
* inferior.h (generic_address_to_pointer,
generic_pointer_to_address): New declarations.
* value.h (value_from_pointer): New declaration.

* ax-gdb.c (const_var_ref): Use value_from_pointer, not
value_from_longest.
* blockframe.c (generic_push_dummy_frame): Use read_pc and
read_sp, not read_register.
* c-valprint.c (c_val_print): Use extract_typed_address instead of
extract_address to extract vtable entries and references.
* cp-valprint.c (cp_print_value_fields): Use value_from_pointer
instead of value_from_longest to extract the vtable's address.
* eval.c (evaluate_subexp_standard): Use value_from_pointer
instead of value_from_longest to compute `this', and for doing
pointer-to-member dereferencing.
* findvar.c (read_register): Use extract_unsigned_integer, not
extract_address.
(read_var_value): Use store_typed_address instead of store_address
for building label values.
(locate_var_value): Use value_from_pointer instead of
value_from_longest.
* hppa-tdep.c (find_stub_with_shl_get): Use value_from_pointer,
instead of value_from_longest, to build arguments to __d_shl_get.
* printcmd.c (set_next_address): Use value_from_pointer, not
value_from_longest.
(x_command): Use value_from_pointer, not value_from_longest.
* tracepoint.c (set_traceframe_context): Use value_from_pointer,
not value_from_longest.
* valarith.c (value_add, value_sub): Use value_from_pointer, not
value_from_longest.
* valops.c (find_function_in_inferior, value_coerce_array,
value_coerce_function, value_addr, hand_function_call): Same.
* value.h (COERCE_REF): Use unpack_pointer, not unpack_long.
* values.c (unpack_long): Use extract_typed_address to produce
addresses from pointers and references, not extract_address.
(value_from_longest): Use store_typed_address instead of
store_address to produce pointer and reference values.
2000-04-14 18:43:41 +00:00
Jim Blandy b9a8e3bfd4 Bring COERCE_FLOAT_TO_DOUBLE under gdbarch's control.
* valops.c (COERCE_FLOAT_TO_DOUBLE): Rework definition to be
more function-like.
(default_coerce_float_to_double, standard_coerce_float_to_double):
New functions.
(value_arg_coerce): Adjust for new definition.
* value.h (default_coerce_float_to_double,
standard_coerce_float_to_double): New declarations for the above.
* gdbarch.sh (coerce_float_to_double): New entry, replacing macro.
* gdbarch.c, gdbarch.h: Regenerated.
* tm-alpha.h, tm-fr30.h, tm-m32r.h, tm-mips.h, tm-hppa.h,
tm-rs6000.h, tm-sh.h, tm-sparc.h (COERCE_FLOAT_TO_DOUBLE): Change
definitions.
* mips-tdep.c (mips_coerce_float_to_double): Supply our own custom
function here.
(mips_gdbarch_init): Install that as our coerce_float_to_double
function.
2000-02-22 19:18:53 +00:00
Jason Molenda d9fcf2fb1c import gdb-2000-02-01 snapshot 2000-02-02 00:21:19 +00:00
Jason Molenda c2d11a7da0 import gdb-1999-12-06 snapshot 1999-12-07 03:56:43 +00:00
Jason Molenda 104c1213b4 import gdb-1999-08-30 snapshot 1999-08-31 01:14:27 +00:00
Jason Molenda 53a5351d90 import gdb-1999-08-23 snapshot 1999-08-23 22:40:00 +00:00
Jason Molenda c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Jason Molenda 0f71a2f66f import gdb-1999-06-14 snapshot 1999-06-14 18:08:47 +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
Jason Molenda ad3b8c4a1a 1998-10-13 Jason Molenda (jsm@bugshack.cygnus.com)
* blockframe.c (find_pc_sect_partial_function): Add braces to avoid
        possible nested-if confusion.
        * breakpoint.c (breakpoint_here_p): Ditto.
        (breakpoint_inserted_here_p): Ditto.
        (breakpoint_thread_match): Ditto.

        * gnu-regex.c: Define _REGEX_RE_COMP only if it isn't already defined.
        * gnu-regex.h: Define _REGEX_RE_COMP to pick up old compatability
        prototypes.

        * symtab.h: Add prototype for _initialize_source.
        * value.h: Add prototype for _initialize_value.

        * defs.h: Include sys/types.h or stddef.h to get size_t.
        (make_cleanup): Add make_cleanup_func typedef and switch to using
        a prototype for this function.
        (mfree): Add prototypes for mmalloc, mrealloc, mfree if we aren't
        using mmalloc.

        * ax-gdb.c breakpoint.c coffread.c corelow.c dbxread.c dwarf2read.c
        dwarfread.c elfread.c eval.c exec.c gdbtk-cmds.c gdbtk.c infcmd.c
        infrun.c mipsread.c nlmread.c os9kread.c parse.c printcmd.c symfile.c
        symmisc.c symtab.c thread.c top.c tracepoint.c typeprint.c valops.c:
        Cast parameters passed to make_cleanup to use the new
        make_cleanup_func typedef.


More warning cleanups.  There are still a bunch of places where the first
argument to make_cleanup is not cast to (make_cleanup_func); these are
either due to the function fitting the make_cleanup_func specification
already (e.g. free()) or they are in files that weren't compiled when
I did my make on a Linux native system.  Bwahahaha.  You can see them
like this:

grep make_cleanup\  * | grep -v make_cleanup_func

I'll surely go back and clean up the remaining suspicious calls in
GDB one of these days. :-)
1998-10-14 01:15:00 +00:00
Wilfried Moser b5865bb263 * ch-exp.c (parse_tuple_element): Allow (*): for array tuples
if we have a type.

        * eval.c (evaluate_subexp_standard): In case of OP_ARRAY:
        check number of args against bounds of array to avoid
        memory corruption.

        * value.h (COERCE_REF): Do a CHECK_TYPEDEF in case we get
        a TYPE_CODE_TYPEDEF.
1996-09-04 14:29:37 +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
Jim Kingdon ff87df190b * value.h: Remove obsolete comments about FRAME vs struct
frame_info *.
1994-12-20 19:49:18 +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
Jeff Law 999dd04b89 * breakpoint.h (enum bptype): Add bp_hardware_watchpoint and
bp_watchpoint_scope breakpoints.
	(struct breakpoint): Add val_chain and related_breakpoint fields
	for use by watchpoints.

	* breakpoint.c (within_scope): Delete.  No longer used.
	(TARGET_CAN_USE_HARDWARE_WATCHPOINT): Provide default definition.
	(target_{remove,insert}_watchpoint): Likewise.
	(can_use_hardware_watchpoint): New function.
	(remove_breakpoint): New function to remove a single breakpoint
	or hardware watchpoint.
	(insert_breakpoints): Handle insertion of hardware watchpoints.
	Store a copy of the value chain derived from the watchpoint
	expression.
	(remove_breakpoints): Simplify by using remove_breakpoint.
	(delete_breakpoint): Likewise.
	(watchpoint_check): Delete the watchpoint and watchpoint scope
	breakpoints when the watchpoint goes out of scope.  Save & restore
	the current frame after checking watchpoints.
	(breakpoint_init_inferior): Likewise (restarting the program
	makes all local watchpoints go out of scope).
	(bpstat_stop_status): Handle hardware watchpoints much like normal
	watchpoints. Delete the watchpoint and watchpoint scope breakpoint
	when the watchpoint goes out of scope.  Remove and reinsert all
	breakpoints before returning if we stopped when a hardware watchpoint
	fired.
	(watch_command): Use a hardware watchpoint when possible.  If
	watching a local expression, build a scope breakpoint too.
	(map_breakpoint_numbers): Also call given function for any
	related breakpoints.
	(disable_breakpoint): Never disable a scope breakpoint.
	(enable_breakpoint): Handle hardware breakpoints much like normal
	breakpoints, but recompute the watchpoint_scope breakpoint's
	frame and address  (if we have an associated scope breakpoint).
	(read_memory_nobpt): Handle hardware watchpoints like normal
	watchpoints.  When necessary handle watchpoint_scope breakpoints.
	(print_it_normal, bpstat_what, breakpoint_1, mention): Likewise.
	(clear_command, breakpoint_re_set_one, enable_command): Likewise.
	(disable_command): Likewise.

	* blockframe.c (find_frame_addr_in_frame_chain): New function.
	Extern prototype added to frame.h

	* infrun.c (wait_for_inferior): Set current_frame and select
	a frame before checking if we stopped due to a hardare watchpoint
	firing.  Handle stepping over hardware watchpoints.
	(normal_stop): Remove unnecessary call to select_frame.

	* value.h (value_release_to_mark): Declare.
	* values.c (value_release_to_mark): New function.

	* procfs.c (procfs_wait): Add cases for hardware watchpoints.
	(procfs_set_watchpoint, procfs_stopped_by_watchpoint): New functions.

	* hppab-nat.c (hppa_set_watchpoint): New function.

	* config/pa/nm-hppab.h (STOPPED_BY_WATCHPOINT): Define.
	(HAVE_STEPPABLE_WATCHPOINT): Define.
	(TARGET_CAN_USE_HARDWARE_WATCHPOINT): Define.
	(target_{insert,delete}_watchpoint): Define.
1994-04-13 21:57:00 +00:00
Jim Kingdon 82a2edfbcf * breakpoint.c, breakpoint.h, c-valprint.c, ch-valprint.c,
cp-valprint.c, eval.c, expprint.c, findvar.c, language.c,
	objfiles.h, infcmd.c, printcmd.c, stack.c, typeprint.c,
	valarith.c, valops.c, valprint.c, value.h, values.c: Replace
	value with value_ptr.  This is for the ptx compiler.
	* objfiles.h, target.h: Don't declare a "sec_ptr" field using a
	"sec_ptr" typedef.
	* symm-nat.c: Add a bunch of stuff for symmetry's ptrace stuff.
	#if 0 i386_float_info.
	* symm-tdep.c (round): Remove.  Also remove sgttyb.
	* symm-tdep.c: Remove lots of stuff which duplicates stuff from
	i386-tdep.c.  Remove register_addr and ptx_coff_regno_to_gdb.
	* i386-tdep.c (i386_frame_find_saved_regs): Put in
	I386_REGNO_TO_SYMMETRY check in case it is needed for Dynix
	someday.
	* config/i386/nm-symmetry.h: Change KERNEL_U_ADDR.  Move
	stuff from PTRACE_READ_REGS, PTRACE_WRITE_REGS macros to
	symm-nat.c.  Define CHILD_WAIT and declare child_wait().
	* config/i386/tm-symmetry.h: Remove call function stuff; stuff in
	tm-i386v.h is apparently OK.
	* config/i386/xm-symmetry.h [_SEQUENT_]: Define HAVE_TERMIOS not
	HAVE_TERMIO.  Define MEM_FNS_DECLARED, NEED_POSIX_SETPGID, and
	USE_O_NOCTTY.
1994-03-03 01:00:57 +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
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 7efb57c33d * defs.h (CC_HAS_LONG_LONG): Set up to define CC_HAS_LONG_LONG
when compiling with gcc, but disable it for now.  See comment.
	* defs.h (LONGEST):  Define as either "long" or "long long"
	based on CC_HAS_LONG_LONG.
	* defs.h (longest_to_int):  Use CC_HAS_LONG_LONG to control
	how longest_to_int is defined.
	* c-valprint.c (c_val_print):  Call print_longest.
	* expprint.c (dump_expression):  Use PRINTF_HAS_LONG_LONG
	instead of LONG_LONG.
	* {printcmd.c, gdbtypes.h} (LONG_LONG):  Replace usages with
	CC_HAS_LONG_LONG.
	* printcmd.c (print_scalar_formatted):  Call print_longest
	and let it figure out what to do for PRINTF_HAS_LONG_LONG.
	* typeprint.c (print_type_scalar):  Call print_longest and let
	it figure out what to do for PRINTF_HAS_LONG_LONG.
	* valprint.c (val_print_type_code_int):  Call print_longest
	and let it figure out what to do for PRINTF_HAS_LONG_LONG.
	* stabsread.c (LONG_LONG):  Replace usages with CC_HAS_LONG_LONG.
	* value.h (struct value):  Replace usage of LONG_LONG with
	CC_HAS_LONG_LONG.
	* value.h (print_longest):  Add prototype.
	* values.c (LONG_LONG):  Replace usages with CC_HAS_LONG_LONG.
	* values.c (unpack_double):  Collapse code that was unnecessarily
	dependent on CC_HAS_LONG_LONG.  Use LONGEST instead of direct types.
	* values.c (value_from_longest):  Remove dependency on
	CC_HAS_LONG_LONG and just use LONGEST.
	* solib.c (solib_map_sections):  Use bfd_get_filename
	to access filename field.
	* solib.c (clear_solib):  Save filename and free it later, after
	bfd_close, since bfd_close may reference it.  Use bfd_get_filename
	to access the field.
	* config/convex/xm-convex.h (LONG_LONG):  Replace with
	CC_HAS_LONG_LONG.  Add define for PRINTF_HAS_LONG_LONG.
	* doc/gdbint.texinfo (LONG_LONG):  Replace with CC_HAS_LONG_LONG.
	Add PRINTF_HAS_LONG_LONG references.
1993-04-29 07:07:39 +00:00
Fred Fish c7da3ed3cd * c-valprint.c (cp_print_class_member): Add extern decl.
* c-valprint.c (c_val_print):  Extract code for printing methods
	and move it to cp_print_class_method in cp-valprint.c.
	* c-valprint.c (c_val_print):  Extract code to print strings and
	move it to val_print_string in valprint.c.
	* cp-valprint.c (cp_print_class_method):  New function using
	code extracted from c_val_print.
	* valprint.c (val_print_string):  New function using code
	extracted from c_val_print.
	* value.h (val_print_string):  Add prototype.
	**** start-sanitize-chill ****
	* ch-exp.y (CHARACTER_STRING_LITERAL):  Set correct token type.
	* ch-exp.y (literal):  Add action for CHARACTER_STRING_LITERAL.
	* ch-exp.y (tempbuf, tempbufsize, tempbufindex, GROWBY_MIN_SIZE,
	CHECKBUF, growbuf_by_size):  New variables, macros, and support
	functions for implementing a dynamically expandable temp buffer.
	* ch-exp.y (match_string_literal):  New lexer function.
	* ch-exp.y (match_bitstring_literal):  Dynamic buffer code
	removed and replaced with new CHECKBUF macro.
	* ch-exp.y (yylex):  Call match_string_literal when appropriate.
	* ch-valprint.c (ch_val_print):  Add code for TYPE_CODE_PTR.
	**** end-sanitize-chill ****
1993-01-14 05:10:12 +00:00
Per Bothner 35fcebce93 A ton of changes to improve C++ debugging. See ChangeLog. 1992-09-04 07:37:18 +00:00
Per Bothner 01be69139e More C++ improvements (pointers to members, qualified names). See ChangeLog. 1992-03-20 21:57:17 +00:00
John Gilmore e17960fb42 * core.c, eval.c, exec.c, inftarg.c, remote-adapt.c, remote-eb.c,
remote-hms.c, remote-mm.c, remote-nindy.c, remote-vx.c, remote.c,
target.c, target.h, valarith.c, valops.c, value.h, xcoffexec.c:
Remove to_call_function and target_call_function, since it
always calls the same thing (call_function_by_hand).
1992-02-21 01:34:46 +00:00
Jim Kingdon b99f250bf9 * values.c, value.h: New functions value_{headof,from_vtable_info}.
* value.h: Remove redundant declaration of value_static_field.
1991-04-26 23:04:32 +00:00
Jim Kingdon fcb887ffcd * breakpoint.c (bpstat_print): Try all elements on the bpstat
chain before giving up with an internal error.

Sun Apr 21 21:43:10 1991  Jim Kingdon  (kingdon at cygint.cygnus.com)

	* value.h, values.c (value_{,free_to_}mark): New functions.
	breakpoint.c (bpstat_stop_status): Use them.
1991-04-22 07:08:07 +00:00
K. Richard Pixley bd5635a1e2 Initial revision 1991-03-28 16:26:26 +00:00