Commit Graph

74 Commits

Author SHA1 Message Date
Kris Warkentin 7df1a32481 add HAVE_CONTINUABLE_WATCHPOINT to target_ops 2003-02-24 21:56:51 +00:00
Andrew Cagney 570b8f7c95 2003-01-18 Andrew Cagney <ac131313@redhat.com>
* cris-tdep.c: Fix function declaration indentation.
	* dwarfread.c, gdbcore.h, gdbtypes.h, i386v-nat.c: Ditto.
	* mips-tdep.c, monitor.h, parse.c, proc-utils.h: Ditto.
	* rs6000-nat.c, ser-go32.c, somread.c, stabsread.c: Ditto.
	* symfile.h, symtab.h, target.c, target.h, value.h: Ditto.
	* xcoffread.c, config/pa/tm-hppa.h: Ditto.
	* config/sparc/tm-sp64.h, config/sparc/tm-sparc.h: Ditto.
2003-01-19 04:06:47 +00:00
Daniel Jacobowitz 81e5617914 * target.c (update_current_target): Don't inherit DONT_USE.
* target.h (struct target_ops): Remove DONT_USE.
	(target_next): Remove macro.
2002-12-15 19:00:33 +00:00
Daniel Jacobowitz 4c9ba7e0a6 * corelow.c (init_core_ops): Delete references to to_require_attach
and to_require_detach.
	* exec.c (init_exec_ops): Likewise.
	* hppah-nat.c (child_follow_fork): Call hppa_require_attach and
	hppa_require_detach directly.
	* inferior.h (REQUIRE_ATTACH, REQUIRE_DETACH): Delete.
	* inftarg.c (child_detach): Remove.
	(child_detach_from_process): Rename to child_detach, remove
	after_fork argument.
	(child_attach): Remove.
	(child_attach_to_process): Rename to child_attach, remove after_fork
	argument.
	(init_child_ops): Delete references to to_require_attach
	and to_require_detach.
	* infttrace.c (hppa_require_attach): Update comment.
	* target.c (cleanup_target, update_current_target)
	(init_dummy_target, setup_target_debug): Delete references to
	to_require_attach and to_require_detach.
	(find_default_require_detach, find_default_require_attach)
	(debug_to_require_attach, debug_to_require_detach): Remove
	functions.
	* target.h (struct target_ops): Remove to_require_attach
	and to_require_detach.
	(target_require_attach, target_require_detach): Delete macros.
	(find_default_require_detach, find_default_require_attach): Delete
	prototypes.
	* config/pa/nm-hppah.h (REQUIRE_ATTACH, REQUIRE_DETACH): Delete.
2002-12-12 01:39:34 +00:00
Daniel Jacobowitz 6604731ba7 * config/pa/nm-hppah.h (CHILD_POST_FOLLOW_VFORK): Change to
CHILD_FOLLOW_FORK.
	* hppah-nat.c (saved_vfork_pid): Add.
	(child_post_follow_vfork): Remove.
	(child_follow_fork): New function.
	(child_wait): Call detach_breakpoints after receiving the child vfork.
	Call child_resume directly instead of going through resume ().
	Make sure we have the exec before reporting the vfork.
	* inferior.h (follow_inferior_reset_breakpoints): Add prototype.
	* infrun.c (follow_fork, follow_vfork, follow_inferior_fork): Remove.
	(follow_fork): New function.  Call target_follow_fork.
	(follow_inferior_reset_breakpoints): New function broken out from
	old follow_inferior_fork.
	(resume): Remove hack to follow exec after vfork.
	* inftarg.c (child_post_follow_vfork): Remove.
	(child_follow_fork): New function.
	(init_child_ops): Replace to_post_follow_vfork with to_follow_fork.
	* target.c (cleanup_target): Replace to_post_follow_vfork with
	to_follow_fork.
	(update_current_target): Likewise.
	(setup_target_debug): Likewise.
	(debug_to_post_follow_vfork): Remove.
	(debug_to_follow_fork): New function.
	* target.h (struct target_ops): Replace to_post_folow_vfork with
	to_follow_fork.
	(child_post_follow_vfork): Remove prototype.
	(child_follow_fork): Add prototype.
	(target_post_follow_vfork): Remove macro.
	(target_follow_fork): Add macro.

