Commit Graph

59 Commits

Author SHA1 Message Date
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
Andrew Cagney ac2e2ef7e2 Add host_pointer_to_address() and address_to_host_pointer(). Add
signed_pointer_to_address() etc.  Rename generic_pointer_to_address()
to unsigned_pointer_to_address() etc.
2000-06-04 13:46:37 +00:00
Kevin Buettner a14ed312fd PARAMS removal. 2000-05-28 01:12:42 +00:00
Michael Snyder 0f2c5ba5c5 2000-05-24 Michael Snyder <msnyder@seadog.cygnus.com>
* findvar.c (value_from_register): Factor code, simplify logic.
2000-05-24 17:25:39 +00:00
Andrew Cagney 0386318224 Multi-arch NPC_REGNUM NNPC_REGNUM. 2000-05-02 09:36:57 +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
Andrew Cagney bc1821e659 * remote.c (REMOTE_TRANSLATE_XFER_ADDRESS), mem-break.c
(MEMORY_INSERT_BREAKPOINT, MEMORY_REMOVE_BREAKPOINT), target.h
(BREAKPOINT_FROM_PC), valops.c (COERCE_FLOAT_TO_DOUBLE),
gdbarch.sh (D10V_MAKE_DADDR, D10V_MAKE_IADDR,
FRAMELESS_FUNCTION_INVOCATION, REGISTER_CONVERTIBLE,
REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW,
REGISTER_NAME), findvar.c (POINTER_TO_ADDRESS,
ADDRESS_TO_POINTER): Delete default definition.  Handled by
gdbarch.

* gdbarch.sh: Make multi-arch defaults, defaults for non-
multi-arch targets.
(REGISTER_NAME, COERCE_FLOAT_TO_DOUBLE, REGISTER_CONVERTIBLE,
REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW,
D10V_MAKE_DADDR, D10V_MAKE_IADDR, BREAKPOINT_FROM_PC,
MEMORY_INSERT_BREAKPOINT, MEMORY_REMOVE_BREAKPOINT,
REMOTE_TRANSLATE_XFER_ADDRESS, FRAMELESS_FUNCTION_INVOCATION):
Provide default/legacy implementation.
(REGISTER_NAMES, CALL_DUMMY): Allow legacy definition.
* gdbarch.h, gdbarch.c: Re-generate.
2000-04-17 02:27:37 +00:00
Jim Blandy c0aba12e91 * findvar.c (store_typed_address, extract_typed_address): Fix
function names in error messages.
2000-04-16 16:04:53 +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
Mark Kettenis 3956bd7095 2000-03-29 Mark Kettenis <kettenis@gnu.org>
* findvar.c (extract_floating): Remove reference to
	TARGET_EXTRACT_FLOATING.
	(store_floating): Remove reference to TARGET_STORE_FLOATING.
2000-03-31 22:04:50 +00:00
Andrew Cagney a9ac8f511f Convert extract/store functions to ISO-C. 2000-03-04 01:05:48 +00:00
Kevin Buettner 3db87ba3ca Fixes for extract_floating() and store_floating(). 2000-03-02 06:50:50 +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 da59e08184 import gdb-2000-01-31 snapshot 2000-02-01 03:19:29 +00:00
Jason Molenda c2d11a7da0 import gdb-1999-12-06 snapshot 1999-12-07 03:56:43 +00:00
Stan Shebs d4f3574e77 import gdb-1999-09-08 snapshot 1999-09-09 00:02:17 +00:00
Jason Molenda 96baa820df import gdb-1999-08-09 snapshot 1999-08-09 21:36:23 +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 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
Andrew Cagney 9ddf9aa9be CARP:
Rename REGISTER_NAMES{} -> REGISTER_NAME().
1998-12-10 06:10:03 +00:00
Jason Molenda ac95dc5eeb 1998-12-08 Philippe De Muyter <phdm@macqel.be>
* config/xm-aix4.h (SIGWINCH_HANDLER): Function `aix_resize_window'
        must accept a signal number as parameter.
        * config/rs6000/xm-rs6000.h (SIGWINCH_HANDLER): Ditto.
        * utils.c (initialize_utils): Give a parameter to `SIGWINCH_HANDLER'.

        * inferior.h (register_valid): Variable's type is `SIGNED char', not
        `char'.
        * findvar.c (register_valid): Ditto.

        * defs.h (make_cleanup_func): Protect parameter list by `PARAMS'.
        * gdbthread.h (unbind_target_thread_vector): Likewise.
