OSDN Git Service

2004-09-29 Andrew Cagney <cagney@gnu.org>
authorcagney <cagney>
Wed, 29 Sep 2004 13:54:32 +0000 (13:54 +0000)
committercagney <cagney>
Wed, 29 Sep 2004 13:54:32 +0000 (13:54 +0000)
* 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/hpux-thread.c
gdb/inftarg.c
gdb/linux-nat.c
gdb/target.c
gdb/target.h
gdb/win32-nat.c
gdb/wince.c

index 5664314..ea776ee 100644 (file)
@@ -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);
 
index 68efdac..b15b75b 100644 (file)
@@ -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
index 8ecabda..fa14bb6 100644 (file)
@@ -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
index 0e76e71..ab0f814 100644 (file)
@@ -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.  */
index 92becca..4af4799 100644 (file)
@@ -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) */
index 601f28b..22edb09 100644 (file)
@@ -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);
index a9dafee..be912d6 100644 (file)
@@ -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);