testsuite/
	* gdb.base/foll-vfork.exp: Re-enable test on HP/UX.
2002-12-11 02:04:45 +00:00
Daniel Jacobowitz 8e7d2c1695 * hppah-nat.c (child_wait): Return TARGET_WAITKIND_IGNORE
for the parent's fork event.
	* infrun.c (handle_inferior_event): Only expect one fork event.
	Call prepare_to_wait for TARGET_WAITKIND_IGNORE.  Update comment.
	* target.h: Update comment for TARGET_WAITKIND_IGNORE.
2002-12-11 01:25:19 +00:00
Daniel Jacobowitz 8a1f4c4c14 * config/pa/nm-hppah.h (CHILD_POST_FOLLOW_INFERIOR_BY_CLONE): Don't
define.
	(struct target_waitstatus): Add opaque definition.
	* corelow.c (init_core_ops): Don't set to_clone_and_follow_inferior.
	* exec.c (init_exec_ops): Likewise.
	* fork-child.c (clone_and_follow_inferior): Remove.
	* hppah-nat.c (child_post_follow_inferior_by_clone): Remove.
	* inferior.h (clone_and_follow_inferior): Remove prototype.
	* infrun.c (follow_fork_mode_both): Remove.
	(follow_fork_mode_kind_names): Remove commented out "both".
	(follow_inferior_fork): Remove follow_fork_mode_both support.
	* inftarg.c (child_clone_and_follow_inferior): Remove.
	(child_post_follow_inferior_by_clone): Remove.
	(init_child_ops): Don't set to_clone_and_follow_inferior
	or to_post_follow_inferior_by_clone.
	* target.c (default_clone_and_follow_inferior): Remove.
	(cleanup_target): Don't set to_clone_and_follow_inferior
	or to_post_follow_inferior_by_clone.
	(find_default_clone_and_follow_inferior): Remove.
	(init_dummy_target): Don't set to_clone_and_follow_inferior.
	(debug_to_clone_and_follow_inferior): Remove.
	(debug_to_post_follow_inferior_by_clone): Remove.
	(setup_target_debug): Don't set to_clone_and_follow_inferior
	or to_post_follow_inferior_by_clone.
	* target.h (struct target_ops): Remove to_clone_and_follow_inferior
	and to_post_follow_inferior_by_clone.
	(child_clone_and_follow_inferior): Remove prototype.
	(child_post_follow_inferior_by_clone): Remove prototype.
	(target_clone_and_follow_inferior): Remove macro.
	(target_post_follow_inferior_by_clone): Remove macro.
	(find_default_clone_and_follow_inferior): Remove prototype.