1998-12-09 00:38:46 +00:00
Stu Grossman c6fbd98bed * defs.h: Define TARGET_{FLOAT DOUBLE LONG_DOUBLE}_FORMAT
defaults for bi-endian targets.  Replace function pointers for
	floatformat routines with macros.  No need for these to be runtime
	selectable.
	* findvar.c:  Get rid of floatformat function pointers.  Use
	macros in extract_floating and store_floating.
	* remote-nindy.c (nindy_fetch_registers nindy_store_registers):
	Use floatformat macros.
1996-04-12 16:53:08 +00:00
Stu Grossman a243a22f43 * dcache.c: Add prototypes. Make many functions static.
* (dcache_peek dcache_fetch dcache_poke):  Make dcache_fetch and
	dcache_poke call dcache_xfer_memory directly in order to fix
	problems with turning off dcache.  dcache_peek is now unnecessary,
	so it goes away.

	* defs.h:  Define new macros HOST_{FLOAT DOUBLE	LONG_DOUBLE}_FORMAT
	and TARGET_{FLOAT DOUBLE LONG_DOUBLE}_FORMAT to specify a pointer
	to a struct floatformat.  This allows for better handling of
	targets whose floating point formats differ from the host by more
	than just byte order.
	* (floatformat_to_long_double floatformat_from_long_double):
	Prototypes for new functions in utils.c.
	* (floatformat_to_doublest floatformat_from_doublest):  Prototypes
	for pointers to floating point conversion functions.  The actual
	function uses either double or long double if the host supports it.
	* findvar.c (floatformat_to_doublest floatformat_from_doublest):
	Initialize to point at correct function depending on HAVE_LONG_DOUBLE.
	* (extract_floating store_floating):  Rewrite.  Now, if host fp
	format is the same as the target, we just do a copy.  Otherwise,
	we call floatformat_{to from}_doublest.
	* remote-nindy.c (nindy_xfer_inferior_memory):  Change param
	`write' to `should_write'.
	* utils.c (floatformat_to_long_double
	floatformat_from_long_double):  New routines that implement long
	double versions of functions in libiberty/floatformat.c.
	* config/i960/tm-i960.h (TARGET_LONG_DOUBLE_FORMAT):  Define this for
	i960 extended real (80 bit) numbers.
	* nindy-share/nindy.c (ninMemGet ninMemPut):  Return number of bytes
	actually read or written.
1996-04-11 21:17:45 +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
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
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
Peter Schauer a1a0d97484 Fix problems with infinite recursion when printing a class
that contains a static instance of the class.
	* cp-valprint.c (dont_print_vb_obstack):  Renamed from
	dont_print_obstack, made static.
	(dont_print_statmem_obstack):  New obstack, controls printing
	of static member classes.
	(_initialize_cp_valprint):  Initialize it.
	(cp_print_static_field):  New function, handles printing of
	static members.
	(cp_print_value_fields):  New parameter dont_print_statmem to
	handle recursive printing of static member classes, use
	cp_print_static_field to handle printing of static members.
	* c-valprint.c (cp_print_value_fields):  Update prototype and
	call to include additional dont_print_statmem parameter.
	* c-valprint.c, f-valprint.c (dont_print_obstack):  Remove unused
	extern declaration.

	* alpha-tdep.c, findvar.c, infptrace.c:  Include <string.h>.

	* config/alpha/tm-alpha.h (FRAME_FIND_SAVED_REGS):  Call
	alpha_find_saved_regs if fi->saved_regs is still NULL.

	* elfread.c (elf_symtab_read):  Ensure that the filename field
	of a minsym is nonempty. Ignore solib trampoline symbols from
	the main symbol table, they might have a bogus value.

	* procfs.c (set_proc_siginfo), config/alpha/alpha-osf2.mh:
	Fix typos in comments.
1995-03-10 11:21:32 +00:00
Jim Kingdon bc28e68dad * hppa-tdep.c (pa_print_registers), monitor.c: Use
extract_unsigned_integer and friends, not SWAP_TARGET_AND_HOST.
	* defs.h, findvar.c: Move SWAP_TARGET_AND_HOST back to findvar.c.
	Rename it to SWAP_FLOATING to make it clear it is no longer for
	integers.
