From: Andrew Cagney Date: Tue, 5 Oct 2004 21:53:33 +0000 (+0000) Subject: 2004-10-05 Andrew Cagney X-Git-Tag: gdb_6_3-20041019-branchpoint~165 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1df84f135c3658e1b6d147fdf37254e21cc69d36;p=external%2Fbinutils.git 2004-10-05 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 702dbe7..818ca81 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,17 @@ +2004-10-05 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. + 2004-10-05 Daniel Jacobowitz * remote.c (remote_xfer_partial): Handle TARGET_OBJECT_MEMORY. diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c index 11a4471..c345b4c 100644 --- a/gdb/aix-thread.c +++ b/gdb/aix-thread.c @@ -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; diff --git a/gdb/hppah-nat.c b/gdb/hppah-nat.c index 60e2889..3979ece 100644 --- a/gdb/hppah-nat.c +++ b/gdb/hppah-nat.c @@ -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, diff --git a/gdb/hpux-thread.c b/gdb/hpux-thread.c index ea776ee..93259b9 100644 --- a/gdb/hpux-thread.c +++ b/gdb/hpux-thread.c @@ -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_tty) 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_tty) 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 step, enum target_signal signo) } #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 target_waitstatus *ourstatus) 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 memaddr, char *myaddr, int len, 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 memaddr, char *myaddr, int len, 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. */ diff --git a/gdb/infptrace.c b/gdb/infptrace.c index 315e9b9..ec4ad16 100644 --- a/gdb/infptrace.c +++ b/gdb/infptrace.c @@ -403,8 +403,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, diff --git a/gdb/inftarg.c b/gdb/inftarg.c index df3c5fe..2740593 100644 --- a/gdb/inftarg.c +++ b/gdb/inftarg.c @@ -210,7 +210,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) @@ -251,7 +251,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 @@ -299,7 +299,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 @@ -462,7 +462,7 @@ child_has_exited (int pid, int wait_status, int *exit_status) static void child_mourn_inferior (void) { - unpush_target (&child_ops); + unpush_target (&deprecated_child_ops); generic_mourn_inferior (); } @@ -581,57 +581,57 @@ 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_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_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 @@ -656,5 +656,5 @@ _initialize_inftarg (void) #endif init_child_ops (); - add_target (&child_ops); + add_target (&deprecated_child_ops); } diff --git a/gdb/infttrace.c b/gdb/infttrace.c index 96664d1..4171651 100644 --- a/gdb/infttrace.c +++ b/gdb/infttrace.c @@ -4815,10 +4815,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, diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 8ceb1e7..1d17d05 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -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_tty) /* 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_tty) 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 diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c index 59067c6..df36076 100644 --- a/gdb/rs6000-nat.c +++ b/gdb/rs6000-nat.c @@ -442,10 +442,10 @@ read_word (CORE_ADDR from, int *to, int arch64) 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, diff --git a/gdb/target.c b/gdb/target.c index 48bf8fb..7176dbe 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -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 diff --git a/gdb/target.h b/gdb/target.h index ab523c9..428e8b3 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -1221,6 +1221,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; +extern struct target_ops deprecated_child_ops; #endif /* !defined (TARGET_H) */ diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c index 2110764..d5cfe8e 100644 --- a/gdb/win32-nat.c +++ b/gdb/win32-nat.c @@ -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. */ diff --git a/gdb/wince.c b/gdb/wince.c index 5abb0c2..d189755 100644 --- a/gdb/wince.c +++ b/gdb/wince.c @@ -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, char *args, char **env, 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 diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 2110764..d5cfe8e 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -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. */