2002-11-16 19:23:52 +00:00
Daniel Jacobowitz 47932f85ce * breakpoint.c (bpstat_stop_status): Call inferior_has_forked,
inferior_has_vforked, and inferior_has_execd instead of
	target_has_forked, target_has_vforked, and target_has_execd.
	* config/pa/nm-hppah.h (CHILD_HAS_FORKED, CHILD_HAS_VFORKED)
	(CHILD_HAS_EXECD, CHILD_HAS_SYSCALL_EVENT): Don't define.
	(CHILD_WAIT): Define.
	(child_wait): Add prototype.
	* hppah-nat.c (hpux_has_forked): Rename from child_has_forked.
	Add prototype.
	(hpux_has_vforked): Likewise, from child_has_vforked.
	(hpux_has_execd): Likewise, from child_has_execd.
	(hpux_has_syscall_event): Likewise, from child_has_syscall_event.
	(not_same_real_pid, child_wait): New, copied from inftarg.c.
	Call hpux_has_forked, hpux_has_vforked, hpux_has_execd,
	and hpux_has_syscall_event instead of the target hooks.
	* infrun.c (inferior_has_forked, inferior_has_vforked)
	(inferior_has_execd): New functions.
	* inftarg.c (not_same_real_pid): Remove.
	(child_wait): Remove references to not_same_real_pid,
	target_has_forked, target_has_vforked, target_has_execd,
	and target_has_syscall_event.
	(child_has_forked, child_has_vforked, child_has_execd)
	(child_has_syscall_event): Remove.
	(init_child_ops): Remove references to child_has_forked,
	child_has_vforked, child_has_execd, and child_has_syscall_event.
	* infttrace.c (hpux_has_forked): Rename from child_has_forked.
	(hpux_has_vforked): Likewise, from child_has_vforked.
	(hpux_has_execd): Likewise, from child_has_execd.
	(hpux_has_syscall_event): Likewise, from child_has_syscall_event.
	* target.c (cleanup_target): Remove references to
	to_has_forked, to_has_vforked, to_has_execd, and
	to_has_syscall_event.
	(update_current_target): Likewise.
	(setup_target_debug): Likewise.
	(debug_to_has_forked): Remove.
	(debug_to_has_vforked): Remove.
	(debug_to_has_execd): Remove.
	(debug_to_has_syscall_event): Remove.
	* target.h (struct target_ops): Remove to_has_forked.
	to_has_vforked, to_has_execd, and to_has_syscall_event.
	(child_has_forked, child_has_vforked, child_has_execd)
	(child_has_syscall_event): Remove prototypes.
	(inferior_has_forked, inferior_has_vforked, inferior_has_execd): Add
	prototypes.
	(target_has_forked, target_has_vforked, target_has_execd)
	(target_has_syscall_event): Remove macros.
2002-11-16 19:22:59 +00:00
Daniel Jacobowitz 4088142aae * hppah-nat.c (child_can_follow_vfork_prior_to_exec): Remove.
* inftarg.c (child_can_follow_vfork_prior_to_exec): Remove.
	(init_child_ops): Don't initialize to_can_follow_vfork_prior_to_exec.
	* infttrace.c (child_can_follow_vfork_prior_to_exec): Remove.
	* target.c (cleanup_target): Remove reference to
	to_can_follow_vfork_prior_to_exec.
	(update_current_target): Likewise.
	(debug_to_can_follow_vfork_prior_to_exec): Remove.
	(setup_target_debug): Remove reference to
	to_can_follow_vfork_prior_to_exec.
	* target.h (struct target_ops): Remove
	to_can_follow_vfork_prior_to_exec.
	(child_can_follow_vfork_prior_to_exec): Remove prototype.
	(target_can_follow_vfork_prior_to_exec): Remove definition.
	* config/pa/nm-hppah.h (CHILD_CAN_FOLLOW_VFORK_PRIOR_TO_EXEC): Don't
	define.
	* infrun.c (follow_vfork_when_exec): Remove.
	(follow_inferior_fork): Remove references to follow_vfork_when_exec.
	(follow_exec): Likewise.
	(handle_inferior_event): Likewise.
	(keep_going): Likewise.
2002-11-16 19:21:44 +00:00
Elena Zannoni 3f47be5ca1 2002-11-11 Elena Zannoni <ezannoni@redhat.com>
* findvar.c (read_var_value): Reenable TLS code.

2002-11-11  Elena Zannoni  <ezannoni@redhat.com>
            Jim Blandy  <jimb@redhat.com>

	* gdb_thread_db.h (enum): Add TD_NOTALLOC.
	* target.c (update_current_target): Add
	to_get_thread_local_address.
	* target.h (to_get_thread_local_address): Export.
	(target_get_thread_local_address): Define.
	(target_get_thread_local_address_p): Define.
	* thread-db.c: Include solib-svr4.h.
	(td_thr_tls_get_addr_p): Define.
	(thread_db_load): Get a pointer to td_thr_tls_get_addr.
	(thread_db_get_thread_local_address): New function.
	(init_thread_db_ops): Initialize to_get_thread_local_address.
	* configure.in: Add test for TD_NOTALLOC in thread_db.h.
	* configure: Regenerate.
	* config.in: Regenerate.
