* target.h (to_stopped_data_address): Change prototype to
take a CORE_ADDR pointer and return an int.
* target.c (update_current_target): Change to_stopped_data_address
to match new prototype.
(debug_to_stopped_data_address): Change appropriately.
* breakpoint.c (bpstat_stop_status): Change call to
target_stopped_data_address to use new prototype.
* frv-tdep.c (frv_have_stopped_data_address): New function.
(frv_stopped_data_address): Change to new prototype and
functionality.
* ia64-linux-nat.c (ia64_stopped_data_address): Change to new
prototype and functionality.
(ia64_stopped_by_watchpoint): New function.
* i386-nat.c (i386_stopped_data_address): Change to new
prototype and functionality.
(i386_stopped_by_watchpoint): New function.
* remote.c (remote_stopped_data_address): Change to new prototype
and functionality.
* remote-m32r-sdi.c (m32r_stopped_data_address): Ditto.
* config/frv/tm-frv.h (frv_stopped_data_address): Change prototype.
(STOPPED_BY_WATCHPOINT): Change to use frv_have_stopped_data_address.
* config/i386/nm-i386.h (STOPPED_BY_WATCHPOINT): Change to use
new i386_stopped_by_watchpoint function.
(i386_stopped_by_watchpoint): New prototype.
(i386_stoppped_data_address): Change to new prototype.
* config/ia64/nm-linux.h (STOPPED_BY_WATCHPOINT): Change to use
new ia64_stopped_by_watchpoint function.
(ia64_stopped_by_watchpoint): New prototype.
(ia64_stopped_data_address): Ditto.
(i386_handle_nonaligned_watchpoint): Rename local variable `rv' to
`retval'. Make variables `align' and `size' local to while-loop.
(i386_stopped_data_address): Rename local variable `ret' to `addr'.
(_initialize_i386_nat): New prototype.
* config/i386/nm-linux.h (LINUX_CHILD_POST_STARTUP_INFERIOR): Define.
* config/nm-linux.h (CHILD_POST_STARTUP_INFERIOR, CHILD_POST_ATTACH)
(CHILD_FOLLOW_FORK, KILL_INFERIOR): Define.
* i386-linux-nat.c: Include "linux-nat.h".
(child_post_startup_inferior): New function.
* i386-nat.c (child_post_startup_inferior): Wrap in #ifdef.
* infptrace.c (kill_inferior): Wrap in #ifdef.
* lin-lwp.c (lin_lwp_attach_lwp): Call child_post_attach after
attaching to each LWP.
(child_wait, lin_lwp_wait): Call linux_handle_extended_wait.
(init_lin_lwp_ops): Fill in some more operations.
* linux-nat.h (linux_enable_event_reporting)
(linux_handle_extended_wait, linux_child_post_startup_inferior): New
prototypes.
* linux-nat.c (linux_enable_event_reporting): New function.
(child_post_attach, linux_child_post_startup_inferior)
(child_post_startup_inferior, child_follow_fork)
(linux_handle_extended_wait, kill_inferior): New functions.
* i386-nat.c (child_post_startup_inferior): New function
calling i386_cleanup_dregs if
I386_USE_GENERIC_WATCHPOINTS is defined.
* config/i386/nm-i386.h: define CHILD_POST_STARTUP_INFERIOR
conditional to acknowledge that i386-nat.c has its
own child_post_startup_inferior function.
register before enabling it by setting the control register.
(i386_remove_aligned_watchpoint): Reset address register after
disabling it by setting the control register.