1995-03-01 07:18:04 +00:00
Kung Hsu 326ae3e292 * defs.h: define SWAP_TARGET_AND_HOST macro.
* findvar.c, monitor.c, hppa-tdep.c: remove definition of
        SWAP_TARGET_AND_HOST.
1995-02-28 23:08:06 +00:00
Jim Kingdon 4879254531 * i387-tdep.c, i386-tdep.c i386v-nat.c, i386aix-nat.c,
i386m3-nat.c, config/m68k/tm-m68k.h, i960-tdep.c
	config/i960/tm-i960.h, remote-nindy.c, config/m88k/tm-m88k.h,
	m88k-tdep.c: Use floatformat.h instead of ieee-float.h.
	* sparc-tdep.c: Remove now-obsolete ieee-float.h stuff
	* findvar.c: Update comment regarding ieee-float.h.
1994-02-28 06:06:05 +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 100f92e2de * Makefile.in (c-exp.tab.o): Remove notice about shift/reduce conflicts
which no longer occur.

	gcc -Wall lint:
	* findvar.c (symbol_read_needs_frame), corelow.c (ignore),
	inflow.c (gdb_has_a_terminal): Make sure to return a value.
	* regex.h: Declare re_set_syntax.
	* printcmd.c: Include valprint.h.
	* infcmd.c, exec.c, maint.c, core.c: Include language.h.
	* maint.c: Include expression.h.
	* infrun.c, fork-child.c, corelow.c, inflow.c: Include thread.h.
	* inftarg.c: Include command.h.
	* coredep.c: Include value.h.
	* c-exp.y, m2-exp.y, ch-exp.y: Include bfd.h, symfile.h and objfiles.h.
	* ch-typeprint.c: Include typeprint.h.
	* ch-valprint.c: Include c-lang.h.
	* nlmread.c: Include buildsym.h.
	* environ.c: Include gdbcore.h.  Only include defs.h once.
	(set_in_environ): Cast const char * to char * when passing to
	set_gnutarget.
	Remove unused variables:
	* printcmd.c (printf_command): args_to_vprintf.
	* coffread.c (coff_symfile_init): strsection.
	Move variables to within the #ifdefs where they are used:
	* symtab.c (gdb_mangle_name): opname.
	* inftarg.c (child_attach): pid and exec_file.
	* inftarg.c (child_detach): siggnal.
	* objfiles.c (allocate_objfile): mapto, md, and fd.
	* objfiles.c (free_objfile): mmfd.
	* infrun.c (wait_for_inferior): Include BPSTAT_WHAT_LAST in switch.
	* infrun.c (wait_for_inferior): Remove unused same_pid label.
	* inferior.h: Declare set_sigint_trap and clear_sigint_trap.
	* parser-defs.h: Declare write_exp_elt_block.
	* stabsread.h: Declare elfstab_offset_sections and
	coffstab_build_psymtabs.
1993-10-21 20:41:50 +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
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
K. Richard Pixley ade40d3153 bcopy -> memcpy 1993-09-01 20:37:15 +00:00
Jim Kingdon 4d50f90ab8 * a29k-tdep.c, findvar.c (get_saved_register): Fix byteswapping sins. 1993-07-09 18:33:23 +00:00
David Edelsohn be47465751 * findvar.c (read_register): Provide some support for 64 bit regs.
(write_register): Ditto.
1993-07-08 15:27:23 +00:00
Steve Chamberlain df14b38baf * coffread.c (init_stringtab): Fix bug where sizeof(long) != 4.
* gdbcore.h, core.c (read_memory_unsigned_integer): New function.
	* findvar.c (read_register, write_register): Fix thinko where
	sizeof(host long) != sizeof(target int).
	* h8300-tdep.c: Use new read_memory_unsigned_integer call.
	* sh-tdep.c (_initialize_sh_tdep): Add memory_size command.
1993-06-09 00:47:13 +00:00
Stu Grossman 35247ccd31 * findvar.c (write_register): Add sanity check for register size.
(read_register):  Fixup sanity check for register size to be
	consistent with write_register().