2002-11-12 02:39:41 +00:00
Stephane Carrez a790ad353e Fix PR gdb/393:
* inflow.c (terminal_save_ours): New function to save terminal
	settings.
	* inferior.h (terminal_save_ours): Declare.
	* target.c (debug_to_terminal_save_ours): New function.
	(cleanup_target): Defaults to_terminal_save_ours.
	(update_current_target): Inherit to_terminal_save_ours.
	(setup_target_debug): Set to_terminal_save_ours.
	* target.h (target_terminal_save_ours): New to save terminal settings.
	(target_ops): New member to_terminal_save_ours.
	* gnu-nat.c (init_gnu_ops): Set to_terminal_save_ours.
	* hpux-thread.c (init_hpux_thread_ops): Likewise.
	* inftarg.c (init_child_ops): Likewise.
	* m3-nat.c (init_m3_ops): Likewise.
	* procfs.c (init_procfs_ops): Likewise.
	* wince.c (init_child_ops): Likewise.
	* win32-nat.c (init_child_ops): Likewise.
	* sol-thread.c (init_sol_thread_ops): Likewise.
2002-08-26 19:18:33 +00:00
Grace Sainsbury ccaa32c7e8 * target.h: Add to_insert_hw_breakpoint, to_remove_hw_breakpoint,
to_insert_watchpoint, to_remove_watchpoint,
	to_stopped_by_watchpoint, to_stopped_data_address,
	to_region_size_ok_for_hw_watchpoint, to_can_use_hw_breakpoint to
	target vecctor. Define their corresponding macros so they call
	them.

	* target.c: Add default and debug versions of for
	to_insert_hw_breakpoint, to_remove_hw_breakpoint,
	to_insert_watchpoint, to_remove_watchpoint,
	to_stopped_by_watchpoint, to_stopped_data_address,
	to_region_size_ok_for_hw_watchpoint, to_can_use_hw_breakpoint.
2002-08-01 21:20:14 +00:00
Andrew Cagney f4f9705a2d * gdbarch.sh (BREAKPOINT_FROM_PC): Return a const buffer.
* gdbarch.h, gdbarch.c: Regenerate.

* defs.h (breakpoint_from_pc_fn): Delete type definition.
* target.h (memory_breakpoint_from_pc): Update declaration.
* config/mcore/tm-mcore.h (mcore_breakpoint_from_p): Ditto.

* arch-utils.c (legacy_breakpoint_from_pc): Update return type.
* mcore-tdep.c (mcore_breakpoint_from_pc): Ditto.
* mem-break.c (memory_breakpoint_from_pc): Ditto.
* rs6000-tdep.c (rs6000_breakpoint_from_pc): Ditto.
* s390-tdep.c (s390_breakpoint_from_pc): Ditto
* xstormy16-tdep.c (xstormy16_breakpoint_from_pc): Ditto.
* mn10300-tdep.c (mn10300_breakpoint_from_pc): Ditto.
* mips-tdep.c (mips_breakpoint_from_pc): Ditto.
* m68hc11-tdep.c (m68hc11_breakpoint_from_pc): Ditto.
* ia64-tdep.c (ia64_breakpoint_from_pc): Ditto.
* d10v-tdep.c (d10v_breakpoint_from_pc): Ditto.
* arch-utils.c (legacy_breakpoint_from_pc): Ditto..

* mem-break.c (default_memory_insert_breakpoint): Make `bp' a
const pointer.
* monitor.c (monitor_insert_breakpoint): Ditto.
* rs6000-tdep.c (rs6000_software_single_step): Ditto for `breakp'.

* config/mcore/tm-mcore.h: Update copyright.
* mem-break.c: Ditto.
* xstormy16-tdep.c: Ditto.
2002-04-18 18:09:09 +00:00
Andrew Cagney b5a2688fa4 * defs.h (throw_exception): Rename return_to_top_level. Update
comments.
* utils.c (error_stream, internal_verror, quit): Ditto.
* top.c (throw_exception, catcher): Ditto.
* sparclet-rom.c (sparclet_load): Ditto.
* remote.c (interrupt_query, minitelnet): Ditto.
* remote-sds.c (interrupt_query): Ditto.
* remote-mips.c (mips_error, mips_kill): Ditto.
* ocd.c (interrupt_query): Ditto.
* monitor.c (monitor_interrupt_query): Ditto.
* m3-nat.c (suspend_all_threads, thread_resume_command): Ditto.
* target.h: Update comment.

