From 5ac10fd160d73209c54cfed7905a582fe000a2fe Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Wed, 29 Sep 2004 13:54:33 +0000 Subject: [PATCH] 2004-09-29 Andrew Cagney * target.h (child_ops): Declare. * inftarg.c (child_ops): Move from here ... * target.c (child_ops): ... to here. * wince.c (child_ops): Delete extern declaration. * win32-nat.c (child_ops): Delete extern declaration. * linux-nat.c (child_ops): Delete extern declaration. * hpux-thread.c (child_ops): Delete extern declaration. --- gdb/ChangeLog | 10 ++++++++++ gdb/hpux-thread.c | 1 - gdb/inftarg.c | 2 -- gdb/linux-nat.c | 5 ----- gdb/target.c | 6 ++++++ gdb/target.h | 2 ++ gdb/win32-nat.c | 3 --- gdb/wince.c | 3 --- gdb/windows-nat.c | 3 --- 9 files changed, 18 insertions(+), 17 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 78f496323b3..1e44065e47c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +2004-09-29 Andrew Cagney + + * target.h (child_ops): Declare. + * inftarg.c (child_ops): Move from here ... + * target.c (child_ops): ... to here. + * wince.c (child_ops): Delete extern declaration. + * win32-nat.c (child_ops): Delete extern declaration. + * linux-nat.c (child_ops): Delete extern declaration. + * hpux-thread.c (child_ops): Delete extern declaration. + 2004-09-28 Mark Kettenis * configure.tgt: Set default OS/ABI for OpenBSD ELF targets. diff --git a/gdb/hpux-thread.c b/gdb/hpux-thread.c index 5664314225c..ea776ee0983 100644 --- a/gdb/hpux-thread.c +++ b/gdb/hpux-thread.c @@ -45,7 +45,6 @@ #include "gdbcore.h" extern int child_suppress_run; -extern struct target_ops child_ops; /* target vector for inftarg.c */ extern void _initialize_hpux_thread (void); diff --git a/gdb/inftarg.c b/gdb/inftarg.c index 68efdac3077..b15b75bd067 100644 --- a/gdb/inftarg.c +++ b/gdb/inftarg.c @@ -89,8 +89,6 @@ static void init_child_ops (void); extern char **environ; -struct target_ops child_ops; - int child_suppress_run = 0; /* Non-zero if inftarg should pretend not to be a runnable target. Used by targets that can sit atop inftarg, such as HPUX diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 8ecabdace69..fa14bb63fe2 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -83,8 +83,6 @@ static int debug_linux_nat; -extern struct target_ops child_ops; - static int linux_parent_pid; struct simple_pid_list @@ -599,9 +597,6 @@ ptid_t trap_ptid; /* This module's target-specific operations. */ static struct target_ops linux_nat_ops; -/* The standard child operations. */ -extern struct target_ops child_ops; - /* Since we cannot wait (in linux_nat_wait) for the initial process and any cloned processes with a single call to waitpid, we have to use the WNOHANG flag and call waitpid in a loop. To optimize diff --git a/gdb/target.c b/gdb/target.c index 0e76e71ebc5..ab0f814746d 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -159,6 +159,12 @@ static int debug_to_thread_alive (ptid_t); static void debug_to_stop (void); +/* NOTE: cagney/2004-09-29: Many targets reference this variable in + wierd and mysterious ways. Putting the variable here lets those + wierd and mysterious ways keep building while they are being + converted to the inferior inheritance structure. */ +struct target_ops child_ops; + /* Pointer to array of target architecture structures; the size of the array; the current index into the array; the allocated size of the array. */ diff --git a/gdb/target.h b/gdb/target.h index 92beccaf343..4af479921a7 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -1237,4 +1237,6 @@ extern void push_remote_target (char *name, int from_tty); /* Blank target vector entries are initialized to target_ignore. */ void target_ignore (void); +extern struct target_ops child_ops; + #endif /* !defined (TARGET_H) */ diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c index 601f28bf129..22edb09a8ab 100644 --- a/gdb/win32-nat.c +++ b/gdb/win32-nat.c @@ -86,9 +86,6 @@ static int debug_registers_used; #define DEBUG_MEM(x) if (debug_memory) printf_unfiltered x #define DEBUG_EXCEPT(x) if (debug_exceptions) printf_unfiltered x -/* Forward declaration */ -extern struct target_ops child_ops; - static void child_stop (void); static int win32_child_thread_alive (ptid_t); void child_kill_inferior (void); diff --git a/gdb/wince.c b/gdb/wince.c index a9dafee1cb7..be912d68dc2 100644 --- a/gdb/wince.c +++ b/gdb/wince.c @@ -126,9 +126,6 @@ upload_options[3] = static char *remote_upload = NULL; /* Set by set remoteupload */ static int remote_add_host = 0; -/* Forward declaration */ -extern struct target_ops child_ops; - static int win32_child_thread_alive (ptid_t); void child_kill_inferior (void); diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 601f28bf129..22edb09a8ab 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -86,9 +86,6 @@ static int debug_registers_used; #define DEBUG_MEM(x) if (debug_memory) printf_unfiltered x #define DEBUG_EXCEPT(x) if (debug_exceptions) printf_unfiltered x -/* Forward declaration */ -extern struct target_ops child_ops; - static void child_stop (void); static int win32_child_thread_alive (ptid_t); void child_kill_inferior (void); -- 2.30.2