This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] Eliminate inftarg_set_*


Hello,

This eliminates the two inftarg_set_* methods - inferior inheritance makes them unnecessary. As a tempoary hack, I replaced the remaining calls with direct assignments (remember, I'm about to deprecate child_ops).

committed,
Andrew
2004-09-29  Andrew Cagney  <cagney@gnu.org>

	* inftarg.c (inftarg_set_find_memory_regions) 
	(inftarg_set_make_corefile_notes): Delete functions.
	(_initialize_linux_nat): Inline calls.

Index: inftarg.c
===================================================================
RCS file: /cvs/src/src/gdb/inftarg.c,v
retrieving revision 1.28
diff -p -u -r1.28 inftarg.c
--- inftarg.c	29 Sep 2004 13:54:32 -0000	1.28
+++ inftarg.c	29 Sep 2004 14:18:58 -0000
@@ -650,24 +650,6 @@ init_child_ops (void)
   child_ops.to_magic = OPS_MAGIC;
 }
 
-/* Take over the 'find_mapped_memory' vector from inftarg.c. */
-extern void
-inftarg_set_find_memory_regions (int (*func) (int (*) (CORE_ADDR,
-						       unsigned long,
-						       int, int, int,
-						       void *),
-					      void *))
-{
-  child_ops.to_find_memory_regions = func;
-}
-
-/* Take over the 'make_corefile_notes' vector from inftarg.c. */
-extern void
-inftarg_set_make_corefile_notes (char * (*func) (bfd *, int *))
-{
-  child_ops.to_make_corefile_notes = func;
-}
-
 void
 _initialize_inftarg (void)
 {
Index: linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/linux-nat.c,v
retrieving revision 1.10
diff -p -u -r1.10 linux-nat.c
--- linux-nat.c	29 Sep 2004 13:54:32 -0000	1.10
+++ linux-nat.c	29 Sep 2004 14:18:59 -0000
@@ -3011,11 +3011,9 @@ _initialize_linux_nat (void)
 {
   struct sigaction action;
   extern void thread_db_init (struct target_ops *);
-  extern void inftarg_set_find_memory_regions ();
-  extern void inftarg_set_make_corefile_notes ();
 
-  inftarg_set_find_memory_regions (linux_nat_find_memory_regions);
-  inftarg_set_make_corefile_notes (linux_nat_make_corefile_notes);
+  child_ops.to_find_memory_regions = linux_nat_find_memory_regions;
+  child_ops.to_make_corefile_notes = linux_nat_make_corefile_notes;
 
   add_info ("proc", linux_nat_info_proc_cmd,
 	    "Show /proc process information about any running process.\n\

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]