* m3-nat.c, ocd.c, sparclet-rom.c: Update copyright.
2002-02-10 04:08:42 +00:00
Michael Snyder be4d133316 2002-01-03 Michael Snyder <msnyder@redhat.com>
Implement a "generate-core-file" command in gdb, save target state.
	* gcore.c: New file.  Implement new command 'generate-core-file'.
	Save a corefile image of the current state of the inferior.
	* linux-proc.c: Add linux-specific code for saving corefiles.
	* target.h (struct target_ops): Add new target vectors for saving
	corefiles; to_find_memory_regions and to_make_corefile_notes.
	(target_find_memory_regions): New macro.
	(target_make_corefile_notes): New macro.
	* target.c (update_current_target): Inherit new target methods.
	(dummy_find_memory_regions): New place-holder method.
	(dummy_make_corefile_notes): New place-holder method.
	(init_dummy_target): Initialize new dummy target vectors.
	* exec.c (exec_set_find_memory_regions): New function.
	Allow the exec_ops vector for memory regions to be taken over.
	(exec_make_note_section): New function, target vector method.
	* defs.h (exec_set_find_memory_regions): Export prototype.
	* procfs.c (proc_find_memory_regions): New function, corefile method.
	(procfs_make_note_section): New function, corefile method.
	(init_procfs_ops): Set new target vector pointers.
	(find_memory_regions_callback): New function.
	(procfs_do_thread_registers): New function.
	(procfs_corefile_thread_callback): New function.
	* sol-thread.c (sol_find_memory_regions): New function.
	(sol_make_note_section): New function.
	(init_sol_thread_ops): Initialize new target vectors.
	* inftarg.c (inftarg_set_find_memory_regions): New function.
	Allow to_find_memory_regions vector to be taken over.
	(inftarg_set_make_corefile_notes): New function.
	Allow to_make_corefile_notes vector to be taken over.
	* thread-db.c (thread_db_new_objfile): Don't activate thread-db
	interface layer if not target_has_execution (may be a corefile).
	* config/i386/linux.mh: Add gcore.o to NATDEPFILES.
	* config/sparc/sun4sol2.mh: Ditto.
	* config/alpha/alpha-linux.mh: Ditto.
	* config/arm/linux.mh: Ditto.
	* config/i386/x86-64linux.mh: Ditto.
	* config/ia64/linux.mh: Ditto.
	* config/m68k/linux.mh: Ditto.
	* config/mips/linux.mh: Ditto.
	* config/powerpc/linux.mh: Ditto.
	* config/sparc/linux.mh: Ditto.
2002-01-09 00:37:02 +00:00
Jim Blandy 98eedd63d0 * target.h (TARGET_RANGE_PROFITABLE_FOR_HW_WATCHPOINT): Delete
default definition; this is never used.
2001-11-21 02:01:29 +00:00
Andrew Cagney 39d4ef0921 * target.h (TARGET_VIRTUAL_FRAME_POINTER): Delete, multi-arched.
* gdbarch.sh (TARGET_VIRTUAL_FRAME_POINTER): Add.
* gdbarch.h, gdbarch.c: Regenerate.

* arch-utils.h (legacy_virtual_frame_pointer): Declare.
* arch-utils.c: Include "gdb_assert.h".
(legacy_virtual_frame_pointer): Define.
* Makefile.in (arch-utils.o): Depends on gdb_assert.h.