1993-05-17 22:48:07 +00:00
Jim Kingdon 0791c5ea6c add comment 1993-03-30 15:59:01 +00:00
Fred Fish 51b57ded88 * dbxread.c, i386-pinsn.c, i386-tdep.c, regex.c, solib.c, symmisc.c,
symtab.h, tm-i386v4.h, valprint.c, values.c:  Lint.
	* breakpoint.c, c-exp.y, coffread.c, command.c, environ.c, eval.c,
	findvar.c, infcmd.c, infptrace.c, infrun.c, m2-exp.y, parse.c,
	putenv.c, solib.c, sparc-xdep.c, symtab.c, tm-i386v.h, tm-sparc.h,
	utils.c, valarith.c, valops.c, valprint.c, values.c:
	Replace bcopy() use with memcpy(), which is more standard and can
	take advantage of gcc's builtin functions for increased performance.
	* breakpoint.c, buildsym.c, coffread.c, dbxread.c, i386-tdep.c,
	ieee-float.c, infcmd.c, sparc-tdep.c, stack.c, symtab.c, symtab.h,
	target.c, values.c:
	Replace bzero() use with memset(), which is more standard and can
	take advantage of gcc's builtin functions for increased performance.
	* i386-tdep.c, main.c, valprint.c:
	Replace bcmp() use with memcmp(), which is more standard and can
	take advantage of gcc's builtin functions for increased performance.
1992-06-29 23:34:38 +00:00
John Gilmore 7d9884b927 * defs.h: Incorporate param.h. All users changed.
* param-no-tm.h:  Change users to define TM_FILE_OVERRIDE instead.
* param.h, param-no-tm.h:  Removed.
* Update copyrights in all changed files.
* dbxread.c, dwarfread.c, inflow.c, infrun.c, m2-exp.y, putenv.c,
solib.c, symtab.h, tm-umax.h, valprint.c:  Lint.
* tm-convex.h, tm-hp300hpux.h, tm-merlin.h, tm-sparc.h,
xm-merlin.h:  Avoid host include files in target descriptions.
* getpagesize.h:  Removed, libiberty copes now.
1991-11-21 18:42:05 +00:00
John Gilmore 36b9d39cf4 * findvar.c (find_var_value): Handle &function better.
* TODO:  Document work needed on &fn and &array.
        * printcmd.c (print_address_symbolic):  New arg is the prefix
        to print if a name is printed.
        (print_address_demangle):  Honor "set print address" now.
        Use new arg above to improve spacing of output.
        * valprint.c (val_print):  When printing function pointers,
        print symbolic form too.
        * breakpoint.c (breakpoint_1):  Use new print_address_symbolic.
1991-07-14 07:48:06 +00:00
Jim Kingdon e1ce8aa5ed The list of changes is too long to fit in the cvs log (since it truncates!).
Look at the ChangeLog for Apr 30 and May 1.
1991-05-02 04:28:42 +00:00
Jim Kingdon 777bef06cd Check for NULL selected_frame in various places. 1991-04-22 20:08:53 +00:00
Jim Kingdon f2ebc25fc2 * findvar.c (read_register_gen): Add "target byte-order" comment.
Wed Apr 17 17:09:48 1991  Jim Kingdon  (kingdon at cygint.cygnus.com)

	* i386-tdep.c (i386_get_frame_setup): Use SWAP_TARGET_AND_HOST
	before returning locals or slocals.

	* i386-tdep.c (i386_follow_jump): Do not add data16 to pos in
	call to codestream_seek; add one to pos if (and only if)
	we are dealing with a jump with data16 == 1 (i.e. 0x66, 0xe9).

Mon Apr 15 12:04:32 1991  Jim Kingdon  (kingdon at cygint.cygnus.com)

	* valops.c (call_function_by_hand): Put dummy1 in target order
	before FIX_CALL_DUMMY.

	* tm-i386v.h (FIX_CALL_DUMMY): Don't depend on host byte order.

Sun Apr 14 11:55:19 1991  Jim Kingdon  (kingdon at cygint.cygnus.com)

	* valops.c (push_word): Add SWAP_TARGET_AND_HOST.

	* remote.c (remote_open): Send '+' before calling putpkt().

	* tm-i386v.h (REGISTER_VIRTUAL_TYPE): Return pointer to void,
	not int, for pc, fp, and sp.

	* remote.c (remote_open): Call start_remote after putpkt("?");
1991-04-20 03:57:50 +00:00