Add a target_ops parameter to the to_kill method in struct target_ops.

* target.h (struct target_ops): Add a "target_ops *" parameter to
        method to_kill.
        (target_kill): Remove macro. Add declaration.
        * target.c (debug_to_kill): Delete, no longer necessary.
        (target_kill): New function.
        (update_current_target):  Stop inheriting the to_kill method.
        Do not de_fault it to no_process either.
        (setup_target_debug): Do not set current_target.to_kill.
        * gnu-nat.c, go32-nat.c, hpux-thread.c, inf-ptrace.c, inf-ttrace.c,
        linux-nat.c, monitor.c, nto-procfs.c, procfs.c, remote-m32r-sdi.c,
        remote-mips.c, remote-sim.c, remote.c, windows-nat.c: Update
        accordingly.
This commit is contained in:
Joel Brobecker
2009-03-17 19:28:09 +00:00
parent 14064aa202
commit 7d85a9c0e3
17 changed files with 63 additions and 44 deletions

View File

@@ -72,7 +72,7 @@ static void gdb_os_evprintf_filtered (host_callback *, const char *, va_list);
static void gdb_os_error (host_callback *, const char *, ...) ATTR_NORETURN;
static void gdbsim_kill (void);
static void gdbsim_kill (struct target_ops *);
static void gdbsim_load (char *prog, int fromtty);
@@ -378,7 +378,7 @@ gdbsim_store_register (struct target_ops *ops,
and releasing other resources acquired by the simulated program. */
static void
gdbsim_kill (void)
gdbsim_kill (struct target_ops *ops)
{
if (remote_debug)
printf_filtered ("gdbsim_kill\n");
@@ -451,7 +451,7 @@ gdbsim_create_inferior (struct target_ops *target, char *exec_file, char *args,
args);
if (ptid_equal (inferior_ptid, remote_sim_ptid))
gdbsim_kill ();
gdbsim_kill (target);
remove_breakpoints ();
init_wait_for_inferior ();