* tracepoint.c (encode_actions): Make frame_reg an int.  Make
frame_offset a LONGEST.
* ax-gdb.c (gen_frame_args_address): Ditto.
(gen_frame_locals_address): Ditto.
* mn10300-tdep.c (mn10300_gdbarch_init): Initialize
virtual_frame_pointer.
(mn10300_virtual_frame_pointer): Make static.  Update parameter
list to match function signature.
* config/mn10300/tm-mn10300.h (TARGET_VIRTUAL_FRAME_POINTER): Delete.
2001-08-11 00:59:29 +00:00
Kevin Buettner 39f770628a Phase 1 of the ptid_t changes. 2001-05-04 04:15:33 +00:00
J.T. Conklin 46c6cdcf5e * target.h (target_ops): Removed to_core_file_to_sym_file vector
function.
* corelow.c (core_ops): Updated for above change.
* gnu-nat.c (core_ops): Likewise.
* inftarg.c (child_ops): Likewise.
* monitor.c (monitor_ops): Likewise.
* ppc-bdm.c (bdm_ppc_ops): Likewise.
* remote-adapt.c (adapt_ops): Likewise.
* remote-bug.c (bug_ops): Likewise.
* remote-e7000.c (e7000_ops): Likewise.
* remote-eb.c (eb_ops): Likewise.
* remote-es.c (es1800_ops, es1800_child_ops): Likewise.
* remote-mm.c (mm_ops): Likewise.
* remote-nindy.c (nindy_ops): Likewise.
* remote-nrom.c (nrom_ops): Likewise.
* remote-os9k.c (rombug_ops): Likewise.
* remote-rdp.c (remote_rdp_ops): Likewise.
* remote-sim.c (gdbsim_ops): Likewise.
* remote-st.c (st2000_ops): Likewise.
* v850ice.c (v850ice_ops): Likewise.
* target.c (cleanup_target): Likewise
(update_current_target): Likewise.
(setup_target_debug): Likewise
(debug_to_core_file_to_sym_file): Removed.

* corefile.c (core_file_command) [HPUXHPPA]: Removed code that
sets symbol file from information obtained from the core file.
* corelow.c (core_file_to_sym_file): Removed.
2001-04-14 19:23:02 +00:00
Andrew Cagney 64c4637f92 * config/sparc/tm-sp64.h (GDB_MULTI_ARCH): Down grade to
GDB_MULTI_ARCH_PARTIAL from two.  SOFTWARE_SINGLE_STEP is not
multi-arch.
* gdbarch.sh (SOFTWARE_SINGLE_STEP): Add.
* gdbarch.h, gdbarch.c: Re-generate.
* target.h (SOFTWARE_SINGLE_STEP_P)
(SOFTWARE_SINGLE_STEP): Delete macro definitions.
2001-03-24 02:07:49 +00:00
Andrew Cagney 379d08a1d4 * target.h (enum target_signal): Move definition from here.
* defs.h (enum target_signal): To here.

* config/arc/tm-arc.h (arc_software_single_step): Change type of
first parameter to enum target_signal.
* config/rs6000/tm-rs6000.h (rs6000_software_single_step): Ditto.
* config/sparc/tm-sparc.h (sparc_software_single_step): Ditto.
* rs6000-tdep.c (rs6000_software_single_step): Update.
2001-03-21 18:31:48 +00:00
Andrew Cagney b0ed35899a Change SOFTWARE_SINGLE_STEP_P into SOFTWARE_SINGLE_STEP_P(). 2001-03-20 18:16:28 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
Mark Kettenis 17dee195e8 * target.h (target_fetch_registers): Fix comment. 2001-02-16 11:25:15 +00:00
Andrew Cagney 8e65ff28b0 Add __FILE__ and __LINE__ parameter to internal_error() /
internal_verror().
2001-02-08 06:03:54 +00:00
J.T. Conklin 29e5738069 * exec.c (xfer_memory): Add attrib argument.
* 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.
2001-01-23 22:48:56 +00:00
Andrew Cagney 6ab3a9c917 * target.h (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT)
* breakpoint.c (TARGET_REGION_OK_FOR_HW_WATCHPOINT): Wrap macro
definition in parenthesis.
2001-01-18 15:42:24 +00:00
Peter Schauer d57fc35284 * target.h (TARGET_SIGNAL_REALTIME_64): Added for IRIX 6.
* target.c (target_signal_from_host, do_target_signal_to_host):
	Handle TARGET_SIGNAL_REALTIME_64.
2000-11-21 10:26:07 +00:00
J.T. Conklin 4930751aae * TODO: Note abstraction layer violation where "ocd reset" command
must invalidate the dcache, and how this might be fixed.

