* PATCH: Remove unnecessary zero-initializations
@ 2002-11-10 16:18 Daniel Jacobowitz
2002-11-10 20:09 ` Andrew Cagney
2002-11-11 2:48 ` Felix Lee
0 siblings, 2 replies; 16+ messages in thread
From: Daniel Jacobowitz @ 2002-11-10 16:18 UTC (permalink / raw)
To: gdb-patches
Currently, thirteen files which provide a target_ops explicitly initialize
members they don't support to NULL. I plan to delete a number of these
methods, and rather than making sure I got all the necessary target files
each time I just wanted to delete the unnecessary lines up-front. All of
these are called-once functions initializing a statically or globally
declared object; C will guarantee zero-initialization for us. And several
of the functions explicitly called memset anyway.
Besides, this way grepping for .to_require_attach\ = will only find targets
which define it to something useful.
I'll commit this tomorrow unless someone sees a problem with it.
Note1: remote-st.c hasn't been compilable in a while; m68*-tandem-* is
probably a good candidate for the hitlist. From a glance it looks like it
has been broken since the HP merge added the NULL assignments I'm removing,
which is about three years now I think.
Note2: The DONT_USE member of struct target_ops can go now.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2002-11-11 Daniel Jacobowitz <drow@mvista.com>
* gnu-nat.c (init_gnu_ops): Remove NULL initializations.
* monitor.c (init_base_monitor_ops): Likewise.
* ppc-bdm.c (init_bdm_ppc_ops): Likewise.
* remote-array.c (init_array_ops): Likewise.
* remote-e7000.c (init_e7000_ops): Likewise.
* remote-es.c (init_es1800_ops): Likewise.
(init_es1800_child_ops): Likewise.
* remote-rdp.c (init_remote_rdp_ops): Likewise.
* remote-sim.c (init_gdbsim_ops): Likewise.
* remote-st.c (init_st2000_ops): Likewise.
* sol-thread.c (init_sol_core_ops): Likewise.
(init_sol_thread_ops): Likewise.
* v850ice.c (init_850ice_ops): Likewise.
* win32-nat.c (init_child_ops): Likewise.
* wince.c (init_child_ops): Likewise.
Index: gnu-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/gnu-nat.c,v
retrieving revision 1.24
diff -u -p -r1.24 gnu-nat.c
--- gnu-nat.c 29 Sep 2002 15:25:30 -0000 1.24
+++ gnu-nat.c 9 Nov 2002 00:53:24 -0000
@@ -2592,21 +2592,15 @@ init_gnu_ops (void)
gnu_ops.to_longname = "GNU Hurd process"; /* to_longname */
gnu_ops.to_doc = "GNU Hurd process"; /* to_doc */
gnu_ops.to_open = gnu_open; /* to_open */
- gnu_ops.to_close = 0; /* to_close */
gnu_ops.to_attach = gnu_attach; /* to_attach */
- gnu_ops.to_post_attach = NULL;
- gnu_ops.to_require_attach = NULL; /* to_require_attach */
gnu_ops.to_detach = gnu_detach; /* to_detach */
- gnu_ops.to_require_detach = NULL; /* to_require_detach */
gnu_ops.to_resume = gnu_resume; /* to_resume */
gnu_ops.to_wait = gnu_wait; /* to_wait */
- gnu_ops.to_post_wait = NULL; /* to_post_wait */
gnu_ops.to_fetch_registers = gnu_fetch_registers; /* to_fetch_registers */
gnu_ops.to_store_registers = gnu_store_registers; /* to_store_registers */
gnu_ops.to_prepare_to_store = gnu_prepare_to_store; /* to_prepare_to_store */
gnu_ops.to_xfer_memory = gnu_xfer_memory; /* to_xfer_memory */
gnu_ops.to_find_memory_regions = gnu_find_memory_regions;
- gnu_ops.to_files_info = 0; /* to_files_info */
gnu_ops.to_insert_breakpoint = memory_insert_breakpoint;
gnu_ops.to_remove_breakpoint = memory_remove_breakpoint;
gnu_ops.to_terminal_init = gnu_terminal_init_inferior;
@@ -2616,45 +2610,19 @@ init_gnu_ops (void)
gnu_ops.to_terminal_ours = terminal_ours;
gnu_ops.to_terminal_info = child_terminal_info;
gnu_ops.to_kill = gnu_kill_inferior; /* to_kill */
- gnu_ops.to_load = 0; /* to_load */
- gnu_ops.to_lookup_symbol = 0; /* to_lookup_symbol */
gnu_ops.to_create_inferior = gnu_create_inferior; /* to_create_inferior */
- gnu_ops.to_post_startup_inferior = NULL; /* to_post_startup_inferior */
- /* to_acknowledge_created_inferior */
- gnu_ops.to_acknowledge_created_inferior = NULL;
- /* to_clone_and_follow_inferior */
- gnu_ops.to_clone_and_follow_inferior = NULL;
- /* to_post_follow_inferior_by_clone */
- gnu_ops.to_post_follow_inferior_by_clone = NULL;
- gnu_ops.to_insert_fork_catchpoint = NULL;
- gnu_ops.to_remove_fork_catchpoint = NULL;
- gnu_ops.to_insert_vfork_catchpoint = NULL;
- gnu_ops.to_remove_vfork_catchpoint = NULL;
- gnu_ops.to_has_forked = NULL; /* to_has_forked */
- gnu_ops.to_has_vforked = NULL; /* to_has_vforked */
- gnu_ops.to_can_follow_vfork_prior_to_exec = NULL;
- gnu_ops.to_post_follow_vfork = NULL; /* to_post_follow_vfork */
- gnu_ops.to_insert_exec_catchpoint = NULL;
- gnu_ops.to_remove_exec_catchpoint = NULL;
- gnu_ops.to_has_execd = NULL;
- gnu_ops.to_reported_exec_events_per_exec_call = NULL;
- gnu_ops.to_has_exited = NULL;
gnu_ops.to_mourn_inferior = gnu_mourn_inferior; /* to_mourn_inferior */
gnu_ops.to_can_run = gnu_can_run; /* to_can_run */
- gnu_ops.to_notice_signals = 0; /* to_notice_signals */
gnu_ops.to_thread_alive = gnu_thread_alive; /* to_thread_alive */
gnu_ops.to_pid_to_str = gnu_pid_to_str; /* to_pid_to_str */
gnu_ops.to_stop = gnu_stop; /* to_stop */
gnu_ops.to_pid_to_exec_file = gnu_pid_to_exec_file; /* to_pid_to_exec_file */
gnu_ops.to_stratum = process_stratum; /* to_stratum */
- gnu_ops.DONT_USE = 0; /* to_next */
gnu_ops.to_has_all_memory = 1; /* to_has_all_memory */
gnu_ops.to_has_memory = 1; /* to_has_memory */
gnu_ops.to_has_stack = 1; /* to_has_stack */
gnu_ops.to_has_registers = 1; /* to_has_registers */
gnu_ops.to_has_execution = 1; /* to_has_execution */
- gnu_ops.to_sections = 0; /* sections */
- gnu_ops.to_sections_end = 0; /* sections_end */
gnu_ops.to_magic = OPS_MAGIC; /* to_magic */
} /* init_gnu_ops */
Index: monitor.c
===================================================================
RCS file: /cvs/src/src/gdb/monitor.c,v
retrieving revision 1.35
diff -u -p -r1.35 monitor.c
--- monitor.c 11 Jul 2002 21:00:39 -0000 1.35
+++ monitor.c 9 Nov 2002 00:53:28 -0000
@@ -2294,19 +2294,10 @@ static struct target_ops monitor_ops;
static void
init_base_monitor_ops (void)
{
- monitor_ops.to_shortname = NULL;
- monitor_ops.to_longname = NULL;
- monitor_ops.to_doc = NULL;
- monitor_ops.to_open = NULL;
monitor_ops.to_close = monitor_close;
- monitor_ops.to_attach = NULL;
- monitor_ops.to_post_attach = NULL;
- monitor_ops.to_require_attach = NULL;
monitor_ops.to_detach = monitor_detach;
- monitor_ops.to_require_detach = NULL;
monitor_ops.to_resume = monitor_resume;
monitor_ops.to_wait = monitor_wait;
- monitor_ops.to_post_wait = NULL;
monitor_ops.to_fetch_registers = monitor_fetch_registers;
monitor_ops.to_store_registers = monitor_store_registers;
monitor_ops.to_prepare_to_store = monitor_prepare_to_store;
@@ -2314,48 +2305,18 @@ init_base_monitor_ops (void)
monitor_ops.to_files_info = monitor_files_info;
monitor_ops.to_insert_breakpoint = monitor_insert_breakpoint;
monitor_ops.to_remove_breakpoint = monitor_remove_breakpoint;
- monitor_ops.to_terminal_init = 0;
- monitor_ops.to_terminal_inferior = 0;
- monitor_ops.to_terminal_ours_for_output = 0;
- monitor_ops.to_terminal_ours = 0;
- monitor_ops.to_terminal_info = 0;
monitor_ops.to_kill = monitor_kill;
monitor_ops.to_load = monitor_load;
- monitor_ops.to_lookup_symbol = 0;
monitor_ops.to_create_inferior = monitor_create_inferior;
- monitor_ops.to_post_startup_inferior = NULL;
- monitor_ops.to_acknowledge_created_inferior = NULL;
- monitor_ops.to_clone_and_follow_inferior = NULL;
- monitor_ops.to_post_follow_inferior_by_clone = NULL;
- monitor_ops.to_insert_fork_catchpoint = NULL;
- monitor_ops.to_remove_fork_catchpoint = NULL;
- monitor_ops.to_insert_vfork_catchpoint = NULL;
- monitor_ops.to_remove_vfork_catchpoint = NULL;
- monitor_ops.to_has_forked = NULL;
- monitor_ops.to_has_vforked = NULL;
- monitor_ops.to_can_follow_vfork_prior_to_exec = NULL;
- monitor_ops.to_post_follow_vfork = NULL;
- monitor_ops.to_insert_exec_catchpoint = NULL;
- monitor_ops.to_remove_exec_catchpoint = NULL;
- monitor_ops.to_has_execd = NULL;
- monitor_ops.to_reported_exec_events_per_exec_call = NULL;
- monitor_ops.to_has_exited = NULL;
monitor_ops.to_mourn_inferior = monitor_mourn_inferior;
- monitor_ops.to_can_run = 0;
- monitor_ops.to_notice_signals = 0;
- monitor_ops.to_thread_alive = 0;
monitor_ops.to_stop = monitor_stop;
monitor_ops.to_rcmd = monitor_rcmd;
- monitor_ops.to_pid_to_exec_file = NULL;
monitor_ops.to_stratum = process_stratum;
- monitor_ops.DONT_USE = 0;
monitor_ops.to_has_all_memory = 1;
monitor_ops.to_has_memory = 1;
monitor_ops.to_has_stack = 1;
monitor_ops.to_has_registers = 1;
monitor_ops.to_has_execution = 1;
- monitor_ops.to_sections = 0;
- monitor_ops.to_sections_end = 0;
monitor_ops.to_magic = OPS_MAGIC;
} /* init_base_monitor_ops */
Index: ppc-bdm.c
===================================================================
RCS file: /cvs/src/src/gdb/ppc-bdm.c,v
retrieving revision 1.14
diff -u -p -r1.14 ppc-bdm.c
--- ppc-bdm.c 15 Apr 2002 01:09:55 -0000 1.14
+++ ppc-bdm.c 9 Nov 2002 00:53:28 -0000
@@ -321,14 +321,9 @@ a wiggler, specify wiggler and then the
(e.g. wiggler lpt1)."; /* to_doc */
bdm_ppc_ops.to_open = bdm_ppc_open;
bdm_ppc_ops.to_close = ocd_close;
- bdm_ppc_ops.to_attach = NULL;
- bdm_ppc_ops.to_post_attach = NULL;
- bdm_ppc_ops.to_require_attach = NULL;
bdm_ppc_ops.to_detach = ocd_detach;
- bdm_ppc_ops.to_require_detach = NULL;
bdm_ppc_ops.to_resume = ocd_resume;
bdm_ppc_ops.to_wait = bdm_ppc_wait;
- bdm_ppc_ops.to_post_wait = NULL;
bdm_ppc_ops.to_fetch_registers = bdm_ppc_fetch_registers;
bdm_ppc_ops.to_store_registers = bdm_ppc_store_registers;
bdm_ppc_ops.to_prepare_to_store = ocd_prepare_to_store;
@@ -336,47 +331,18 @@ a wiggler, specify wiggler and then the
bdm_ppc_ops.to_files_info = ocd_files_info;
bdm_ppc_ops.to_insert_breakpoint = ocd_insert_breakpoint;
bdm_ppc_ops.to_remove_breakpoint = ocd_remove_breakpoint;
- bdm_ppc_ops.to_terminal_init = NULL;
- bdm_ppc_ops.to_terminal_inferior = NULL;
- bdm_ppc_ops.to_terminal_ours_for_output = NULL;
- bdm_ppc_ops.to_terminal_ours = NULL;
- bdm_ppc_ops.to_terminal_info = NULL;
bdm_ppc_ops.to_kill = ocd_kill;
bdm_ppc_ops.to_load = ocd_load;
- bdm_ppc_ops.to_lookup_symbol = NULL;
bdm_ppc_ops.to_create_inferior = ocd_create_inferior;
- bdm_ppc_ops.to_post_startup_inferior = NULL;
- bdm_ppc_ops.to_acknowledge_created_inferior = NULL;
- bdm_ppc_ops.to_clone_and_follow_inferior = NULL;
- bdm_ppc_ops.to_post_follow_inferior_by_clone = NULL;
- bdm_ppc_ops.to_insert_fork_catchpoint = NULL;
- bdm_ppc_ops.to_remove_fork_catchpoint = NULL;
- bdm_ppc_ops.to_insert_vfork_catchpoint = NULL;
- bdm_ppc_ops.to_remove_vfork_catchpoint = NULL;
- bdm_ppc_ops.to_has_forked = NULL;
- bdm_ppc_ops.to_has_vforked = NULL;
- bdm_ppc_ops.to_can_follow_vfork_prior_to_exec = NULL;
- bdm_ppc_ops.to_post_follow_vfork = NULL;
- bdm_ppc_ops.to_insert_exec_catchpoint = NULL;
- bdm_ppc_ops.to_remove_exec_catchpoint = NULL;
- bdm_ppc_ops.to_has_execd = NULL;
- bdm_ppc_ops.to_reported_exec_events_per_exec_call = NULL;
- bdm_ppc_ops.to_has_exited = NULL;
bdm_ppc_ops.to_mourn_inferior = ocd_mourn;
- bdm_ppc_ops.to_can_run = 0;
- bdm_ppc_ops.to_notice_signals = 0;
bdm_ppc_ops.to_thread_alive = ocd_thread_alive;
bdm_ppc_ops.to_stop = ocd_stop;
- bdm_ppc_ops.to_pid_to_exec_file = NULL;
bdm_ppc_ops.to_stratum = process_stratum;
- bdm_ppc_ops.DONT_USE = NULL;
bdm_ppc_ops.to_has_all_memory = 1;
bdm_ppc_ops.to_has_memory = 1;
bdm_ppc_ops.to_has_stack = 1;
bdm_ppc_ops.to_has_registers = 1;
bdm_ppc_ops.to_has_execution = 1;
- bdm_ppc_ops.to_sections = NULL;
- bdm_ppc_ops.to_sections_end = NULL;
bdm_ppc_ops.to_magic = OPS_MAGIC;
} /* init_bdm_ppc_ops */
Index: remote-array.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-array.c,v
retrieving revision 1.19
diff -u -p -r1.19 remote-array.c
--- remote-array.c 29 Apr 2002 11:01:13 -0000 1.19
+++ remote-array.c 9 Nov 2002 00:53:28 -0000
@@ -115,14 +115,9 @@ init_array_ops (void)
Specify the serial device it is connected to (e.g. /dev/ttya).";
array_ops.to_open = array_open;
array_ops.to_close = array_close;
- array_ops.to_attach = NULL;
- array_ops.to_post_attach = NULL;
- array_ops.to_require_attach = NULL;
array_ops.to_detach = array_detach;
- array_ops.to_require_detach = NULL;
array_ops.to_resume = array_resume;
array_ops.to_wait = array_wait;
- array_ops.to_post_wait = NULL;
array_ops.to_fetch_registers = array_fetch_registers;
array_ops.to_store_registers = array_store_registers;
array_ops.to_prepare_to_store = array_prepare_to_store;
@@ -130,47 +125,15 @@ Specify the serial device it is connecte
array_ops.to_files_info = array_files_info;
array_ops.to_insert_breakpoint = array_insert_breakpoint;
array_ops.to_remove_breakpoint = array_remove_breakpoint;
- array_ops.to_terminal_init = 0;
- array_ops.to_terminal_inferior = 0;
- array_ops.to_terminal_ours_for_output = 0;
- array_ops.to_terminal_ours = 0;
- array_ops.to_terminal_info = 0;
array_ops.to_kill = array_kill;
- array_ops.to_load = 0;
- array_ops.to_lookup_symbol = 0;
array_ops.to_create_inferior = array_create_inferior;
- array_ops.to_post_startup_inferior = NULL;
- array_ops.to_acknowledge_created_inferior = NULL;
- array_ops.to_clone_and_follow_inferior = NULL;
- array_ops.to_post_follow_inferior_by_clone = NULL;
- array_ops.to_insert_fork_catchpoint = NULL;
- array_ops.to_remove_fork_catchpoint = NULL;
- array_ops.to_insert_vfork_catchpoint = NULL;
- array_ops.to_remove_vfork_catchpoint = NULL;
- array_ops.to_has_forked = NULL;
- array_ops.to_has_vforked = NULL;
- array_ops.to_can_follow_vfork_prior_to_exec = NULL;
- array_ops.to_post_follow_vfork = NULL;
- array_ops.to_insert_exec_catchpoint = NULL;
- array_ops.to_remove_exec_catchpoint = NULL;
- array_ops.to_has_execd = NULL;
- array_ops.to_reported_exec_events_per_exec_call = NULL;
- array_ops.to_has_exited = NULL;
array_ops.to_mourn_inferior = array_mourn_inferior;
- array_ops.to_can_run = 0;
- array_ops.to_notice_signals = 0;
- array_ops.to_thread_alive = 0;
- array_ops.to_stop = 0;
- array_ops.to_pid_to_exec_file = NULL;
array_ops.to_stratum = process_stratum;
- array_ops.DONT_USE = 0;
array_ops.to_has_all_memory = 1;
array_ops.to_has_memory = 1;
array_ops.to_has_stack = 1;
array_ops.to_has_registers = 1;
array_ops.to_has_execution = 1;
- array_ops.to_sections = 0;
- array_ops.to_sections_end = 0;
array_ops.to_magic = OPS_MAGIC;
};
Index: remote-e7000.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-e7000.c,v
retrieving revision 1.28
diff -u -p -r1.28 remote-e7000.c
--- remote-e7000.c 5 May 2002 01:15:13 -0000 1.28
+++ remote-e7000.c 9 Nov 2002 00:53:29 -0000
@@ -2143,14 +2143,9 @@ target e7000 /dev/ttya 9600\n\
target e7000 foobar";
e7000_ops.to_open = e7000_open;
e7000_ops.to_close = e7000_close;
- e7000_ops.to_attach = 0;
- e7000_ops.to_post_attach = NULL;
- e7000_ops.to_require_attach = NULL;
e7000_ops.to_detach = e7000_detach;
- e7000_ops.to_require_detach = NULL;
e7000_ops.to_resume = e7000_resume;
e7000_ops.to_wait = e7000_wait;
- e7000_ops.to_post_wait = NULL;
e7000_ops.to_fetch_registers = e7000_fetch_register;
e7000_ops.to_store_registers = e7000_store_register;
e7000_ops.to_prepare_to_store = e7000_prepare_to_store;
@@ -2158,47 +2153,17 @@ target e7000 foobar";
e7000_ops.to_files_info = e7000_files_info;
e7000_ops.to_insert_breakpoint = e7000_insert_breakpoint;
e7000_ops.to_remove_breakpoint = e7000_remove_breakpoint;
- e7000_ops.to_terminal_init = 0;
- e7000_ops.to_terminal_inferior = 0;
- e7000_ops.to_terminal_ours_for_output = 0;
- e7000_ops.to_terminal_ours = 0;
- e7000_ops.to_terminal_info = 0;
e7000_ops.to_kill = e7000_kill;
e7000_ops.to_load = e7000_load;
- e7000_ops.to_lookup_symbol = 0;
e7000_ops.to_create_inferior = e7000_create_inferior;
- e7000_ops.to_post_startup_inferior = NULL;
- e7000_ops.to_acknowledge_created_inferior = NULL;
- e7000_ops.to_clone_and_follow_inferior = NULL;
- e7000_ops.to_post_follow_inferior_by_clone = NULL;
- e7000_ops.to_insert_fork_catchpoint = NULL;
- e7000_ops.to_remove_fork_catchpoint = NULL;
- e7000_ops.to_insert_vfork_catchpoint = NULL;
- e7000_ops.to_remove_vfork_catchpoint = NULL;
- e7000_ops.to_has_forked = NULL;
- e7000_ops.to_has_vforked = NULL;
- e7000_ops.to_can_follow_vfork_prior_to_exec = NULL;
- e7000_ops.to_post_follow_vfork = NULL;
- e7000_ops.to_insert_exec_catchpoint = NULL;
- e7000_ops.to_remove_exec_catchpoint = NULL;
- e7000_ops.to_has_execd = NULL;
- e7000_ops.to_reported_exec_events_per_exec_call = NULL;
- e7000_ops.to_has_exited = NULL;
e7000_ops.to_mourn_inferior = e7000_mourn_inferior;
- e7000_ops.to_can_run = 0;
- e7000_ops.to_notice_signals = 0;
- e7000_ops.to_thread_alive = 0;
e7000_ops.to_stop = e7000_stop;
- e7000_ops.to_pid_to_exec_file = NULL;
e7000_ops.to_stratum = process_stratum;
- e7000_ops.DONT_USE = 0;
e7000_ops.to_has_all_memory = 1;
e7000_ops.to_has_memory = 1;
e7000_ops.to_has_stack = 1;
e7000_ops.to_has_registers = 1;
e7000_ops.to_has_execution = 1;
- e7000_ops.to_sections = 0;
- e7000_ops.to_sections_end = 0;
e7000_ops.to_magic = OPS_MAGIC;
};
Index: remote-es.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-es.c,v
retrieving revision 1.22
diff -u -p -r1.22 remote-es.c
--- remote-es.c 11 Jul 2002 13:50:49 -0000 1.22
+++ remote-es.c 9 Nov 2002 00:53:29 -0000
@@ -1981,61 +1981,17 @@ Specify the serial device it is connecte
es1800_ops.to_open = es1800_open;
es1800_ops.to_close = es1800_close;
es1800_ops.to_attach = es1800_attach;
- es1800_ops.to_post_attach = NULL;
- es1800_ops.to_require_attach = NULL;
es1800_ops.to_detach = es1800_detach;
- es1800_ops.to_require_detach = NULL;
es1800_ops.to_resume = es1800_resume;
- es1800_ops.to_wait = NULL;
- es1800_ops.to_post_wait = NULL;
- es1800_ops.to_fetch_registers = NULL;
- es1800_ops.to_store_registers = NULL;
es1800_ops.to_prepare_to_store = es1800_prepare_to_store;
es1800_ops.to_xfer_memory = es1800_xfer_inferior_memory;
es1800_ops.to_files_info = es1800_files_info;
es1800_ops.to_insert_breakpoint = es1800_insert_breakpoint;
es1800_ops.to_remove_breakpoint = es1800_remove_breakpoint;
- es1800_ops.to_terminal_init = NULL;
- es1800_ops.to_terminal_inferior = NULL;
- es1800_ops.to_terminal_ours_for_output = NULL;
- es1800_ops.to_terminal_ours = NULL;
- es1800_ops.to_terminal_info = NULL;
- es1800_ops.to_kill = NULL;
es1800_ops.to_load = es1800_load;
- es1800_ops.to_lookup_symbol = NULL;
es1800_ops.to_create_inferior = es1800_create_inferior;
- es1800_ops.to_post_startup_inferior = NULL;
- es1800_ops.to_acknowledge_created_inferior = NULL;
- es1800_ops.to_clone_and_follow_inferior = NULL;
- es1800_ops.to_post_follow_inferior_by_clone = NULL;
- es1800_ops.to_insert_fork_catchpoint = NULL;
- es1800_ops.to_remove_fork_catchpoint = NULL;
- es1800_ops.to_insert_vfork_catchpoint = NULL;
- es1800_ops.to_remove_vfork_catchpoint = NULL;
- es1800_ops.to_has_forked = NULL;
- es1800_ops.to_has_vforked = NULL;
- es1800_ops.to_can_follow_vfork_prior_to_exec = NULL;
- es1800_ops.to_post_follow_vfork = NULL;
- es1800_ops.to_insert_exec_catchpoint = NULL;
- es1800_ops.to_remove_exec_catchpoint = NULL;
- es1800_ops.to_has_execd = NULL;
- es1800_ops.to_reported_exec_events_per_exec_call = NULL;
- es1800_ops.to_has_exited = NULL;
- es1800_ops.to_mourn_inferior = NULL;
- es1800_ops.to_can_run = 0;
- es1800_ops.to_notice_signals = 0;
- es1800_ops.to_thread_alive = 0;
- es1800_ops.to_stop = 0;
- es1800_ops.to_pid_to_exec_file = NULL;
es1800_ops.to_stratum = core_stratum;
- es1800_ops.DONT_USE = 0;
- es1800_ops.to_has_all_memory = 0;
es1800_ops.to_has_memory = 1;
- es1800_ops.to_has_stack = 0;
- es1800_ops.to_has_registers = 0;
- es1800_ops.to_has_execution = 0;
- es1800_ops.to_sections = NULL;
- es1800_ops.to_sections_end = NULL;
es1800_ops.to_magic = OPS_MAGIC;
}
@@ -2051,15 +2007,10 @@ init_es1800_child_ops (void)
es1800_child_ops.to_doc = "Remote debugging on the es1800 emulator via a serial line.\n\
Specify the serial device it is connected to (e.g. /dev/ttya).";
es1800_child_ops.to_open = es1800_child_open;
- es1800_child_ops.to_close = NULL;
es1800_child_ops.to_attach = es1800_attach;
- es1800_child_ops.to_post_attach = NULL;
- es1800_child_ops.to_require_attach = NULL;
es1800_child_ops.to_detach = es1800_child_detach;
- es1800_child_ops.to_require_detach = NULL;
es1800_child_ops.to_resume = es1800_resume;
es1800_child_ops.to_wait = es1800_wait;
- es1800_child_ops.to_post_wait = NULL;
es1800_child_ops.to_fetch_registers = es1800_fetch_register;
es1800_child_ops.to_store_registers = es1800_store_register;
es1800_child_ops.to_prepare_to_store = es1800_prepare_to_store;
@@ -2067,47 +2018,16 @@ Specify the serial device it is connecte
es1800_child_ops.to_files_info = es1800_files_info;
es1800_child_ops.to_insert_breakpoint = es1800_insert_breakpoint;
es1800_child_ops.to_remove_breakpoint = es1800_remove_breakpoint;
- es1800_child_ops.to_terminal_init = NULL;
- es1800_child_ops.to_terminal_inferior = NULL;
- es1800_child_ops.to_terminal_ours_for_output = NULL;
- es1800_child_ops.to_terminal_ours = NULL;
- es1800_child_ops.to_terminal_info = NULL;
es1800_child_ops.to_kill = es1800_kill;
es1800_child_ops.to_load = es1800_load;
- es1800_child_ops.to_lookup_symbol = NULL;
es1800_child_ops.to_create_inferior = es1800_create_inferior;
- es1800_child_ops.to_post_startup_inferior = NULL;
- es1800_child_ops.to_acknowledge_created_inferior = NULL;
- es1800_child_ops.to_clone_and_follow_inferior = NULL;
- es1800_child_ops.to_post_follow_inferior_by_clone = NULL;
- es1800_child_ops.to_insert_fork_catchpoint = NULL;
- es1800_child_ops.to_remove_fork_catchpoint = NULL;
- es1800_child_ops.to_insert_vfork_catchpoint = NULL;
- es1800_child_ops.to_remove_vfork_catchpoint = NULL;
- es1800_child_ops.to_has_forked = NULL;
- es1800_child_ops.to_has_vforked = NULL;
- es1800_child_ops.to_can_follow_vfork_prior_to_exec = NULL;
- es1800_child_ops.to_post_follow_vfork = NULL;
- es1800_child_ops.to_insert_exec_catchpoint = NULL;
- es1800_child_ops.to_remove_exec_catchpoint = NULL;
- es1800_child_ops.to_has_execd = NULL;
- es1800_child_ops.to_reported_exec_events_per_exec_call = NULL;
- es1800_child_ops.to_has_exited = NULL;
es1800_child_ops.to_mourn_inferior = es1800_mourn_inferior;
- es1800_child_ops.to_can_run = 0;
- es1800_child_ops.to_notice_signals = 0;
- es1800_child_ops.to_thread_alive = 0;
- es1800_child_ops.to_stop = 0;
- es1800_child_ops.to_pid_to_exec_file = NULL;
es1800_child_ops.to_stratum = process_stratum;
- es1800_child_ops.DONT_USE = 0;
es1800_child_ops.to_has_all_memory = 1;
es1800_child_ops.to_has_memory = 1;
es1800_child_ops.to_has_stack = 1;
es1800_child_ops.to_has_registers = 1;
es1800_child_ops.to_has_execution = 1;
- es1800_child_ops.to_sections = NULL;
- es1800_child_ops.to_sections_end = NULL;
es1800_child_ops.to_magic = OPS_MAGIC;
}
Index: remote-rdp.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-rdp.c,v
retrieving revision 1.29
diff -u -p -r1.29 remote-rdp.c
--- remote-rdp.c 2 Nov 2002 14:59:10 -0000 1.29
+++ remote-rdp.c 9 Nov 2002 00:53:29 -0000
@@ -1383,13 +1383,8 @@ init_remote_rdp_ops (void)
remote_rdp_ops.to_open = remote_rdp_open;
remote_rdp_ops.to_close = remote_rdp_close;
remote_rdp_ops.to_attach = remote_rdp_attach;
- remote_rdp_ops.to_post_attach = NULL;
- remote_rdp_ops.to_require_attach = NULL;
- remote_rdp_ops.to_detach = NULL;
- remote_rdp_ops.to_require_detach = NULL;
remote_rdp_ops.to_resume = remote_rdp_resume;
remote_rdp_ops.to_wait = remote_rdp_wait;
- remote_rdp_ops.to_post_wait = NULL;
remote_rdp_ops.to_fetch_registers = remote_rdp_fetch_register;
remote_rdp_ops.to_store_registers = remote_rdp_store_register;
remote_rdp_ops.to_prepare_to_store = remote_rdp_prepare_to_store;
@@ -1397,47 +1392,16 @@ init_remote_rdp_ops (void)
remote_rdp_ops.to_files_info = remote_rdp_files_info;
remote_rdp_ops.to_insert_breakpoint = remote_rdp_insert_breakpoint;
remote_rdp_ops.to_remove_breakpoint = remote_rdp_remove_breakpoint;
- remote_rdp_ops.to_terminal_init = NULL;
- remote_rdp_ops.to_terminal_inferior = NULL;
- remote_rdp_ops.to_terminal_ours_for_output = NULL;
- remote_rdp_ops.to_terminal_ours = NULL;
- remote_rdp_ops.to_terminal_info = NULL;
remote_rdp_ops.to_kill = remote_rdp_kill;
remote_rdp_ops.to_load = generic_load;
- remote_rdp_ops.to_lookup_symbol = NULL;
remote_rdp_ops.to_create_inferior = remote_rdp_create_inferior;
- remote_rdp_ops.to_post_startup_inferior = NULL;
- remote_rdp_ops.to_acknowledge_created_inferior = NULL;
- remote_rdp_ops.to_clone_and_follow_inferior = NULL;
- remote_rdp_ops.to_post_follow_inferior_by_clone = NULL;
- remote_rdp_ops.to_insert_fork_catchpoint = NULL;
- remote_rdp_ops.to_remove_fork_catchpoint = NULL;
- remote_rdp_ops.to_insert_vfork_catchpoint = NULL;
- remote_rdp_ops.to_remove_vfork_catchpoint = NULL;
- remote_rdp_ops.to_has_forked = NULL;
- remote_rdp_ops.to_has_vforked = NULL;
- remote_rdp_ops.to_can_follow_vfork_prior_to_exec = NULL;
- remote_rdp_ops.to_post_follow_vfork = NULL;
- remote_rdp_ops.to_insert_exec_catchpoint = NULL;
- remote_rdp_ops.to_remove_exec_catchpoint = NULL;
- remote_rdp_ops.to_has_execd = NULL;
- remote_rdp_ops.to_reported_exec_events_per_exec_call = NULL;
- remote_rdp_ops.to_has_exited = NULL;
remote_rdp_ops.to_mourn_inferior = generic_mourn_inferior;
- remote_rdp_ops.to_can_run = NULL;
- remote_rdp_ops.to_notice_signals = 0;
- remote_rdp_ops.to_thread_alive = 0;
- remote_rdp_ops.to_stop = 0;
- remote_rdp_ops.to_pid_to_exec_file = NULL;
remote_rdp_ops.to_stratum = process_stratum;
- remote_rdp_ops.DONT_USE = NULL;
remote_rdp_ops.to_has_all_memory = 1;
remote_rdp_ops.to_has_memory = 1;
remote_rdp_ops.to_has_stack = 1;
remote_rdp_ops.to_has_registers = 1;
remote_rdp_ops.to_has_execution = 1;
- remote_rdp_ops.to_sections = NULL;
- remote_rdp_ops.to_sections_end = NULL;
remote_rdp_ops.to_magic = OPS_MAGIC;
}
Index: remote-sim.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-sim.c,v
retrieving revision 1.25
diff -u -p -r1.25 remote-sim.c
--- remote-sim.c 2 Nov 2002 14:59:10 -0000 1.25
+++ remote-sim.c 9 Nov 2002 00:53:30 -0000
@@ -897,14 +897,9 @@ init_gdbsim_ops (void)
gdbsim_ops.to_doc = "Use the compiled-in simulator.";
gdbsim_ops.to_open = gdbsim_open;
gdbsim_ops.to_close = gdbsim_close;
- gdbsim_ops.to_attach = NULL;
- gdbsim_ops.to_post_attach = NULL;
- gdbsim_ops.to_require_attach = NULL;
gdbsim_ops.to_detach = gdbsim_detach;
- gdbsim_ops.to_require_detach = NULL;
gdbsim_ops.to_resume = gdbsim_resume;
gdbsim_ops.to_wait = gdbsim_wait;
- gdbsim_ops.to_post_wait = NULL;
gdbsim_ops.to_fetch_registers = gdbsim_fetch_register;
gdbsim_ops.to_store_registers = gdbsim_store_register;
gdbsim_ops.to_prepare_to_store = gdbsim_prepare_to_store;
@@ -912,47 +907,17 @@ init_gdbsim_ops (void)
gdbsim_ops.to_files_info = gdbsim_files_info;
gdbsim_ops.to_insert_breakpoint = gdbsim_insert_breakpoint;
gdbsim_ops.to_remove_breakpoint = gdbsim_remove_breakpoint;
- gdbsim_ops.to_terminal_init = NULL;
- gdbsim_ops.to_terminal_inferior = NULL;
- gdbsim_ops.to_terminal_ours_for_output = NULL;
- gdbsim_ops.to_terminal_ours = NULL;
- gdbsim_ops.to_terminal_info = NULL;
gdbsim_ops.to_kill = gdbsim_kill;
gdbsim_ops.to_load = gdbsim_load;
- gdbsim_ops.to_lookup_symbol = NULL;
gdbsim_ops.to_create_inferior = gdbsim_create_inferior;
- gdbsim_ops.to_post_startup_inferior = NULL;
- gdbsim_ops.to_acknowledge_created_inferior = NULL;
- gdbsim_ops.to_clone_and_follow_inferior = NULL;
- gdbsim_ops.to_post_follow_inferior_by_clone = NULL;
- gdbsim_ops.to_insert_fork_catchpoint = NULL;
- gdbsim_ops.to_remove_fork_catchpoint = NULL;
- gdbsim_ops.to_insert_vfork_catchpoint = NULL;
- gdbsim_ops.to_remove_vfork_catchpoint = NULL;
- gdbsim_ops.to_has_forked = NULL;
- gdbsim_ops.to_has_vforked = NULL;
- gdbsim_ops.to_can_follow_vfork_prior_to_exec = NULL;
- gdbsim_ops.to_post_follow_vfork = NULL;
- gdbsim_ops.to_insert_exec_catchpoint = NULL;
- gdbsim_ops.to_remove_exec_catchpoint = NULL;
- gdbsim_ops.to_has_execd = NULL;
- gdbsim_ops.to_reported_exec_events_per_exec_call = NULL;
- gdbsim_ops.to_has_exited = NULL;
gdbsim_ops.to_mourn_inferior = gdbsim_mourn_inferior;
- gdbsim_ops.to_can_run = 0;
- gdbsim_ops.to_notice_signals = 0;
- gdbsim_ops.to_thread_alive = 0;
gdbsim_ops.to_stop = gdbsim_stop;
- gdbsim_ops.to_pid_to_exec_file = NULL;
gdbsim_ops.to_stratum = process_stratum;
- gdbsim_ops.DONT_USE = NULL;
gdbsim_ops.to_has_all_memory = 1;
gdbsim_ops.to_has_memory = 1;
gdbsim_ops.to_has_stack = 1;
gdbsim_ops.to_has_registers = 1;
gdbsim_ops.to_has_execution = 1;
- gdbsim_ops.to_sections = NULL;
- gdbsim_ops.to_sections_end = NULL;
gdbsim_ops.to_magic = OPS_MAGIC;
#ifdef TARGET_REDEFINE_DEFAULT_OPS
Index: remote-st.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-st.c,v
retrieving revision 1.17
diff -u -p -r1.17 remote-st.c
--- remote-st.c 29 Apr 2002 11:01:13 -0000 1.17
+++ remote-st.c 9 Nov 2002 00:53:30 -0000
@@ -767,14 +767,9 @@ Arguments are the name of the device for
the speed to connect at in bits per second.";
st2000_ops.to_open = st2000_open;
st2000_ops.to_close = st2000_close;
- st2000_ops.to_attach = 0;
- st2000_run_ops.to_post_attach = NULL;
- st2000_ops.to_require_attach = NULL;
st2000_ops.to_detach = st2000_detach;
- st2000_ops.to_require_detach = NULL;
st2000_ops.to_resume = st2000_resume;
st2000_ops.to_wait = st2000_wait;
- st2000_ops.to_post_wait = NULL;
st2000_ops.to_fetch_registers = st2000_fetch_register;
st2000_ops.to_store_registers = st2000_store_register;
st2000_ops.to_prepare_to_store = st2000_prepare_to_store;
@@ -782,47 +777,15 @@ the speed to connect at in bits per seco
st2000_ops.to_files_info = st2000_files_info;
st2000_ops.to_insert_breakpoint = st2000_insert_breakpoint;
st2000_ops.to_remove_breakpoint = st2000_remove_breakpoint; /* Breakpoints */
- st2000_ops.to_terminal_init = 0;
- st2000_ops.to_terminal_inferior = 0;
- st2000_ops.to_terminal_ours_for_output = 0;
- st2000_ops.to_terminal_ours = 0;
- st2000_ops.to_terminal_info = 0; /* Terminal handling */
st2000_ops.to_kill = st2000_kill;
- st2000_ops.to_load = 0; /* load */
- st2000_ops.to_lookup_symbol = 0; /* lookup_symbol */
st2000_ops.to_create_inferior = st2000_create_inferior;
- st2000_ops.to_post_startup_inferior = NULL;
- st2000_ops.to_acknowledge_created_inferior = NULL;
- st2000_ops.to_clone_and_follow_inferior = NULL;
- st2000_ops.to_post_follow_inferior_by_clone = NULL;
- st2000_run_ops.to_insert_fork_catchpoint = NULL;
- st2000_run_ops.to_remove_fork_catchpoint = NULL;
- st2000_run_ops.to_insert_vfork_catchpoint = NULL;
- st2000_run_ops.to_remove_vfork_catchpoint = NULL;
- st2000_ops.to_has_forked = NULL;
- st2000_ops.to_has_vforked = NULL;
- st2000_run_ops.to_can_follow_vfork_prior_to_exec = NULL;
- st2000_ops.to_post_follow_vfork = NULL;
- st2000_run_ops.to_insert_exec_catchpoint = NULL;
- st2000_run_ops.to_remove_exec_catchpoint = NULL;
- st2000_run_ops.to_has_execd = NULL;
- st2000_run_ops.to_reported_exec_events_per_exec_call = NULL;
- st2000_run_ops.to_has_exited = NULL;
st2000_ops.to_mourn_inferior = st2000_mourn_inferior;
- st2000_ops.to_can_run = 0; /* can_run */
- st2000_ops.to_notice_signals = 0; /* notice_signals */
- st2000_ops.to_thread_alive = 0; /* thread alive */
- st2000_ops.to_stop = 0; /* to_stop */
- st2000_ops.to_pid_to_exec_file = NULL;
st2000_ops.to_stratum = process_stratum;
- st2000_ops.DONT_USE = 0; /* next */
st2000_ops.to_has_all_memory = 1;
st2000_ops.to_has_memory = 1;
st2000_ops.to_has_stack = 1;
st2000_ops.to_has_registers = 1;
st2000_ops.to_has_execution = 1; /* all mem, mem, stack, regs, exec */
- st2000_ops.to_sections = 0;
- st2000_ops.to_sections_end = 0; /* Section pointers */
st2000_ops.to_magic = OPS_MAGIC; /* Always the last thing */
};
Index: sol-thread.c
===================================================================
RCS file: /cvs/src/src/gdb/sol-thread.c,v
retrieving revision 1.30
diff -u -p -r1.30 sol-thread.c
--- sol-thread.c 26 Aug 2002 19:18:33 -0000 1.30
+++ sol-thread.c 9 Nov 2002 00:53:31 -0000
@@ -1540,7 +1540,6 @@ init_sol_thread_ops (void)
sol_thread_ops.to_longname = "Solaris threads and pthread.";
sol_thread_ops.to_doc = "Solaris threads and pthread support.";
sol_thread_ops.to_open = sol_thread_open;
- sol_thread_ops.to_close = 0;
sol_thread_ops.to_attach = sol_thread_attach;
sol_thread_ops.to_detach = sol_thread_detach;
sol_thread_ops.to_resume = sol_thread_resume;
@@ -1559,8 +1558,6 @@ init_sol_thread_ops (void)
sol_thread_ops.to_terminal_save_ours = terminal_save_ours;
sol_thread_ops.to_terminal_info = child_terminal_info;
sol_thread_ops.to_kill = sol_thread_kill_inferior;
- sol_thread_ops.to_load = 0;
- sol_thread_ops.to_lookup_symbol = 0;
sol_thread_ops.to_create_inferior = sol_thread_create_inferior;
sol_thread_ops.to_mourn_inferior = sol_thread_mourn_inferior;
sol_thread_ops.to_can_run = sol_thread_can_run;
@@ -1576,8 +1573,6 @@ init_sol_thread_ops (void)
sol_thread_ops.to_has_registers = 1;
sol_thread_ops.to_has_execution = 1;
sol_thread_ops.to_has_thread_control = tc_none;
- sol_thread_ops.to_sections = 0;
- sol_thread_ops.to_sections_end = 0;
sol_thread_ops.to_find_memory_regions = sol_find_memory_regions;
sol_thread_ops.to_make_corefile_notes = sol_make_note_section;
sol_thread_ops.to_magic = OPS_MAGIC;
@@ -1594,30 +1589,16 @@ init_sol_core_ops (void)
sol_core_ops.to_close = sol_core_close;
sol_core_ops.to_attach = sol_thread_attach;
sol_core_ops.to_detach = sol_core_detach;
- /* sol_core_ops.to_resume = 0; */
- /* sol_core_ops.to_wait = 0; */
sol_core_ops.to_fetch_registers = sol_thread_fetch_registers;
- /* sol_core_ops.to_store_registers = 0; */
- /* sol_core_ops.to_prepare_to_store = 0; */
sol_core_ops.to_xfer_memory = sol_thread_xfer_memory;
sol_core_ops.to_files_info = sol_core_files_info;
sol_core_ops.to_insert_breakpoint = ignore;
sol_core_ops.to_remove_breakpoint = ignore;
- /* sol_core_ops.to_terminal_init = 0; */
- /* sol_core_ops.to_terminal_inferior = 0; */
- /* sol_core_ops.to_terminal_ours_for_output = 0; */
- /* sol_core_ops.to_terminal_ours = 0; */
- /* sol_core_ops.to_terminal_info = 0; */
- /* sol_core_ops.to_kill = 0; */
- /* sol_core_ops.to_load = 0; */
- /* sol_core_ops.to_lookup_symbol = 0; */
sol_core_ops.to_create_inferior = sol_thread_create_inferior;
sol_core_ops.to_stratum = core_stratum;
- sol_core_ops.to_has_all_memory = 0;
sol_core_ops.to_has_memory = 1;
sol_core_ops.to_has_stack = 1;
sol_core_ops.to_has_registers = 1;
- sol_core_ops.to_has_execution = 0;
sol_core_ops.to_has_thread_control = tc_none;
sol_core_ops.to_thread_alive = sol_thread_alive;
sol_core_ops.to_pid_to_str = solaris_pid_to_str;
@@ -1626,8 +1607,6 @@ init_sol_core_ops (void)
<n> in procinfo list" where <n> is the pid of the process that produced
the core file. Disable it for now. */
/* sol_core_ops.to_find_new_threads = sol_find_new_threads; */
- sol_core_ops.to_sections = 0;
- sol_core_ops.to_sections_end = 0;
sol_core_ops.to_magic = OPS_MAGIC;
}
Index: v850ice.c
===================================================================
RCS file: /cvs/src/src/gdb/v850ice.c,v
retrieving revision 1.12
diff -u -p -r1.12 v850ice.c
--- v850ice.c 2 Oct 2002 21:33:58 -0000 1.12
+++ v850ice.c 9 Nov 2002 00:53:32 -0000
@@ -897,14 +897,9 @@ init_850ice_ops (void)
v850ice_ops.to_doc = "Debug a system controlled by a NEC 850 ICE.";
v850ice_ops.to_open = v850ice_open;
v850ice_ops.to_close = v850ice_close;
- v850ice_ops.to_attach = NULL;
- v850ice_ops.to_post_attach = NULL;
- v850ice_ops.to_require_attach = NULL;
v850ice_ops.to_detach = v850ice_detach;
- v850ice_ops.to_require_detach = NULL;
v850ice_ops.to_resume = v850ice_resume;
v850ice_ops.to_wait = v850ice_wait;
- v850ice_ops.to_post_wait = NULL;
v850ice_ops.to_fetch_registers = v850ice_fetch_registers;
v850ice_ops.to_store_registers = v850ice_store_registers;
v850ice_ops.to_prepare_to_store = v850ice_prepare_to_store;
@@ -912,30 +907,16 @@ init_850ice_ops (void)
v850ice_ops.to_files_info = v850ice_files_info;
v850ice_ops.to_insert_breakpoint = v850ice_insert_breakpoint;
v850ice_ops.to_remove_breakpoint = v850ice_remove_breakpoint;
- v850ice_ops.to_terminal_init = NULL;
- v850ice_ops.to_terminal_inferior = NULL;
- v850ice_ops.to_terminal_ours_for_output = NULL;
- v850ice_ops.to_terminal_ours = NULL;
- v850ice_ops.to_terminal_info = NULL;
v850ice_ops.to_kill = v850ice_kill;
v850ice_ops.to_load = v850ice_load;
- v850ice_ops.to_lookup_symbol = NULL;
- v850ice_ops.to_create_inferior = NULL;
v850ice_ops.to_mourn_inferior = v850ice_mourn;
- v850ice_ops.to_can_run = 0;
- v850ice_ops.to_notice_signals = 0;
- v850ice_ops.to_thread_alive = NULL;
v850ice_ops.to_stop = v850ice_stop;
- v850ice_ops.to_pid_to_exec_file = NULL;
v850ice_ops.to_stratum = process_stratum;
- v850ice_ops.DONT_USE = NULL;
v850ice_ops.to_has_all_memory = 1;
v850ice_ops.to_has_memory = 1;
v850ice_ops.to_has_stack = 1;
v850ice_ops.to_has_registers = 1;
v850ice_ops.to_has_execution = 1;
- v850ice_ops.to_sections = NULL;
- v850ice_ops.to_sections_end = NULL;
v850ice_ops.to_magic = OPS_MAGIC;
}
Index: win32-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/win32-nat.c,v
retrieving revision 1.63
diff -u -p -r1.63 win32-nat.c
--- win32-nat.c 2 Nov 2002 14:59:10 -0000 1.63
+++ win32-nat.c 9 Nov 2002 00:53:33 -0000
@@ -1828,24 +1828,18 @@ init_child_ops (void)
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 = 0;
- child_ops.to_lookup_symbol = 0;
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_notice_signals = 0;
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.DONT_USE = 0;
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_sections = 0;
- child_ops.to_sections_end = 0;
child_ops.to_magic = OPS_MAGIC;
}
Index: wince.c
===================================================================
RCS file: /cvs/src/src/gdb/wince.c,v
retrieving revision 1.21
diff -u -p -r1.21 wince.c
--- wince.c 2 Nov 2002 14:59:10 -0000 1.21
+++ wince.c 9 Nov 2002 00:53:33 -0000
@@ -1924,8 +1924,6 @@ init_child_ops (void)
child_ops.to_has_stack = 1;
child_ops.to_has_registers = 1;
child_ops.to_has_execution = 1;
- child_ops.to_sections = 0;
- child_ops.to_sections_end = 0;
child_ops.to_magic = OPS_MAGIC;
}
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: PATCH: Remove unnecessary zero-initializations
2002-11-10 16:18 PATCH: Remove unnecessary zero-initializations Daniel Jacobowitz
@ 2002-11-10 20:09 ` Andrew Cagney
2002-11-10 20:22 ` Daniel Jacobowitz
` (2 more replies)
2002-11-11 2:48 ` Felix Lee
1 sibling, 3 replies; 16+ messages in thread
From: Andrew Cagney @ 2002-11-10 20:09 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
> Currently, thirteen files which provide a target_ops explicitly initialize
> members they don't support to NULL. I plan to delete a number of these
> methods, and rather than making sure I got all the necessary target files
> each time I just wanted to delete the unnecessary lines up-front. All of
> these are called-once functions initializing a statically or globally
> declared object; C will guarantee zero-initialization for us. And several
> of the functions explicitly called memset anyway.
>
> Besides, this way grepping for .to_require_attach\ = will only find targets
> which define it to something useful.
>
> I'll commit this tomorrow unless someone sees a problem with it.
>
> Note1: remote-st.c hasn't been compilable in a while; m68*-tandem-* is
> probably a good candidate for the hitlist. From a glance it looks like it
> has been broken since the HP merge added the NULL assignments I'm removing,
> which is about three years now I think.
>
> Note2: The DONT_USE member of struct target_ops can go now.
The fact that 13 files were doing it should suggest that it was
intentional. Might want to wait a bit longer while someone dregs up the
history.
Andrew
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: PATCH: Remove unnecessary zero-initializations
2002-11-10 20:09 ` Andrew Cagney
@ 2002-11-10 20:22 ` Daniel Jacobowitz
2002-12-19 15:51 ` Elena Zannoni
2002-11-11 6:39 ` Elena Zannoni
2002-11-13 10:59 ` Michael Snyder
2 siblings, 1 reply; 16+ messages in thread
From: Daniel Jacobowitz @ 2002-11-10 20:22 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
On Sun, Nov 10, 2002 at 11:09:18PM -0500, Andrew Cagney wrote:
> >Currently, thirteen files which provide a target_ops explicitly initialize
> >members they don't support to NULL. I plan to delete a number of these
> >methods, and rather than making sure I got all the necessary target files
> >each time I just wanted to delete the unnecessary lines up-front. All of
> >these are called-once functions initializing a statically or globally
> >declared object; C will guarantee zero-initialization for us. And several
> >of the functions explicitly called memset anyway.
> >
> >Besides, this way grepping for .to_require_attach\ = will only find targets
> >which define it to something useful.
> >
> >I'll commit this tomorrow unless someone sees a problem with it.
> >
> >Note1: remote-st.c hasn't been compilable in a while; m68*-tandem-* is
> >probably a good candidate for the hitlist. From a glance it looks like it
> >has been broken since the HP merge added the NULL assignments I'm removing,
> >which is about three years now I think.
> >
> >Note2: The DONT_USE member of struct target_ops can go now.
>
> The fact that 13 files were doing it should suggest that it was
> intentional. Might want to wait a bit longer while someone dregs up the
> history.
Well, to me the fact that those thirteen files were doing it implies
it's a leftover. Look at them; the two win* one are cut-pasted from
inftarg.c; the others (except for sol-thread.c) are cut-pasted from
remote.c. And neither of those has the zeros.
But it doesn't cost me anything to wait, except for slowing down the
progress on the fork patches :) I'll give it a few days.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: PATCH: Remove unnecessary zero-initializations
2002-11-10 16:18 PATCH: Remove unnecessary zero-initializations Daniel Jacobowitz
2002-11-10 20:09 ` Andrew Cagney
@ 2002-11-11 2:48 ` Felix Lee
2002-11-11 6:33 ` Daniel Jacobowitz
2002-11-13 11:01 ` Michael Snyder
1 sibling, 2 replies; 16+ messages in thread
From: Felix Lee @ 2002-11-11 2:48 UTC (permalink / raw)
To: gdb-patches
Daniel Jacobowitz <drow@mvista.com>:
> Currently, thirteen files which provide a target_ops explicitly initialize
> members they don't support to NULL.
this is a style and readability issue. if every set of
initializations is complete and mentions all members, even
when "unnecessary", then it's easier to quickly check that
an implementation correctly matches the specification. a
statement like
foo.bar = 0;
indicates that the programmer was aware that foo.bar exists,
thought about it, and decided that 0 is a correct value.
if the statement is missing, you have to spend time deciding
if the programmer omitted it accidentally or not.
a different technique is to put a note in a comment instead
of as a statement:
// foo.bar can be 0
but this is a pointless micro-optimization, it's an
optimization a compiler could be taught how to do, and you
lose the opportunity to have an automated tool check for you
that initializations are complete.
--
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: PATCH: Remove unnecessary zero-initializations
2002-11-11 2:48 ` Felix Lee
@ 2002-11-11 6:33 ` Daniel Jacobowitz
2002-11-11 17:15 ` Felix Lee
2002-11-13 11:01 ` Michael Snyder
1 sibling, 1 reply; 16+ messages in thread
From: Daniel Jacobowitz @ 2002-11-11 6:33 UTC (permalink / raw)
To: Felix Lee; +Cc: gdb-patches
On Mon, Nov 11, 2002 at 02:48:33AM -0800, Felix Lee wrote:
> Daniel Jacobowitz <drow@mvista.com>:
> > Currently, thirteen files which provide a target_ops explicitly initialize
> > members they don't support to NULL.
>
> this is a style and readability issue. if every set of
> initializations is complete and mentions all members, even
> when "unnecessary", then it's easier to quickly check that
> an implementation correctly matches the specification. a
> statement like
> foo.bar = 0;
> indicates that the programmer was aware that foo.bar exists,
> thought about it, and decided that 0 is a correct value.
>
> if the statement is missing, you have to spend time deciding
> if the programmer omitted it accidentally or not.
>
> a different technique is to put a note in a comment instead
> of as a statement:
> // foo.bar can be 0
> but this is a pointless micro-optimization, it's an
> optimization a compiler could be taught how to do, and you
> lose the opportunity to have an automated tool check for you
> that initializations are complete.
Certainly it's a style issue. However, it's an awkward style issue and
anyone implementing a target should be looking over the complete list
of methods anyway. I stand by my patch... although perhaps not as
"obvious" after two objections.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: PATCH: Remove unnecessary zero-initializations
2002-11-10 20:09 ` Andrew Cagney
2002-11-10 20:22 ` Daniel Jacobowitz
@ 2002-11-11 6:39 ` Elena Zannoni
2002-11-13 10:59 ` Michael Snyder
2 siblings, 0 replies; 16+ messages in thread
From: Elena Zannoni @ 2002-11-11 6:39 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Daniel Jacobowitz, gdb-patches
Andrew Cagney writes:
> > Currently, thirteen files which provide a target_ops explicitly initialize
> > members they don't support to NULL. I plan to delete a number of these
> > methods, and rather than making sure I got all the necessary target files
> > each time I just wanted to delete the unnecessary lines up-front. All of
> > these are called-once functions initializing a statically or globally
> > declared object; C will guarantee zero-initialization for us. And several
> > of the functions explicitly called memset anyway.
> >
> > Besides, this way grepping for .to_require_attach\ = will only find targets
> > which define it to something useful.
> >
> > I'll commit this tomorrow unless someone sees a problem with it.
> >
> > Note1: remote-st.c hasn't been compilable in a while; m68*-tandem-* is
> > probably a good candidate for the hitlist. From a glance it looks like it
> > has been broken since the HP merge added the NULL assignments I'm removing,
> > which is about three years now I think.
> >
> > Note2: The DONT_USE member of struct target_ops can go now.
>
> The fact that 13 files were doing it should suggest that it was
> intentional. Might want to wait a bit longer while someone dregs up the
> history.
>
> Andrew
>
I remember a debate about this when the HP merge happened. Basically
the initializations were deemed unnecessary, but they were already in,
and nobody went back to clean them up. I agree with Felix that it
would help with readability if it were done consistently, but it is
not, so probably it makes things worse.
Elena
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: PATCH: Remove unnecessary zero-initializations
2002-11-11 6:33 ` Daniel Jacobowitz
@ 2002-11-11 17:15 ` Felix Lee
2002-11-12 13:44 ` Daniel Jacobowitz
2002-11-13 11:04 ` Michael Snyder
0 siblings, 2 replies; 16+ messages in thread
From: Felix Lee @ 2002-11-11 17:15 UTC (permalink / raw)
To: gdb-patches
Daniel Jacobowitz <drow@mvista.com>:
> Certainly it's a style issue. However, it's an awkward style issue and
> anyone implementing a target should be looking over the complete list
> of methods anyway.
Of course. It's not about writing the target in the first
place, it's about reading it and maintaining it later. Say,
a year from now, someone adds a new method but doesn't spend
all the effort necessary to make all N targets work
correctly with the change, which is reasonable since it's
not sensible to insist that everyone be familiar with the
issues of all N targets before doing any work.
Absence of an initializer is a simple indication that
someone should look at it and make sure it's ok. Putting in
a zero initializer is an easy sign for, "yes, this is ok".
"Always initialize all members and methods" is a simple
style rule that encourages good programming discipline in a
couple ways, and if I were in charge I'd be adding all the
missing zero initializers rather than taking away the
existing ones :)
I'm not sure why you call it "an awkward style issue". If a
block of initializers seems long, it's because an interface
is complicated, and glossing over that by making the
initialization look simpler is counter-productive. The
correct point to attack is the interface itself, not the
places it's used.
--
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: PATCH: Remove unnecessary zero-initializations
2002-11-11 17:15 ` Felix Lee
@ 2002-11-12 13:44 ` Daniel Jacobowitz
2002-11-13 11:04 ` Michael Snyder
1 sibling, 0 replies; 16+ messages in thread
From: Daniel Jacobowitz @ 2002-11-12 13:44 UTC (permalink / raw)
To: Felix Lee; +Cc: gdb-patches
On Mon, Nov 11, 2002 at 01:16:40PM -0800, Felix Lee wrote:
> Daniel Jacobowitz <drow@mvista.com>:
> > Certainly it's a style issue. However, it's an awkward style issue and
> > anyone implementing a target should be looking over the complete list
> > of methods anyway.
>
> Of course. It's not about writing the target in the first
> place, it's about reading it and maintaining it later. Say,
> a year from now, someone adds a new method but doesn't spend
> all the effort necessary to make all N targets work
> correctly with the change, which is reasonable since it's
> not sensible to insist that everyone be familiar with the
> issues of all N targets before doing any work.
Adding a method that requires changing the targets is something we try
to avoid, anyway. This should only ever result in a missing feature.
> Absence of an initializer is a simple indication that
> someone should look at it and make sure it's ok. Putting in
> a zero initializer is an easy sign for, "yes, this is ok".
>
> "Always initialize all members and methods" is a simple
> style rule that encourages good programming discipline in a
> couple ways, and if I were in charge I'd be adding all the
> missing zero initializers rather than taking away the
> existing ones :)
The problem with this is that it requires updating all targets to
remove an interface; and it requires adding NULL initializations that
no one has been interested in doing to stay current. It just drifts
further and further.
> I'm not sure why you call it "an awkward style issue". If a
> block of initializers seems long, it's because an interface
> is complicated, and glossing over that by making the
> initialization look simpler is counter-productive. The
> correct point to attack is the interface itself, not the
> places it's used.
That's what this patch is leading up to. It's so that I don't need to
grub through targets that couldn't possibly support this method every
time that I remove a dead method. I have I believe seven of them
here...
In any case, as Elena said, I believe the right approach to this is to
do it completely one way or another. I'm picking this way, which seems
to match the past consensus and current practice. Patch committed.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: PATCH: Remove unnecessary zero-initializations
2002-11-10 20:09 ` Andrew Cagney
2002-11-10 20:22 ` Daniel Jacobowitz
2002-11-11 6:39 ` Elena Zannoni
@ 2002-11-13 10:59 ` Michael Snyder
2002-11-13 11:32 ` Andrew Cagney
2 siblings, 1 reply; 16+ messages in thread
From: Michael Snyder @ 2002-11-13 10:59 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Daniel Jacobowitz, gdb-patches
Andrew Cagney wrote:
>
> > Currently, thirteen files which provide a target_ops explicitly initialize
> > members they don't support to NULL. I plan to delete a number of these
> > methods, and rather than making sure I got all the necessary target files
> > each time I just wanted to delete the unnecessary lines up-front. All of
> > these are called-once functions initializing a statically or globally
> > declared object; C will guarantee zero-initialization for us. And several
> > of the functions explicitly called memset anyway.
> >
> > Besides, this way grepping for .to_require_attach\ = will only find targets
> > which define it to something useful.
> >
> > I'll commit this tomorrow unless someone sees a problem with it.
> >
> > Note1: remote-st.c hasn't been compilable in a while; m68*-tandem-* is
> > probably a good candidate for the hitlist. From a glance it looks like it
> > has been broken since the HP merge added the NULL assignments I'm removing,
> > which is about three years now I think.
> >
> > Note2: The DONT_USE member of struct target_ops can go now.
>
> The fact that 13 files were doing it should suggest that it was
> intentional. Might want to wait a bit longer while someone dregs up the
> history.
Not necessarily. At one time it was required. Then someone
(either Stan Shebs or John Metzler, I forget) revamped the way
target vectors are created, so that it is no longer required.
These may either be legacy, or someone doing the initialization
from habit. In any case, it's definitely not required now.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: PATCH: Remove unnecessary zero-initializations
2002-11-11 2:48 ` Felix Lee
2002-11-11 6:33 ` Daniel Jacobowitz
@ 2002-11-13 11:01 ` Michael Snyder
1 sibling, 0 replies; 16+ messages in thread
From: Michael Snyder @ 2002-11-13 11:01 UTC (permalink / raw)
To: Felix Lee; +Cc: gdb-patches
Felix Lee wrote:
>
> Daniel Jacobowitz <drow@mvista.com>:
> > Currently, thirteen files which provide a target_ops explicitly initialize
> > members they don't support to NULL.
>
> this is a style and readability issue. if every set of
> initializations is complete and mentions all members, even
> when "unnecessary", then it's easier to quickly check that
> an implementation correctly matches the specification. a
> statement like
> foo.bar = 0;
> indicates that the programmer was aware that foo.bar exists,
> thought about it, and decided that 0 is a correct value.
This is counter to the intention. We made the initializations
un-necessary on purpose, so that when a new target method gets
added, you don't have to go add a new " = NULL;" to every file
that doesn't implement it.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: PATCH: Remove unnecessary zero-initializations
2002-11-11 17:15 ` Felix Lee
2002-11-12 13:44 ` Daniel Jacobowitz
@ 2002-11-13 11:04 ` Michael Snyder
2002-11-13 11:38 ` Stan Shebs
1 sibling, 1 reply; 16+ messages in thread
From: Michael Snyder @ 2002-11-13 11:04 UTC (permalink / raw)
To: Felix Lee, gdb-patches
Felix Lee wrote:
>
> Daniel Jacobowitz <drow@mvista.com>:
> > Certainly it's a style issue. However, it's an awkward style issue and
> > anyone implementing a target should be looking over the complete list
> > of methods anyway.
>
> Of course. It's not about writing the target in the first
> place, it's about reading it and maintaining it later. Say,
> a year from now, someone adds a new method but doesn't spend
> all the effort necessary to make all N targets work
> correctly with the change, which is reasonable since it's
> not sensible to insist that everyone be familiar with the
> issues of all N targets before doing any work.
>
> Absence of an initializer is a simple indication that
> someone should look at it and make sure it's ok.
No. New target methods need to be optional, else someone
will be required to go back and implement them for all old targets.
The fact that they don't need to be initialized to zero is intentional,
so that a new method does not require any modification to old targets.
If there is no initialization, and indeed no mention of the new
method at all in an old target module, you can safely conclude
that the module doesn't implement the method.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: PATCH: Remove unnecessary zero-initializations
2002-11-13 10:59 ` Michael Snyder
@ 2002-11-13 11:32 ` Andrew Cagney
2002-11-13 11:50 ` Michael Snyder
0 siblings, 1 reply; 16+ messages in thread
From: Andrew Cagney @ 2002-11-13 11:32 UTC (permalink / raw)
To: Michael Snyder; +Cc: Daniel Jacobowitz, gdb-patches
> The fact that 13 files were doing it should suggest that it was
>> intentional. Might want to wait a bit longer while someone dregs up the
>> history.
>
>
> Not necessarily. At one time it was required. Then someone
> (either Stan Shebs or John Metzler, I forget) revamped the way
> target vectors are created, so that it is no longer required.
> These may either be legacy, or someone doing the initialization
> from habit. In any case, it's definitely not required now.
I know it was John Metzler but I don't have the details of what exactly
he did. Do you?
Andrew
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: PATCH: Remove unnecessary zero-initializations
2002-11-13 11:04 ` Michael Snyder
@ 2002-11-13 11:38 ` Stan Shebs
0 siblings, 0 replies; 16+ messages in thread
From: Stan Shebs @ 2002-11-13 11:38 UTC (permalink / raw)
To: Michael Snyder; +Cc: Felix Lee, gdb-patches
Michael Snyder wrote:
>Felix Lee wrote:
>
>>Daniel Jacobowitz <drow@mvista.com>:
>>
>>>Certainly it's a style issue. However, it's an awkward style issue and
>>>anyone implementing a target should be looking over the complete list
>>>of methods anyway.
>>>
>>Of course. It's not about writing the target in the first
>>place, it's about reading it and maintaining it later. Say,
>>a year from now, someone adds a new method but doesn't spend
>>all the effort necessary to make all N targets work
>>correctly with the change, which is reasonable since it's
>>not sensible to insist that everyone be familiar with the
>>issues of all N targets before doing any work.
>>
>>Absence of an initializer is a simple indication that
>>someone should look at it and make sure it's ok.
>>
>
>No. New target methods need to be optional, else someone
>will be required to go back and implement them for all old targets.
>The fact that they don't need to be initialized to zero is intentional,
>so that a new method does not require any modification to old targets.
>If there is no initialization, and indeed no mention of the new
>method at all in an old target module, you can safely conclude
>that the module doesn't implement the method.
>
That's right. The goal was to make it follow an object-oriented style,
where when you instantiate something, you only fill in the elements
that don't have a default value.
While there's something to be said for the opposite style, on
the theory that it means you have to consider whether to implement
each method, it breaks down when the superclass (aka target
vector struct) changes, because you then have to go and modify
all the instances, including those for targets that you don't have
access to (and *nobody* has h/w for all the targets supported by
GDB!), so you're in the undesirable situation of modifying code
that you can't test.
Stan
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: PATCH: Remove unnecessary zero-initializations
2002-11-13 11:32 ` Andrew Cagney
@ 2002-11-13 11:50 ` Michael Snyder
0 siblings, 0 replies; 16+ messages in thread
From: Michael Snyder @ 2002-11-13 11:50 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Daniel Jacobowitz, gdb-patches
Andrew Cagney wrote:
>
> > The fact that 13 files were doing it should suggest that it was
> >> intentional. Might want to wait a bit longer while someone dregs up the
> >> history.
> >
> >
> > Not necessarily. At one time it was required. Then someone
> > (either Stan Shebs or John Metzler, I forget) revamped the way
> > target vectors are created, so that it is no longer required.
> > These may either be legacy, or someone doing the initialization
> > from habit. In any case, it's definitely not required now.
>
> I know it was John Metzler but I don't have the details of what exactly
> he did. Do you?
As I recall, the old method was to malloc the vector and then
explicitly initialize all the members. The new one was to
statically allocate it, so that only the non-zero members
had to be initialized. This was done so that adding new members
would be less painful.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: PATCH: Remove unnecessary zero-initializations
2002-11-10 20:22 ` Daniel Jacobowitz
@ 2002-12-19 15:51 ` Elena Zannoni
2002-12-19 15:59 ` Daniel Jacobowitz
0 siblings, 1 reply; 16+ messages in thread
From: Elena Zannoni @ 2002-12-19 15:51 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
[holiday mailbox cleaning...] Did you commit this?
Elena
Daniel Jacobowitz writes:
> On Sun, Nov 10, 2002 at 11:09:18PM -0500, Andrew Cagney wrote:
> > >Currently, thirteen files which provide a target_ops explicitly initialize
> > >members they don't support to NULL. I plan to delete a number of these
> > >methods, and rather than making sure I got all the necessary target files
> > >each time I just wanted to delete the unnecessary lines up-front. All of
> > >these are called-once functions initializing a statically or globally
> > >declared object; C will guarantee zero-initialization for us. And several
> > >of the functions explicitly called memset anyway.
> > >
> > >Besides, this way grepping for .to_require_attach\ = will only find targets
> > >which define it to something useful.
> > >
> > >I'll commit this tomorrow unless someone sees a problem with it.
> > >
> > >Note1: remote-st.c hasn't been compilable in a while; m68*-tandem-* is
> > >probably a good candidate for the hitlist. From a glance it looks like it
> > >has been broken since the HP merge added the NULL assignments I'm removing,
> > >which is about three years now I think.
> > >
> > >Note2: The DONT_USE member of struct target_ops can go now.
> >
> > The fact that 13 files were doing it should suggest that it was
> > intentional. Might want to wait a bit longer while someone dregs up the
> > history.
>
> Well, to me the fact that those thirteen files were doing it implies
> it's a leftover. Look at them; the two win* one are cut-pasted from
> inftarg.c; the others (except for sol-thread.c) are cut-pasted from
> remote.c. And neither of those has the zeros.
>
> But it doesn't cost me anything to wait, except for slowing down the
> progress on the fork patches :) I'll give it a few days.
>
> --
> Daniel Jacobowitz
> MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: PATCH: Remove unnecessary zero-initializations
2002-12-19 15:51 ` Elena Zannoni
@ 2002-12-19 15:59 ` Daniel Jacobowitz
0 siblings, 0 replies; 16+ messages in thread
From: Daniel Jacobowitz @ 2002-12-19 15:59 UTC (permalink / raw)
To: Elena Zannoni; +Cc: gdb-patches
Yep.
On Thu, Dec 19, 2002 at 06:46:07PM -0500, Elena Zannoni wrote:
>
> [holiday mailbox cleaning...] Did you commit this?
>
> Elena
>
>
>
> Daniel Jacobowitz writes:
> > On Sun, Nov 10, 2002 at 11:09:18PM -0500, Andrew Cagney wrote:
> > > >Currently, thirteen files which provide a target_ops explicitly initialize
> > > >members they don't support to NULL. I plan to delete a number of these
> > > >methods, and rather than making sure I got all the necessary target files
> > > >each time I just wanted to delete the unnecessary lines up-front. All of
> > > >these are called-once functions initializing a statically or globally
> > > >declared object; C will guarantee zero-initialization for us. And several
> > > >of the functions explicitly called memset anyway.
> > > >
> > > >Besides, this way grepping for .to_require_attach\ = will only find targets
> > > >which define it to something useful.
> > > >
> > > >I'll commit this tomorrow unless someone sees a problem with it.
> > > >
> > > >Note1: remote-st.c hasn't been compilable in a while; m68*-tandem-* is
> > > >probably a good candidate for the hitlist. From a glance it looks like it
> > > >has been broken since the HP merge added the NULL assignments I'm removing,
> > > >which is about three years now I think.
> > > >
> > > >Note2: The DONT_USE member of struct target_ops can go now.
> > >
> > > The fact that 13 files were doing it should suggest that it was
> > > intentional. Might want to wait a bit longer while someone dregs up the
> > > history.
> >
> > Well, to me the fact that those thirteen files were doing it implies
> > it's a leftover. Look at them; the two win* one are cut-pasted from
> > inftarg.c; the others (except for sol-thread.c) are cut-pasted from
> > remote.c. And neither of those has the zeros.
> >
> > But it doesn't cost me anything to wait, except for slowing down the
> > progress on the fork patches :) I'll give it a few days.
> >
> > --
> > Daniel Jacobowitz
> > MontaVista Software Debian GNU/Linux Developer
>
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2002-12-19 23:51 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-10 16:18 PATCH: Remove unnecessary zero-initializations Daniel Jacobowitz
2002-11-10 20:09 ` Andrew Cagney
2002-11-10 20:22 ` Daniel Jacobowitz
2002-12-19 15:51 ` Elena Zannoni
2002-12-19 15:59 ` Daniel Jacobowitz
2002-11-11 6:39 ` Elena Zannoni
2002-11-13 10:59 ` Michael Snyder
2002-11-13 11:32 ` Andrew Cagney
2002-11-13 11:50 ` Michael Snyder
2002-11-11 2:48 ` Felix Lee
2002-11-11 6:33 ` Daniel Jacobowitz
2002-11-11 17:15 ` Felix Lee
2002-11-12 13:44 ` Daniel Jacobowitz
2002-11-13 11:04 ` Michael Snyder
2002-11-13 11:38 ` Stan Shebs
2002-11-13 11:01 ` Michael Snyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox