From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28022 invoked by alias); 29 Sep 2004 14:40:02 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 27999 invoked from network); 29 Sep 2004 14:40:01 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 29 Sep 2004 14:40:01 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i8TEdudt022438 for ; Wed, 29 Sep 2004 10:40:01 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i8TEdtr13809; Wed, 29 Sep 2004 10:39:55 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 9958C28D2; Wed, 29 Sep 2004 10:39:49 -0400 (EDT) Message-ID: <415AC935.9020700@gnu.org> Date: Wed, 29 Sep 2004 14:40:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040831 MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [patch/rfc] Deprecate child_ops global Content-Type: multipart/mixed; boundary="------------050409020704010201020900" X-SW-Source: 2004-09/txt/msg00474.txt.bz2 This is a multi-part message in MIME format. --------------050409020704010201020900 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 285 Hello, This deprecates the global(1) variable child_ops . Inferior inheritance, as implemented by the *BSDs, removes any need for this. I'll look to commit in a week, Andrew (1) While been global for years, this fact was carefully hidden by the use of "extern"s in C files, ugh! --------------050409020704010201020900 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 32147 2004-09-29 Andrew Cagney * target.h (deprecated_child_ops): Rename child_ops. * wince.c: Update copyright. Rename child_ops. * win32-nat.c: Rename child_ops. * target.c: Rename child_ops. * rs6000-nat.c: Rename child_ops. * linux-nat.c: Rename child_ops. * infttrace.c: Rename child_ops. * inftarg.c: Rename child_ops. * infptrace.c: Rename child_ops. * hppah-nat.c: Update copyright. Rename child_ops. * hpux-thread.c: Update copyright. Rename child_ops. Index: aix-thread.c =================================================================== RCS file: /cvs/src/src/gdb/aix-thread.c,v retrieving revision 1.35 diff -p -u -r1.35 aix-thread.c --- aix-thread.c 11 Sep 2004 10:24:44 -0000 1.35 +++ aix-thread.c 29 Sep 2004 14:30:18 -0000 @@ -105,8 +105,8 @@ struct pd_thread { static struct target_ops aix_thread_ops; -/* Copy of the target over which ops is pushed. - This is more convenient than a pointer to child_ops or core_ops, +/* Copy of the target over which ops is pushed. This is more + convenient than a pointer to deprecated_child_ops or core_ops, because they lack current_target's default callbacks. */ static struct target_ops base_target; Index: hppah-nat.c =================================================================== RCS file: /cvs/src/src/gdb/hppah-nat.c,v retrieving revision 1.33 diff -p -u -r1.33 hppah-nat.c --- hppah-nat.c 3 Aug 2004 00:57:25 -0000 1.33 +++ hppah-nat.c 29 Sep 2004 14:30:19 -0000 @@ -1,7 +1,7 @@ -/* Native support code for HPUX PA-RISC. - Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, - 1998, 1999, 2000, 2001 - Free Software Foundation, Inc. +/* Native support code for HPUX PA-RISC, for GDB the GNU debugger. + + Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995, + 1996, 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc. Contributed by the Center for Software Science at the University of Utah (pa-gdb-bugs@cs.utah.edu). @@ -289,10 +289,10 @@ fetch_register (int regno) to debugger memory starting at MYADDR. Copy to inferior if WRITE is nonzero. - Returns the length copied, which is either the LEN argument or zero. - This xfer function does not do partial moves, since child_ops - doesn't allow memory operations to cross below us in the target stack - anyway. TARGET is ignored. */ + Returns the length copied, which is either the LEN argument or + zero. This xfer function does not do partial moves, since + deprecated_child_ops doesn't allow memory operations to cross below + us in the target stack anyway. TARGET is ignored. */ int child_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write, Index: hpux-thread.c =================================================================== RCS file: /cvs/src/src/gdb/hpux-thread.c,v retrieving revision 1.26 diff -p -u -r1.26 hpux-thread.c --- hpux-thread.c 29 Sep 2004 13:54:32 -0000 1.26 +++ hpux-thread.c 29 Sep 2004 14:30:19 -0000 @@ -1,5 +1,8 @@ -/* Low level interface for debugging HPUX/DCE threads for GDB, the GNU debugger. - Copyright 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +/* Low level interface for debugging HPUX/DCE threads for GDB, the GNU + debugger. + + Copyright 1996, 1998, 1999, 2000, 2001, 2004 Free Software + Foundation, Inc. This file is part of GDB. @@ -133,7 +136,7 @@ find_tcb (ptid_t ptid) static void hpux_thread_open (char *arg, int from_tty) { - child_ops.to_open (arg, from_tty); + deprecated_child_ops.to_open (arg, from_tty); } /* Attach to process PID, then initialize for debugging it @@ -142,7 +145,7 @@ hpux_thread_open (char *arg, int from_tt static void hpux_thread_attach (char *args, int from_tty) { - child_ops.to_attach (args, from_tty); + deprecated_child_ops.to_attach (args, from_tty); /* XXX - might want to iterate over all the threads and register them. */ } @@ -158,7 +161,7 @@ hpux_thread_attach (char *args, int from static void hpux_thread_detach (char *args, int from_tty) { - child_ops.to_detach (args, from_tty); + deprecated_child_ops.to_detach (args, from_tty); } /* Resume execution of process PID. If STEP is nozero, then @@ -185,7 +188,7 @@ hpux_thread_resume (ptid_t ptid, int ste } #endif - child_ops.to_resume (ptid, step, signo); + deprecated_child_ops.to_resume (ptid, step, signo); cached_thread = 0; @@ -208,7 +211,7 @@ hpux_thread_wait (ptid_t ptid, struct ta if (!ptid_equal (ptid, minus_one_ptid)) ptid = main_ptid; - rtnval = child_ops.to_wait (ptid, ourstatus); + rtnval = deprecated_child_ops.to_wait (ptid, ourstatus); rtnval = find_active_thread (); @@ -259,7 +262,7 @@ hpux_thread_fetch_registers (int regno) if (tcb_ptr->state == cma__c_state_running) { - child_ops.to_fetch_registers (regno); + deprecated_child_ops.to_fetch_registers (regno); do_cleanups (old_chain); @@ -280,7 +283,7 @@ hpux_thread_fetch_registers (int regno) for (regno = first_regno; regno <= last_regno; regno++) { if (regmap[regno] == -1) - child_ops.to_fetch_registers (regno); + deprecated_child_ops.to_fetch_registers (regno); else { unsigned char buf[MAX_REGISTER_SIZE]; @@ -321,7 +324,7 @@ hpux_thread_store_registers (int regno) if (tcb_ptr->state == cma__c_state_running) { - child_ops.to_store_registers (regno); + deprecated_child_ops.to_store_registers (regno); do_cleanups (old_chain); @@ -342,7 +345,7 @@ hpux_thread_store_registers (int regno) for (regno = first_regno; regno <= last_regno; regno++) { if (regmap[regno] == -1) - child_ops.to_store_registers (regno); + deprecated_child_ops.to_store_registers (regno); else { unsigned char buf[MAX_REGISTER_SIZE]; @@ -351,7 +354,7 @@ hpux_thread_store_registers (int regno) sp = (CORE_ADDR) tcb_ptr->static_ctx.sp - 160; if (regno == FLAGS_REGNUM) - child_ops.to_store_registers (regno); /* Let lower layer handle this... */ + deprecated_child_ops.to_store_registers (regno); /* Let lower layer handle this... */ else if (regno == SP_REGNUM) { write_memory ((CORE_ADDR) & tcb_ptr->static_ctx.sp, @@ -384,7 +387,7 @@ hpux_thread_store_registers (int regno) static void hpux_thread_prepare_to_store (void) { - child_ops.to_prepare_to_store (); + deprecated_child_ops.to_prepare_to_store (); } static int @@ -400,7 +403,7 @@ hpux_thread_xfer_memory (CORE_ADDR memad inferior_ptid = main_ptid; retval = - child_ops.to_xfer_memory (memaddr, myaddr, len, dowrite, attribs, target); + deprecated_child_ops.to_xfer_memory (memaddr, myaddr, len, dowrite, attribs, target); do_cleanups (old_chain); @@ -412,19 +415,19 @@ hpux_thread_xfer_memory (CORE_ADDR memad static void hpux_thread_files_info (struct target_ops *ignore) { - child_ops.to_files_info (ignore); + deprecated_child_ops.to_files_info (ignore); } static void hpux_thread_kill_inferior (void) { - child_ops.to_kill (); + deprecated_child_ops.to_kill (); } static void hpux_thread_notice_signals (ptid_t ptid) { - child_ops.to_notice_signals (ptid); + deprecated_child_ops.to_notice_signals (ptid); } /* Fork an inferior process, and start debugging it with /proc. */ @@ -433,7 +436,7 @@ static void hpux_thread_create_inferior (char *exec_file, char *allargs, char **env, int from_tty) { - child_ops.to_create_inferior (exec_file, allargs, env, from_tty); + deprecated_child_ops.to_create_inferior (exec_file, allargs, env, from_tty); if (hpux_thread_active) { @@ -497,7 +500,7 @@ quit: static void hpux_thread_mourn_inferior (void) { - child_ops.to_mourn_inferior (); + deprecated_child_ops.to_mourn_inferior (); } /* Mark our target-struct as eligible for stray "run" and "attach" commands. */ @@ -517,7 +520,7 @@ hpux_thread_alive (ptid_t ptid) static void hpux_thread_stop (void) { - child_ops.to_stop (); + deprecated_child_ops.to_stop (); } /* Convert a pid to printable form. */ Index: infptrace.c =================================================================== RCS file: /cvs/src/src/gdb/infptrace.c,v retrieving revision 1.45 diff -p -u -r1.45 infptrace.c --- infptrace.c 20 Sep 2004 16:39:33 -0000 1.45 +++ infptrace.c 29 Sep 2004 14:30:19 -0000 @@ -400,8 +400,8 @@ store_inferior_registers (int regnum) Returns the length copied, which is either the LEN argument or zero. This xfer function does not do partial moves, since - child_ops doesn't allow memory operations to cross below us in the - target stack anyway. */ + deprecated_child_ops doesn't allow memory operations to cross below + us in the target stack anyway. */ int child_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write, Index: inftarg.c =================================================================== RCS file: /cvs/src/src/gdb/inftarg.c,v retrieving revision 1.29 diff -p -u -r1.29 inftarg.c --- inftarg.c 29 Sep 2004 14:20:25 -0000 1.29 +++ inftarg.c 29 Sep 2004 14:30:20 -0000 @@ -225,7 +225,7 @@ child_attach (char *args, int from_tty) attach (pid); inferior_ptid = pid_to_ptid (pid); - push_target (&child_ops); + push_target (&deprecated_child_ops); } #if !defined(CHILD_POST_ATTACH) @@ -266,7 +266,7 @@ child_detach (char *args, int from_tty) detach (siggnal); inferior_ptid = null_ptid; - unpush_target (&child_ops); + unpush_target (&deprecated_child_ops); } /* Get ready to modify the registers array. On machines which store @@ -314,7 +314,7 @@ ptrace_me (void) static void ptrace_him (int pid) { - push_target (&child_ops); + push_target (&deprecated_child_ops); /* On some targets, there must be some explicit synchronization between the parent and child processes after the debugger @@ -477,7 +477,7 @@ child_has_exited (int pid, int wait_stat static void child_mourn_inferior (void) { - unpush_target (&child_ops); + unpush_target (&deprecated_child_ops); generic_mourn_inferior (); } @@ -596,58 +596,58 @@ child_pid_to_str (ptid_t ptid) static void init_child_ops (void) { - child_ops.to_shortname = "child"; - child_ops.to_longname = "Unix child process"; - child_ops.to_doc = "Unix child process (started by the \"run\" command)."; - child_ops.to_open = child_open; - child_ops.to_attach = child_attach; - child_ops.to_post_attach = child_post_attach; - child_ops.to_detach = child_detach; - child_ops.to_resume = child_resume; - child_ops.to_wait = child_wait; - child_ops.to_post_wait = child_post_wait; - child_ops.to_fetch_registers = fetch_inferior_registers; - child_ops.to_store_registers = store_inferior_registers; - child_ops.to_prepare_to_store = child_prepare_to_store; - child_ops.to_xfer_memory = child_xfer_memory; - child_ops.to_xfer_partial = child_xfer_partial; - child_ops.to_files_info = child_files_info; - child_ops.to_insert_breakpoint = memory_insert_breakpoint; - child_ops.to_remove_breakpoint = memory_remove_breakpoint; - child_ops.to_terminal_init = terminal_init_inferior; - child_ops.to_terminal_inferior = terminal_inferior; - child_ops.to_terminal_ours_for_output = terminal_ours_for_output; - child_ops.to_terminal_save_ours = terminal_save_ours; - child_ops.to_terminal_ours = terminal_ours; - child_ops.to_terminal_info = child_terminal_info; - child_ops.to_kill = kill_inferior; - child_ops.to_create_inferior = child_create_inferior; - child_ops.to_post_startup_inferior = child_post_startup_inferior; - child_ops.to_acknowledge_created_inferior = child_acknowledge_created_inferior; - child_ops.to_insert_fork_catchpoint = child_insert_fork_catchpoint; - child_ops.to_remove_fork_catchpoint = child_remove_fork_catchpoint; - child_ops.to_insert_vfork_catchpoint = child_insert_vfork_catchpoint; - child_ops.to_remove_vfork_catchpoint = child_remove_vfork_catchpoint; - child_ops.to_follow_fork = child_follow_fork; - child_ops.to_insert_exec_catchpoint = child_insert_exec_catchpoint; - child_ops.to_remove_exec_catchpoint = child_remove_exec_catchpoint; - child_ops.to_reported_exec_events_per_exec_call = child_reported_exec_events_per_exec_call; - child_ops.to_has_exited = child_has_exited; - child_ops.to_mourn_inferior = child_mourn_inferior; - child_ops.to_can_run = child_can_run; - child_ops.to_thread_alive = child_thread_alive; - child_ops.to_pid_to_str = child_pid_to_str; - child_ops.to_stop = child_stop; - child_ops.to_enable_exception_callback = child_enable_exception_callback; - child_ops.to_get_current_exception_event = child_get_current_exception_event; - child_ops.to_pid_to_exec_file = child_pid_to_exec_file; - child_ops.to_stratum = process_stratum; - child_ops.to_has_all_memory = 1; - child_ops.to_has_memory = 1; - child_ops.to_has_stack = 1; - child_ops.to_has_registers = 1; - child_ops.to_has_execution = 1; - child_ops.to_magic = OPS_MAGIC; + deprecated_child_ops.to_shortname = "child"; + deprecated_child_ops.to_longname = "Unix child process"; + deprecated_child_ops.to_doc = "Unix child process (started by the \"run\" command)."; + deprecated_child_ops.to_open = child_open; + deprecated_child_ops.to_attach = child_attach; + deprecated_child_ops.to_post_attach = child_post_attach; + deprecated_child_ops.to_detach = child_detach; + deprecated_child_ops.to_resume = child_resume; + deprecated_child_ops.to_wait = child_wait; + deprecated_child_ops.to_post_wait = child_post_wait; + deprecated_child_ops.to_fetch_registers = fetch_inferior_registers; + deprecated_child_ops.to_store_registers = store_inferior_registers; + deprecated_child_ops.to_prepare_to_store = child_prepare_to_store; + deprecated_child_ops.to_xfer_memory = child_xfer_memory; + deprecated_child_ops.to_xfer_partial = child_xfer_partial; + deprecated_child_ops.to_files_info = child_files_info; + deprecated_child_ops.to_insert_breakpoint = memory_insert_breakpoint; + deprecated_child_ops.to_remove_breakpoint = memory_remove_breakpoint; + deprecated_child_ops.to_terminal_init = terminal_init_inferior; + deprecated_child_ops.to_terminal_inferior = terminal_inferior; + deprecated_child_ops.to_terminal_ours_for_output = terminal_ours_for_output; + deprecated_child_ops.to_terminal_save_ours = terminal_save_ours; + deprecated_child_ops.to_terminal_ours = terminal_ours; + deprecated_child_ops.to_terminal_info = child_terminal_info; + deprecated_child_ops.to_kill = kill_inferior; + deprecated_child_ops.to_create_inferior = child_create_inferior; + deprecated_child_ops.to_post_startup_inferior = child_post_startup_inferior; + deprecated_child_ops.to_acknowledge_created_inferior = child_acknowledge_created_inferior; + deprecated_child_ops.to_insert_fork_catchpoint = child_insert_fork_catchpoint; + deprecated_child_ops.to_remove_fork_catchpoint = child_remove_fork_catchpoint; + deprecated_child_ops.to_insert_vfork_catchpoint = child_insert_vfork_catchpoint; + deprecated_child_ops.to_remove_vfork_catchpoint = child_remove_vfork_catchpoint; + deprecated_child_ops.to_follow_fork = child_follow_fork; + deprecated_child_ops.to_insert_exec_catchpoint = child_insert_exec_catchpoint; + deprecated_child_ops.to_remove_exec_catchpoint = child_remove_exec_catchpoint; + deprecated_child_ops.to_reported_exec_events_per_exec_call = child_reported_exec_events_per_exec_call; + deprecated_child_ops.to_has_exited = child_has_exited; + deprecated_child_ops.to_mourn_inferior = child_mourn_inferior; + deprecated_child_ops.to_can_run = child_can_run; + deprecated_child_ops.to_thread_alive = child_thread_alive; + deprecated_child_ops.to_pid_to_str = child_pid_to_str; + deprecated_child_ops.to_stop = child_stop; + deprecated_child_ops.to_enable_exception_callback = child_enable_exception_callback; + deprecated_child_ops.to_get_current_exception_event = child_get_current_exception_event; + deprecated_child_ops.to_pid_to_exec_file = child_pid_to_exec_file; + deprecated_child_ops.to_stratum = process_stratum; + deprecated_child_ops.to_has_all_memory = 1; + deprecated_child_ops.to_has_memory = 1; + deprecated_child_ops.to_has_stack = 1; + deprecated_child_ops.to_has_registers = 1; + deprecated_child_ops.to_has_execution = 1; + deprecated_child_ops.to_magic = OPS_MAGIC; } void @@ -672,5 +672,5 @@ _initialize_inftarg (void) #endif init_child_ops (); - add_target (&child_ops); + add_target (&deprecated_child_ops); } Index: infttrace.c =================================================================== RCS file: /cvs/src/src/gdb/infttrace.c,v retrieving revision 1.35 diff -p -u -r1.35 infttrace.c --- infttrace.c 20 Sep 2004 16:39:33 -0000 1.35 +++ infttrace.c 29 Sep 2004 14:30:21 -0000 @@ -4818,10 +4818,10 @@ _initialize_kernel_u_addr (void) to debugger memory starting at MYADDR. Copy to inferior if WRITE is nonzero. TARGET is ignored. - Returns the length copied, which is either the LEN argument or zero. - This xfer function does not do partial moves, since child_ops - doesn't allow memory operations to cross below us in the target stack - anyway. */ + Returns the length copied, which is either the LEN argument or + zero. This xfer function does not do partial moves, since + deprecated_child_ops doesn't allow memory operations to cross below + us in the target stack anyway. */ int child_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write, Index: linux-nat.c =================================================================== RCS file: /cvs/src/src/gdb/linux-nat.c,v retrieving revision 1.11 diff -p -u -r1.11 linux-nat.c --- linux-nat.c 29 Sep 2004 14:20:25 -0000 1.11 +++ linux-nat.c 29 Sep 2004 14:30:22 -0000 @@ -398,7 +398,7 @@ child_follow_fork (int follow_child) target_detach (NULL, 0); inferior_ptid = pid_to_ptid (child_pid); - push_target (&child_ops); + push_target (&deprecated_child_ops); /* Reset breakpoints in the child as appropriate. */ follow_inferior_reset_breakpoints (); @@ -850,7 +850,7 @@ linux_nat_attach (char *args, int from_t /* FIXME: We should probably accept a list of process id's, and attach all of them. */ - child_ops.to_attach (args, from_tty); + deprecated_child_ops.to_attach (args, from_tty); /* Add the initial process as the first LWP to the list. */ lp = add_lwp (BUILD_LWP (GET_PID (inferior_ptid), GET_PID (inferior_ptid))); @@ -960,7 +960,7 @@ linux_nat_detach (char *args, int from_t sigemptyset (&blocked_mask); inferior_ptid = pid_to_ptid (GET_PID (inferior_ptid)); - child_ops.to_detach (args, from_tty); + deprecated_child_ops.to_detach (args, from_tty); } /* Resume LP. */ @@ -2247,7 +2247,7 @@ static void linux_nat_create_inferior (char *exec_file, char *allargs, char **env, int from_tty) { - child_ops.to_create_inferior (exec_file, allargs, env, from_tty); + deprecated_child_ops.to_create_inferior (exec_file, allargs, env, from_tty); } static void @@ -2262,7 +2262,7 @@ linux_nat_mourn_inferior (void) sigprocmask (SIG_SETMASK, &normal_mask, NULL); sigemptyset (&blocked_mask); - child_ops.to_mourn_inferior (); + deprecated_child_ops.to_mourn_inferior (); } static int Index: rs6000-nat.c =================================================================== RCS file: /cvs/src/src/gdb/rs6000-nat.c,v retrieving revision 1.53 diff -p -u -r1.53 rs6000-nat.c --- rs6000-nat.c 11 Sep 2004 10:24:50 -0000 1.53 +++ rs6000-nat.c 29 Sep 2004 14:30:22 -0000 @@ -442,10 +442,10 @@ read_word (CORE_ADDR from, int *to, int to debugger memory starting at MYADDR. Copy to inferior if WRITE is nonzero. - Returns the length copied, which is either the LEN argument or zero. - This xfer function does not do partial moves, since child_ops - doesn't allow memory operations to cross below us in the target stack - anyway. */ + Returns the length copied, which is either the LEN argument or + zero. This xfer function does not do partial moves, since + deprecated_child_ops doesn't allow memory operations to cross below + us in the target stack anyway. */ int child_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, Index: target.c =================================================================== RCS file: /cvs/src/src/gdb/target.c,v retrieving revision 1.81 diff -p -u -r1.81 target.c --- target.c 29 Sep 2004 13:54:32 -0000 1.81 +++ target.c 29 Sep 2004 14:30:22 -0000 @@ -163,7 +163,7 @@ static void debug_to_stop (void); 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; +struct target_ops deprecated_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 Index: target.h =================================================================== RCS file: /cvs/src/src/gdb/target.h,v retrieving revision 1.61 diff -p -u -r1.61 target.h --- target.h 29 Sep 2004 13:54:33 -0000 1.61 +++ target.h 29 Sep 2004 14:30:23 -0000 @@ -1237,6 +1237,6 @@ extern void push_remote_target (char *na /* Blank target vector entries are initialized to target_ignore. */ void target_ignore (void); -extern struct target_ops child_ops; +extern struct target_ops deprecated_child_ops; #endif /* !defined (TARGET_H) */ Index: win32-nat.c =================================================================== RCS file: /cvs/src/src/gdb/win32-nat.c,v retrieving revision 1.99 diff -p -u -r1.99 win32-nat.c --- win32-nat.c 29 Sep 2004 14:26:52 -0000 1.99 +++ win32-nat.c 29 Sep 2004 14:30:24 -0000 @@ -1439,7 +1439,7 @@ do_initial_child_stuff (DWORD pid) dr[i] = 0; current_event.dwProcessId = pid; memset (¤t_event, 0, sizeof (current_event)); - push_target (&child_ops); + push_target (&deprecated_child_ops); child_init_thread_list (); disable_breakpoints_in_shlibs (1); child_clear_solibs (); @@ -1651,7 +1651,7 @@ child_detach (char *args, int from_tty) gdb_flush (gdb_stdout); } inferior_ptid = null_ptid; - unpush_target (&child_ops); + unpush_target (&deprecated_child_ops); } char * @@ -1901,7 +1901,7 @@ child_mourn_inferior (void) { (void) child_continue (DBG_CONTINUE, -1); i386_cleanup_dregs(); - unpush_target (&child_ops); + unpush_target (&deprecated_child_ops); generic_mourn_inferior (); } @@ -2068,43 +2068,43 @@ child_close (int x) static void init_child_ops (void) { - child_ops.to_shortname = "child"; - child_ops.to_longname = "Win32 child process"; - child_ops.to_doc = "Win32 child process (started by the \"run\" command)."; - child_ops.to_open = child_open; - child_ops.to_close = child_close; - child_ops.to_attach = child_attach; - child_ops.to_detach = child_detach; - child_ops.to_resume = child_resume; - child_ops.to_wait = child_wait; - child_ops.to_fetch_registers = child_fetch_inferior_registers; - child_ops.to_store_registers = child_store_inferior_registers; - child_ops.to_prepare_to_store = child_prepare_to_store; - child_ops.to_xfer_memory = child_xfer_memory; - child_ops.to_files_info = child_files_info; - child_ops.to_insert_breakpoint = memory_insert_breakpoint; - child_ops.to_remove_breakpoint = memory_remove_breakpoint; - child_ops.to_terminal_init = terminal_init_inferior; - child_ops.to_terminal_inferior = terminal_inferior; - child_ops.to_terminal_ours_for_output = terminal_ours_for_output; - child_ops.to_terminal_ours = terminal_ours; - child_ops.to_terminal_save_ours = terminal_save_ours; - child_ops.to_terminal_info = child_terminal_info; - child_ops.to_kill = child_kill_inferior; - child_ops.to_create_inferior = child_create_inferior; - child_ops.to_mourn_inferior = child_mourn_inferior; - child_ops.to_can_run = child_can_run; - child_ops.to_thread_alive = win32_child_thread_alive; - child_ops.to_pid_to_str = cygwin_pid_to_str; - child_ops.to_stop = child_stop; - child_ops.to_stratum = process_stratum; - child_ops.to_has_all_memory = 1; - child_ops.to_has_memory = 1; - child_ops.to_has_stack = 1; - child_ops.to_has_registers = 1; - child_ops.to_has_execution = 1; - child_ops.to_magic = OPS_MAGIC; - child_ops.to_pid_to_exec_file = child_pid_to_exec_file; + deprecated_child_ops.to_shortname = "child"; + deprecated_child_ops.to_longname = "Win32 child process"; + deprecated_child_ops.to_doc = "Win32 child process (started by the \"run\" command)."; + deprecated_child_ops.to_open = child_open; + deprecated_child_ops.to_close = child_close; + deprecated_child_ops.to_attach = child_attach; + deprecated_child_ops.to_detach = child_detach; + deprecated_child_ops.to_resume = child_resume; + deprecated_child_ops.to_wait = child_wait; + deprecated_child_ops.to_fetch_registers = child_fetch_inferior_registers; + deprecated_child_ops.to_store_registers = child_store_inferior_registers; + deprecated_child_ops.to_prepare_to_store = child_prepare_to_store; + deprecated_child_ops.to_xfer_memory = child_xfer_memory; + deprecated_child_ops.to_files_info = child_files_info; + deprecated_child_ops.to_insert_breakpoint = memory_insert_breakpoint; + deprecated_child_ops.to_remove_breakpoint = memory_remove_breakpoint; + deprecated_child_ops.to_terminal_init = terminal_init_inferior; + deprecated_child_ops.to_terminal_inferior = terminal_inferior; + deprecated_child_ops.to_terminal_ours_for_output = terminal_ours_for_output; + deprecated_child_ops.to_terminal_ours = terminal_ours; + deprecated_child_ops.to_terminal_save_ours = terminal_save_ours; + deprecated_child_ops.to_terminal_info = child_terminal_info; + deprecated_child_ops.to_kill = child_kill_inferior; + deprecated_child_ops.to_create_inferior = child_create_inferior; + deprecated_child_ops.to_mourn_inferior = child_mourn_inferior; + deprecated_child_ops.to_can_run = child_can_run; + deprecated_child_ops.to_thread_alive = win32_child_thread_alive; + deprecated_child_ops.to_pid_to_str = cygwin_pid_to_str; + deprecated_child_ops.to_stop = child_stop; + deprecated_child_ops.to_stratum = process_stratum; + deprecated_child_ops.to_has_all_memory = 1; + deprecated_child_ops.to_has_memory = 1; + deprecated_child_ops.to_has_stack = 1; + deprecated_child_ops.to_has_registers = 1; + deprecated_child_ops.to_has_execution = 1; + deprecated_child_ops.to_magic = OPS_MAGIC; + deprecated_child_ops.to_pid_to_exec_file = child_pid_to_exec_file; } void @@ -2180,7 +2180,7 @@ _initialize_win32_nat (void) "Display selectors infos.", &info_w32_cmdlist); - add_target (&child_ops); + add_target (&deprecated_child_ops); } /* Hardware watchpoint support, adapted from go32-nat.c code. */ Index: wince.c =================================================================== RCS file: /cvs/src/src/gdb/wince.c,v retrieving revision 1.34 diff -p -u -r1.34 wince.c --- wince.c 29 Sep 2004 14:26:52 -0000 1.34 +++ wince.c 29 Sep 2004 14:30:24 -0000 @@ -1,5 +1,6 @@ /* Target-vector operations for controlling Windows CE child processes, for GDB. - Copyright 1999, 2000, 2001 Free Software Foundation, Inc. + + Copyright 1999, 2000, 2001, 2004 Free Software Foundation, Inc. Contributed by Cygnus Solutions, A Red Hat Company. This file is part of GDB. @@ -1762,7 +1763,7 @@ child_create_inferior (char *exec_file, memset (¤t_event, 0, sizeof (current_event)); current_event.dwThreadId = pi.dwThreadId; inferior_ptid = pid_to_ptid (current_event.dwThreadId); - push_target (&child_ops); + push_target (&deprecated_child_ops); child_init_thread_list (); child_add_thread (pi.dwThreadId, pi.hThread); init_wait_for_inferior (); @@ -1783,7 +1784,7 @@ static void child_mourn_inferior (void) { (void) child_continue (DBG_CONTINUE, -1); - unpush_target (&child_ops); + unpush_target (&deprecated_child_ops); stop_stub (); CeRapiUninit (); connection_initialized = 0; @@ -1888,40 +1889,40 @@ child_load (char *file, int from_tty) static void init_child_ops (void) { - memset (&child_ops, 0, sizeof (child_ops)); - child_ops.to_shortname = (char *) "child"; - child_ops.to_longname = (char *) "Windows CE process"; - child_ops.to_doc = (char *) "Windows CE process (started by the \"run\" command)."; - child_ops.to_open = child_open; - child_ops.to_close = child_close; - child_ops.to_resume = child_resume; - child_ops.to_wait = child_wait; - child_ops.to_fetch_registers = child_fetch_inferior_registers; - child_ops.to_store_registers = child_store_inferior_registers; - child_ops.to_prepare_to_store = child_prepare_to_store; - child_ops.to_xfer_memory = child_xfer_memory; - child_ops.to_files_info = child_files_info; - child_ops.to_insert_breakpoint = memory_insert_breakpoint; - child_ops.to_remove_breakpoint = memory_remove_breakpoint; - child_ops.to_terminal_init = terminal_init_inferior; - child_ops.to_terminal_inferior = terminal_inferior; - child_ops.to_terminal_ours_for_output = terminal_ours_for_output; - child_ops.to_terminal_ours = terminal_ours; - child_ops.to_terminal_save_ours = terminal_save_ours; - child_ops.to_terminal_info = child_terminal_info; - child_ops.to_kill = child_kill_inferior; - child_ops.to_load = child_load; - child_ops.to_create_inferior = child_create_inferior; - child_ops.to_mourn_inferior = child_mourn_inferior; - child_ops.to_can_run = child_can_run; - child_ops.to_thread_alive = win32_child_thread_alive; - child_ops.to_stratum = process_stratum; - child_ops.to_has_all_memory = 1; - child_ops.to_has_memory = 1; - child_ops.to_has_stack = 1; - child_ops.to_has_registers = 1; - child_ops.to_has_execution = 1; - child_ops.to_magic = OPS_MAGIC; + memset (&deprecated_child_ops, 0, sizeof (deprecated_child_ops)); + deprecated_child_ops.to_shortname = (char *) "child"; + deprecated_child_ops.to_longname = (char *) "Windows CE process"; + deprecated_child_ops.to_doc = (char *) "Windows CE process (started by the \"run\" command)."; + deprecated_child_ops.to_open = child_open; + deprecated_child_ops.to_close = child_close; + deprecated_child_ops.to_resume = child_resume; + deprecated_child_ops.to_wait = child_wait; + deprecated_child_ops.to_fetch_registers = child_fetch_inferior_registers; + deprecated_child_ops.to_store_registers = child_store_inferior_registers; + deprecated_child_ops.to_prepare_to_store = child_prepare_to_store; + deprecated_child_ops.to_xfer_memory = child_xfer_memory; + deprecated_child_ops.to_files_info = child_files_info; + deprecated_child_ops.to_insert_breakpoint = memory_insert_breakpoint; + deprecated_child_ops.to_remove_breakpoint = memory_remove_breakpoint; + deprecated_child_ops.to_terminal_init = terminal_init_inferior; + deprecated_child_ops.to_terminal_inferior = terminal_inferior; + deprecated_child_ops.to_terminal_ours_for_output = terminal_ours_for_output; + deprecated_child_ops.to_terminal_ours = terminal_ours; + deprecated_child_ops.to_terminal_save_ours = terminal_save_ours; + deprecated_child_ops.to_terminal_info = child_terminal_info; + deprecated_child_ops.to_kill = child_kill_inferior; + deprecated_child_ops.to_load = child_load; + deprecated_child_ops.to_create_inferior = child_create_inferior; + deprecated_child_ops.to_mourn_inferior = child_mourn_inferior; + deprecated_child_ops.to_can_run = child_can_run; + deprecated_child_ops.to_thread_alive = win32_child_thread_alive; + deprecated_child_ops.to_stratum = process_stratum; + deprecated_child_ops.to_has_all_memory = 1; + deprecated_child_ops.to_has_memory = 1; + deprecated_child_ops.to_has_stack = 1; + deprecated_child_ops.to_has_registers = 1; + deprecated_child_ops.to_has_execution = 1; + deprecated_child_ops.to_magic = OPS_MAGIC; } @@ -2018,7 +2019,7 @@ debugging over a network.", &setlist), &setlist), &showlist); - add_target (&child_ops); + add_target (&deprecated_child_ops); } /* Determine if the thread referenced by "pid" is alive --------------050409020704010201020900--