* monitor.c (#include "dcache.h"): Removed.
(remote_dcache): Removed.
(monitor_open): Removed code that created local dcache.
(flush_monitor_dcache): Removed (unused function).
(monitor_resume): Removed call to dcache_invd().
(monitor_load): Likewise.
(monitor_xfer_memory): Changed to call monitor_write_memory(),
monitor_write_memory_block(), and monitor_read_memory() instead
of dcache_xfer_memory().
* monitor.h (flush_monitor_dcache): Removed (unused function).
* ocd.c (#include "dcache.h"): Removed.
(ocd_dcache): Removed.
(ocd_open): Removed code that created local dcache.
(ocd_resume): Removed call to dcache_invd().
(ocd_xfer_memory): Changed to call ocd_write_bytes() and
ocd_read_bytes() instead of dcache_xfer_memory().
(bdm_reset_command): Invalidate target dcache.
* remote-bug.c (bug_load): Remove call to dcache_invd().
(bug_resume): Likewise.
(bug_settings): Remove dcache, readfunc, and writefunc fields
from initializer.
(bug_xfer_memory): Changed to call bug_read_memory() and
bug_write_memory() instead of dcache_xfer_memory().
* remote-nindy.c (#include "dcache.h"): Removed.
(nindy_dcache): Removed.
(nindy_open): Removed code that created local dcache.
(nindy_resume): Removed call to dcache_invd().
(nindy_load): Likewise.
(nindy_xfer_inferior_memory): Changed to call ninMemPut() and
ninMemGet() instead of dcache_xfer_memory().
* remote-sds.c (#include "dcache.h"): Removed.
(sds_dcache): Removed.
(sds_open): Removed code that created local dcache.
(sds_resume): Removed call to dcache_invd().
(sds_xfer_memory): Changed to call sds_write_bytes() and
sds_read_bytes() instead of dcache_xfer_memory().
* remote-utils.c (gr_open): Removed code that created local dcache.
* remote-utils.h (#include "dcache.h"): Removed.
(struct gr_settings): Removed dcache, readfunc, and writefunc fields.
(gr_get_dcache, gr_set_dcache): Removed macro definitions.
* remote.c (#include "dcache.h"): Removed.
(remote_dcache): Removed.
(remote_open_1): Removed code that created local dcache.
(remote_async_open_1): Likewise.
(remote_resume): Removed call to dcache_invd().
(remote_async_resume): Likewise.
(remote_xfer_memory): Changed to call remote_write_bytes() and
remote_read_bytes() instead of dcache_xfer_memory().
* wince.c (#include "dcache.h"): Removed.
(remote_dcache): Removed.
(child_create_inferior): Removed code that created local dcache.
(child_xfer_memory): Changed to call remote_write_bytes() and
remote_read_bytes() instead of dcache_xfer_memory().
(child_resume): Removed call to dcache_invd().

* target.c (target_dcache): Added.
(target_load): Invalidate target_dcache.
(do_xfer_memory): New function.
(target_xfer_memory): Reimplement in terms of dcache_xfer_memory().
(target_xfer_memory_partial): Likewise.
(initialize_targets): Create target_dcache.
* target.h (#include "dcache.h"): Added.
(target_open): Invalidate target_dcache.
(target_resume): Likewise.
(do_xfer_memory): New declaration.

* dcache.c (dcache_init): Removed reading and writing arguments.
(dcache_struct): Removed read_memory and write_memory fields.
(dcache_write_line): Call do_xfer_memory.
(dcache_read_line): Likewise.
(dcache_xfer_memory): Likewise.
(dcache_invalidate): Renamed from dcache_invd.
(dcache_init): Updated.
(dcache_xfer_memory): Updated.
* dcache.h (memxferfunc): Removed definition.
2000-11-03 22:00:56 +00:00
David Anderson 9d8a64cb91 Corrected spelling in comment: dependant -> dependent. 2000-09-02 00:12:17 +00:00
Kevin Buettner 507f3c78fb Eliminate PARAMS from function pointer declarations. 2000-06-04 00:41:10 +00:00
Kevin Buettner a14ed312fd PARAMS removal. 2000-05-28 01:12:42 +00:00
J.T. Conklin d4b2399a9c * target.h (target_memory_bfd_section): Removed declaration.
* target.c (target_memory_bfd_section): Removed.
* exec.c (xfer_memory): Removed #if'ed-out code which referenced
target_memory_bfd_section.

* target.h (target_read_memory_section): Removed declaration.
* target.c (target_read_memory_section): Removed.
(target_xfer_memory): Update, removed bfd_section argument.
(target_read_string, target_read_memory, target_write_memory):
Update for above change.

* gdbcore.h (read_memory_section): Removed declaration.
* corefile.c (read_memory_section): Removed.
* jv-lang.c (get_java_utf8_name): Changed calls to
read_memory_section to read_memory.
* printcmd.c (printf_command): Likewise.
* valops.c (value_at, value_fetch_lazy): Likewise.
2000-05-20 10:29:51 +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 07cd4b9723 Deal with the inferior unloading shared objects.
* solib.c (current_sos): New function, replacing find_solib.
(find_solib): Deleted.
(free_so): New function.
(clear_solib): Call free_so, instead of writing it out.
(solib_add): Rewritten: compare the inferior's current list of
shared objects with GDB's list, and do the required loads and
unloads.
(info_sharedlibrary_command, solib_address): Don't use find_solib
to walk the list of shared libraries: call solib_add, and then
walk the list at so_list_head normally.
* objfiles.c (free_objfile): Don't call CLEAR_SOLIB, and don't
detach the core target.  These tasks are taken care of elsewhere.
* target.c (remove_target_sections): New function.
* target.h (remove_target_sections): New declaration.

* solib.c (symbol_add_stub): Check whether we've already created
an objfile for this shared object first, before doing all that
work to compute section addresses, etc.

* objfiles.c (unlink_objfile): Report an internal error if objfile
doesn't occur in the object_files list.

* solib.c (special_symbol_handling): Delete argument; it's not
used.

* solib.c (SOLIB_EXTRACT_ADDRESS):  New macro to extract addresses
from solib structures. Use it throughout solib.c, get rid of all
CORE_ADDR casts.
(struct so_list):  Change type of lmaddr to CORE_ADDR.
(first_link_map_member):  Change return value type to CORE_ADDR,
update callers.
(solib_add_common_symbols):  Change parameter type to CORE_ADDR,
update callers.
(open_symbol_file_object, find_solib):  Change type of lm variable
to CORE_ADDR.
2000-03-15 16:55:07 +00:00
Jason Molenda d9fcf2fb1c import gdb-2000-02-01 snapshot 2000-02-02 00:21:19 +00:00
Jason Molenda 0d06e24ba7 import gdb-2000-01-10 snapshot 2000-01-11 03:07:37 +00:00
Jason Molenda ed9a39ebf9 import gdb-1999-12-21 snapshot 1999-12-22 21:45:38 +00:00
Jason Molenda c4093a6ab3 import gdb-1999-12-13 snapshot 1999-12-14 01:06:04 +00:00
Jason Molenda c2d11a7da0 import gdb-1999-12-06 snapshot 1999-12-07 03:56:43 +00:00
Jason Molenda 11cf874164 import gdb-1999-11-08 snapshot 1999-11-09 01:23:30 +00:00
Jason Molenda 917317f4c6 import gdb-1999-10-18 snapshot 1999-10-19 02:47:02 +00:00
Jason Molenda 2acceee218 import gdb-1999-10-04 snapshot 1999-10-05 23:13:56 +00:00
Jason Molenda 6426a772a2 import gdb-1999-09-28 snapshot 1999-09-28 21:55:21 +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 43ff13b418 import gdb-1999-07-05 snapshot 1999-07-05 17:58:44 +00:00
Stan Shebs cd0fc7c3eb import gdb-1999-05-10 1999-05-11 13:35:55 +00:00
Stan Shebs b83266a0e1 import gdb-19990504 snapshot 1999-05-05 14:45:51 +00:00