* infptrace.c (child_xfer_memory): Likewise.
* monitor.c (monitor_xfer_memory): Likewise.
* remote-adapt.c (adapt_xfer_inferior_memory): Likewise.
* remote-array.c (array_xfer_memory): Likewise.
* remote-bug.c (bug_xfer_memory): Likewise.
* remote-e7000.c (e7000_xfer_inferior_memory): Likewise.
* remote-eb.c (eb_xfer_inferior_memory): Likewise.
* remote-es.c (es1800_xfer_inferior_memory): Likewise.
* remote-mips.c (mips_xfer_memory): Likewise.
* remote-mm.c (mm_xfer_inferior_memory): Likewise.
* remote-nindy.c (nindy_xfer_inferior_memory): Likewise.
* remote-os9k.c (rombug_xfer_inferior_memory): Likewise.
* remote-rdi.c (arm_rdi_xfer_memory): Likewise.
* remote-rdp.c (remote_rdp_xfer_inferior_memory): Likewise.
* remote-sds.c (sds_xfer_memory): Likewise.
* remote-sim.c (gdbsim_xfer_inferior_memory): Likewise.
* remote-st.c (st2000_xfer_inferior_memory): Likewise.
* remote-udi.c (udi_xfer_inferior_memory): Likewise.
* remote-vx.c (vx_xfer_memory): Likewise.
* remote.c (remote_xfer_memory): Likewise.
* target.c (debug_to_xfer_memory, do_xfer_memory): Likewise.
* target.h (child_xfer_memory, do_xfer_memory, xfer_memory): Likewise.
* target.h (#include "memattr.h"): Added.
(target_ops.to_xfer_memory): Add attrib argument.
* wince.c (_initialize_inftarg): Removed call to set_dcache_state.
* dcache.h (set_dcache_state): Removed declaration.
* dcache.c (set_dcache_state): Removed definition
* dcache.c: Update module comment, as dcache is now enabled and
disabled with memory region attributes instead of by the global
variable "remotecache". Add comment describing the interaction
between dcache and memory region attributes.
(dcache_xfer_memory): Add comment describing benefits of moving
cache writeback to a higher level.
(dcache_struct): Removed cache_has_stuff field. This was used to
record whether the cache had been accessed in order to invalidate
it when it was disabled. However, this is not needed because the
cache is write through and the code that enables, disables, and
deletes memory regions invalidate the cache. Add comment which
suggests that we could be more selective and only invalidate those
cache lines containing data from those memory regions.
(dcache_invalidate): Updated.
(dcache_xfer_memory): Updated.
(dcache_alloc): Don't abort() if dcache_enabled_p is clear.
(dcache_xfer_memory): Removed code that called do_xfer_memory() to
perform a uncached transfer if dcache_enabled_p was clear. This
function is now only called if caching is enabled for the memory
region.
(dcache_info): Always print cache info.
* target.c (do_xfer_memory): Add attrib argument.
(target_xfer_memory, target_xfer_memory_partial): Break transfer
into chunks defined by memory regions, pass region attributes to
do_xfer_memory().
* dcache.c (dcache_read_line, dcache_write_line): Likewise.
* Makefile.in (SFILES): Add memattr.c.
(COMMON_OBS): Add memattr.o.
(dcache.o): Add target.h to dependencies.
* memattr.c: New file.
* memattr.h: Likewise.
invalidate it rather than creating another.
* ocd.c (ocd_open): Likewise.
* remote-nindy.c (nindy_open): Likewise.
* remote-sds.c (sds_open): Likewise.
* remote-utils.c (gr_open): Likewise.
* remote.c (remote_open_1, remote_cisco_open): Likewise.
* dcache.c (dcache_alloc): Changed to take address of line as an
argument, and to invalidate cache line before returning.
(dcache_peek_byte): Updated.
(dcache_poke_byte): Updated.
-------------------------------------------------------------------
(nindy_xfer_inferior_memory): Use dcache_xfer_memory() instead of
breaking transfer into chunks and using nindy_fetch_word() and
nindy_store_word().
* remote-bug.c (bug_xfer_memory): Use dcache_xfer_memory() instead
of breaking transfer into chunks and using gr_fetch_word() and
gr_store_word().
* remote.c (remote_fetch_word, remote_store_word): Removed.
* remote-utils.h (gr_fetch_word, gr_store_word): Removed.
* remote-utils.c (gr_fetch_word, gr_store_word): Removed.
* dcache.h (dcache_fetch, dcache_poke, dcache_poke_block): Removed.
* dcache.c (dcache_fetch, dcache_poke): Removed.
user can attach to a previously running program.
* (nindy_fetch_registers nindy_store_registers): Get rid of fp
conversion code. That's all handled in {extract store}_floating
now.
* utils.c (floatformat_to_double): Don't bias exponent when
handling zero's, denorms or NaNs.
* config/i960/tm-i960.h (REGISTER_CONVERT_TO_VIRTUAL
REGISTER_CONVERT_TO_RAW): Change to using DOUBLST and
FLOATFORMAT_TO/FROM_DOUBLEST macros.
* config/i960/tm-nindy960.h: Undefine
REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW, and
REGISTER_CONVERTIBLE. These are no longer necessary now that all
the magic happens in extract/store_floating.
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.
* (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.
* Add rule for annotate.o to keep Sun make happy.
* configure.in: Add config for powerpc/Netware.
* partial-stab.h (near N_SO): Don't call START_PSYMTAB with null
filename. This speeds up handling of trailing N_SO stabs (they
mark the end of a .o file).
* target.c, target.h: Change the way pushing and popping of
targets work to support target overlays and inheritance.
* corelow.c, hppa-tdep.c, inflow.c, remote-nindy.c, utils.c:
Fixup references to current_target, due to previous changes.
* config/i386/tm-i386nw.h: Enable longjmp support. More work is
needed to get the address of longjmp out of the target.
target.h, remote-es.c, remote-nindy.c: Don't set baud rate if
baud_rate is -1. Remove sr_get_baud_rate and sr_set_baud_rate;
just use the global variable itself. When printing baud rate,
don't print a baud rate if baud_rate is -1.
* Move target_signal_from_host, target_signal_to_host, and
store_waitstatus from inftarg.c to target.c. procfs needs them.
* target.c: Include "wait.h" and <signal.h>.
* target.h, infrun.c (proceed), proceed callers: Pass new code
TARGET_SIGNAL_DEFAULT instead of -1. This avoids problems with
enums being treated as unsigned and is cleaner.
* infrun.c (signals_info): Don't print TARGET_SIGNAL_DEFAULT or
TARGET_SIGNAL_0.
* infcmd.c (signal_command), infrun.c (signals_info):
Don't allow user to specify numeric equivalent of
TARGET_SIGNAL_DEFAULT.
struct target_waitstatus. Change status argument to target_wait to
be struct target_waitstatus * instead of int *.
* target.h, infrun.c, all targets: Change type of signal arguments
to resume(), proceed(), and target_resume() from int to enum
target_signal.
* All targets (*_wait, *_resume): Change accordingly.
* infcmd.c (program_info, signal_command), throughout infrun.c,
* fork-child.c, solib.c, hppa-tdep.c, osfsolib.c: Use this stuff.
* convex-xdep.c, convex-tdep.c: Add FIXME's (getting the Convex
signal code stuff right with the new signals would be non-trivial).
* inferior.h (stop_signal): Make it enum target_signal not int.
* target.c, target.h (target_signal_to_string, target_signal_to_name,
target_signal_from_name): New functions.
* inftarg.c, target.h (target_signal_to_host, target_signal_from_host,
store_waitstatus): New functions.
* procfs.c (procfs_notice_signals): Use them.
* i960-tdep.c (i960_fault_to_signal): New function, to replace
print_fault.
* config/i960/tm-i960.h: Don't define PRINT_RANDOM_SIGNAL.
Change all references to stdout/stderr to gdb_stdout/gdb_stderr.
Replace all calls to stdio output functions with calls to
corresponding _unfiltered functions (`fprintf_unfiltered')
Replaced calls to fopen for output to gdb_fopen.
Added sufficient goo to utils.c and defs.h to make the above work.
The net effect is that stdio output functions are only directly used
in utils.c. Elsewhere, the _unfiltered and _filtered functions and
GDB_FILE type are used.
In the near future, GDB_FILE will stop being equivalant to FILE.
The semantics of some commands has changed in a very subtle way:
called in the right context, they may cause new occurences of
prompt_for_continue() behavior. The testsuite doesn't notice anything
like this, though.
Please respect this change by not reintroducing stdio output
dependencies in the main body of gdb code. All output from commands
should go to a GDB_FILE.
Target-specific code can still use stdio directly to communicate with
targets.
* Move SWAP_TARGET_AND_HOST from defs.h to findvar.c because it is
now used only by extract_floating and store_floating.
* valprint.c (print_floating): Use unsigned arithmetic. Use
extract_unsigned_integer instead of SWAP_TARGET_AND_HOST.
Change sizeof (float) to 4 and sizeof (double) to 8 (those are always
the relevant sizes for this code, which is in #ifdef IEEE_FLOAT).
* values.c (unpack_long, unpack_double, value_from_double),
valarith.c (value_binop), stabsread.c (define_symbol):
Use extract_floating and store_floating instead of
SWAP_TARGET_AND_HOST.
* config/m68k/tm-m68k.h, config/i960/tm-i960.h (REGISTER_CONVERT_*):
Use extract_floating and store_floating.
* config/m88k/tm-m88k.h: Add comments (it should be doing the same).
* i386-tdep.c (i386_extract_return_value),
* remote-nindy.c (nindy_store_registers): Use store_floating.
* remote-mon.c: Remove commented out "set remotedebug" command.
* remote-nindy.c: Clean up comment about wanting alternative to
options specified on the GDB command line.
remote-mon.c (monitor_create_inferior), remote-nindy.c
(nindy_create_inferior), remote-st.c (st2000_create_inferior),
remote-vx.c (vx_create_inferior): Remove CREATE_INFERIOR_HOOK; it
is replaced by init_trace_fun.
* config/convex/xm-convex.h, convex-xdep.c: Add comments explaining
how to do without CREATE_INFERIOR_HOOK for whoever fixes the Convex
port.
* Makefile.in: Add Mach files to ALLDEPFILES, etc.
* m3-nat.c: Clean up more hair--message(), cprocs.
* configure.in: Recognize Mach targets and hosts.
* config/ns32k/tm-umax.h: Add some #ifndef's so tm-ns32km3.h can
include this file.
* Mach headers in config/*/tm-*.h: Fix includes to match correct
locations of files.