This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch/rfc] Deprecate add_core_fns
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 12 Apr 2004 13:00:10 -0400
- Subject: [patch/rfc] Deprecate add_core_fns
Hello,
"regset.h", and other changes, have made this interface obsolete. I'll
commit this in a week.
Andrew
2004-04-12 Andrew Cagney <cagney@redhat.com>
* gdbcore.h: Update copyright.
(deprecated_add_core_fns): Rename add_core_fns.
* win32-nat.c (_initialize_core_win32): Update.
* sun3-nat.c (_initialize_core_sun3): Update.
* shnbsd-tdep.c (_initialize_shnbsd_tdep): Update.
* rs6000-nat.c (_initialize_core_rs6000): Update.
* ppcnbsd-tdep.c (_initialize_ppcnbsd_tdep): Update.
* nto-tdep.c (_initialize_nto_tdep): Update.
* ns32knbsd-nat.c (_initialize_ns32knbsd_nat): Update.
* mipsnbsd-tdep.c (_initialize_mipsnbsd_tdep): Update.
* mips-nat.c (_initialize_core_mips): Update.
* mips-linux-tdep.c (_initialize_mips_linux_tdep): Update.
* m68knbsd-nat.c (_initialize_m68knbsd_nat): Update.
* m68klinux-nat.c (_initialize_m68k_linux_nat): Update.
* lynx-nat.c (_initialize_core_lynx): Update.
* irix5-nat.c (_initialize_core_irix5): Update.
* i386-interix-nat.c (_initialize_core_interix): Update.
* cris-tdep.c (_initialize_cris_tdep): Update.
* corelow.c (deprecated_add_core_fns): Update.
* core-regset.c (_initialize_core_regset): Update.
* core-aout.c (_initialize_core_aout): Update.
* armnbsd-nat.c (_initialize_arm_netbsd_nat): Update.
* alphanbsd-tdep.c (_initialize_alphanbsd_tdep): Update.
* alpha-nat.c (_initialize_core_alpha): Update.
Index: alpha-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/alpha-nat.c,v
retrieving revision 1.20
diff -u -r1.20 alpha-nat.c
--- alpha-nat.c 14 Sep 2003 16:32:12 -0000 1.20
+++ alpha-nat.c 12 Apr 2004 16:56:30 -0000
@@ -267,6 +267,6 @@
void
_initialize_core_alpha (void)
{
- add_core_fns (&alpha_osf_core_fns);
- add_core_fns (&alpha_elf_core_fns);
+ deprecated_add_core_fns (&alpha_osf_core_fns);
+ deprecated_add_core_fns (&alpha_elf_core_fns);
}
Index: alphanbsd-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/alphanbsd-tdep.c,v
retrieving revision 1.19
diff -u -r1.19 alphanbsd-tdep.c
--- alphanbsd-tdep.c 23 Mar 2004 14:47:55 -0000 1.19
+++ alphanbsd-tdep.c 12 Apr 2004 16:56:30 -0000
@@ -229,6 +229,6 @@
gdbarch_register_osabi (bfd_arch_alpha, 0, GDB_OSABI_OPENBSD_ELF,
alphanbsd_init_abi);
- add_core_fns (&alphanbsd_core_fns);
- add_core_fns (&alphanbsd_elfcore_fns);
+ deprecated_add_core_fns (&alphanbsd_core_fns);
+ deprecated_add_core_fns (&alphanbsd_elfcore_fns);
}
Index: armnbsd-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/armnbsd-nat.c,v
retrieving revision 1.8
diff -u -r1.8 armnbsd-nat.c
--- armnbsd-nat.c 21 Feb 2002 12:19:55 -0000 1.8
+++ armnbsd-nat.c 12 Apr 2004 16:56:30 -0000
@@ -459,6 +459,6 @@
void
_initialize_arm_netbsd_nat (void)
{
- add_core_fns (&arm_netbsd_core_fns);
- add_core_fns (&arm_netbsd_elfcore_fns);
+ deprecated_add_core_fns (&arm_netbsd_core_fns);
+ deprecated_add_core_fns (&arm_netbsd_elfcore_fns);
}
Index: core-aout.c
===================================================================
RCS file: /cvs/src/src/gdb/core-aout.c,v
retrieving revision 1.7
diff -u -r1.7 core-aout.c
--- core-aout.c 13 Mar 2001 23:31:13 -0000 1.7
+++ core-aout.c 12 Apr 2004 16:56:30 -0000
@@ -142,5 +142,5 @@
void
_initialize_core_aout (void)
{
- add_core_fns (&aout_core_fns);
+ deprecated_add_core_fns (&aout_core_fns);
}
Index: core-regset.c
===================================================================
RCS file: /cvs/src/src/gdb/core-regset.c,v
retrieving revision 1.9
diff -u -r1.9 core-regset.c
--- core-regset.c 19 Apr 2003 12:00:48 -0000 1.9
+++ core-regset.c 12 Apr 2004 16:56:30 -0000
@@ -115,5 +115,5 @@
void
_initialize_core_regset (void)
{
- add_core_fns (®set_core_fns);
+ deprecated_add_core_fns (®set_core_fns);
}
Index: corelow.c
===================================================================
RCS file: /cvs/src/src/gdb/corelow.c,v
retrieving revision 1.37
diff -u -r1.37 corelow.c
--- corelow.c 10 Apr 2004 09:49:21 -0000 1.37
+++ corelow.c 12 Apr 2004 16:56:30 -0000
@@ -50,9 +50,9 @@
#define O_BINARY 0
#endif
-/* List of all available core_fns. On gdb startup, each core file register
- reader calls add_core_fns() to register information on each core format it
- is prepared to read. */
+/* List of all available core_fns. On gdb startup, each core file
+ register reader calls deprecated_add_core_fns() to register
+ information on each core format it is prepared to read. */
static struct core_fns *core_file_fns = NULL;
@@ -104,7 +104,7 @@
handle. */
void
-add_core_fns (struct core_fns *cf)
+deprecated_add_core_fns (struct core_fns *cf)
{
cf->next = core_file_fns;
core_file_fns = cf;
Index: cris-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/cris-tdep.c,v
retrieving revision 1.104
diff -u -r1.104 cris-tdep.c
--- cris-tdep.c 15 Mar 2004 20:32:54 -0000 1.104
+++ cris-tdep.c 12 Apr 2004 16:56:31 -0000
@@ -3645,7 +3645,7 @@
"Note that this displays the address after the jump to the "
"subroutine.", &cmdlist);
- add_core_fns (&cris_elf_core_fns);
+ deprecated_add_core_fns (&cris_elf_core_fns);
}
Index: gdbcore.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbcore.h,v
retrieving revision 1.12
diff -u -r1.12 gdbcore.h
--- gdbcore.h 12 Apr 2003 17:41:25 -0000 1.12
+++ gdbcore.h 12 Apr 2004 16:56:31 -0000
@@ -1,6 +1,8 @@
/* Machine independent variables that describe the core file under GDB.
- Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
- 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+ Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
+ 1996, 1997, 1998, 1999, 2000, 2001, 2004 Free Software Foundation,
+ Inc.
This file is part of GDB.
@@ -194,15 +196,18 @@
unsigned core_reg_size,
int which, CORE_ADDR reg_addr);
- /* Finds the next struct core_fns. They are allocated and initialized
- in whatever module implements the functions pointed to; an
- initializer calls add_core_fns to add them to the global chain. */
+ /* Finds the next struct core_fns. They are allocated and
+ initialized in whatever module implements the functions pointed
+ to; an initializer calls deprecated_add_core_fns to add them to
+ the global chain. */
struct core_fns *next;
};
-extern void add_core_fns (struct core_fns *cf);
+/* NOTE: cagney/2004-04-05: Replaced by "regset.h" and
+ regset_from_core_section(). */
+extern void deprecated_add_core_fns (struct core_fns *cf);
extern int default_core_sniffer (struct core_fns *cf, bfd * abfd);
extern int default_check_format (bfd * abfd);
Index: i386-interix-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-interix-nat.c,v
retrieving revision 1.3
diff -u -r1.3 i386-interix-nat.c
--- i386-interix-nat.c 28 Sep 2003 13:35:44 -0000 1.3
+++ i386-interix-nat.c 12 Apr 2004 16:56:31 -0000
@@ -148,7 +148,7 @@
void
_initialize_core_interix (void)
{
- add_core_fns (&interix_core_fns);
+ deprecated_add_core_fns (&interix_core_fns);
}
/* We don't have a /proc/pid/file or /proc/pid/exe to read a link from,
Index: irix5-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/irix5-nat.c,v
retrieving revision 1.29
diff -u -r1.29 irix5-nat.c
--- irix5-nat.c 17 Dec 2003 06:19:29 -0000 1.29
+++ irix5-nat.c 12 Apr 2004 16:56:31 -0000
@@ -277,5 +277,5 @@
void
_initialize_core_irix5 (void)
{
- add_core_fns (&irix5_core_fns);
+ deprecated_add_core_fns (&irix5_core_fns);
}
Index: lynx-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/lynx-nat.c,v
retrieving revision 1.18
diff -u -r1.18 lynx-nat.c
--- lynx-nat.c 17 Jan 2004 18:24:15 -0000 1.18
+++ lynx-nat.c 12 Apr 2004 16:56:31 -0000
@@ -620,5 +620,5 @@
void
_initialize_core_lynx (void)
{
- add_core_fns (&lynx_core_fns);
+ deprecated_add_core_fns (&lynx_core_fns);
}
Index: m68klinux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/m68klinux-nat.c,v
retrieving revision 1.22
diff -u -r1.22 m68klinux-nat.c
--- m68klinux-nat.c 18 Sep 2003 22:39:21 -0000 1.22
+++ m68klinux-nat.c 12 Apr 2004 16:56:32 -0000
@@ -617,5 +617,5 @@
void
_initialize_m68k_linux_nat (void)
{
- add_core_fns (&linux_elf_core_fns);
+ deprecated_add_core_fns (&linux_elf_core_fns);
}
Index: m68knbsd-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/m68knbsd-nat.c,v
retrieving revision 1.10
diff -u -r1.10 m68knbsd-nat.c
--- m68knbsd-nat.c 17 Sep 2003 14:24:30 -0000 1.10
+++ m68knbsd-nat.c 12 Apr 2004 16:56:32 -0000
@@ -99,5 +99,5 @@
void
_initialize_m68knbsd_nat (void)
{
- add_core_fns (&m68knbsd_core_fns);
+ deprecated_add_core_fns (&m68knbsd_core_fns);
}
Index: mips-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-linux-tdep.c,v
retrieving revision 1.22
diff -u -r1.22 mips-linux-tdep.c
--- mips-linux-tdep.c 8 Apr 2004 20:03:52 -0000 1.22
+++ mips-linux-tdep.c 12 Apr 2004 16:56:32 -0000
@@ -1166,5 +1166,5 @@
mips_linux_init_abi);
}
- add_core_fns (®set_core_fns);
+ deprecated_add_core_fns (®set_core_fns);
}
Index: mips-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-nat.c,v
retrieving revision 1.16
diff -u -r1.16 mips-nat.c
--- mips-nat.c 16 Nov 2003 19:24:04 -0000 1.16
+++ mips-nat.c 12 Apr 2004 16:56:32 -0000
@@ -250,5 +250,5 @@
void
_initialize_core_mips (void)
{
- add_core_fns (&mips_core_fns);
+ deprecated_add_core_fns (&mips_core_fns);
}
Index: mipsnbsd-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mipsnbsd-tdep.c,v
retrieving revision 1.10
diff -u -r1.10 mipsnbsd-tdep.c
--- mipsnbsd-tdep.c 23 Mar 2004 14:47:56 -0000 1.10
+++ mipsnbsd-tdep.c 12 Apr 2004 16:56:32 -0000
@@ -366,6 +366,6 @@
gdbarch_register_osabi (bfd_arch_mips, 0, GDB_OSABI_NETBSD_ELF,
mipsnbsd_init_abi);
- add_core_fns (&mipsnbsd_core_fns);
- add_core_fns (&mipsnbsd_elfcore_fns);
+ deprecated_add_core_fns (&mipsnbsd_core_fns);
+ deprecated_add_core_fns (&mipsnbsd_elfcore_fns);
}
Index: ns32knbsd-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/ns32knbsd-nat.c,v
retrieving revision 1.12
diff -u -r1.12 ns32knbsd-nat.c
--- ns32knbsd-nat.c 17 Sep 2003 14:24:30 -0000 1.12
+++ ns32knbsd-nat.c 12 Apr 2004 16:56:32 -0000
@@ -182,7 +182,7 @@
void
_initialize_ns32knbsd_nat (void)
{
- add_core_fns (&nat_core_fns);
+ deprecated_add_core_fns (&nat_core_fns);
}
Index: nto-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/nto-tdep.c,v
retrieving revision 1.6
diff -u -r1.6 nto-tdep.c
--- nto-tdep.c 17 Jun 2003 18:30:48 -0000 1.6
+++ nto-tdep.c 12 Apr 2004 16:56:32 -0000
@@ -333,5 +333,5 @@
#endif
/* Register core file support. */
- add_core_fns (®set_core_fns);
+ deprecated_add_core_fns (®set_core_fns);
}
Index: ppcnbsd-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ppcnbsd-tdep.c,v
retrieving revision 1.12
diff -u -r1.12 ppcnbsd-tdep.c
--- ppcnbsd-tdep.c 23 Mar 2004 14:47:56 -0000 1.12
+++ ppcnbsd-tdep.c 12 Apr 2004 16:56:32 -0000
@@ -245,6 +245,6 @@
gdbarch_register_osabi (bfd_arch_powerpc, 0, GDB_OSABI_NETBSD_ELF,
ppcnbsd_init_abi);
- add_core_fns (&ppcnbsd_core_fns);
- add_core_fns (&ppcnbsd_elfcore_fns);
+ deprecated_add_core_fns (&ppcnbsd_core_fns);
+ deprecated_add_core_fns (&ppcnbsd_elfcore_fns);
}
Index: rs6000-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-nat.c,v
retrieving revision 1.38
diff -u -r1.38 rs6000-nat.c
--- rs6000-nat.c 17 Jan 2004 00:00:48 -0000 1.38
+++ rs6000-nat.c 12 Apr 2004 16:56:33 -0000
@@ -1223,5 +1223,5 @@
starting a child process. */
rs6000_set_host_arch_hook = set_host_arch;
- add_core_fns (&rs6000_core_fns);
+ deprecated_add_core_fns (&rs6000_core_fns);
}
Index: shnbsd-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/shnbsd-tdep.c,v
retrieving revision 1.10
diff -u -r1.10 shnbsd-tdep.c
--- shnbsd-tdep.c 23 Mar 2004 14:47:59 -0000 1.10
+++ shnbsd-tdep.c 12 Apr 2004 16:56:33 -0000
@@ -186,8 +186,8 @@
void
_initialize_shnbsd_tdep (void)
{
- add_core_fns (&shnbsd_core_fns);
- add_core_fns (&shnbsd_elfcore_fns);
+ deprecated_add_core_fns (&shnbsd_core_fns);
+ deprecated_add_core_fns (&shnbsd_elfcore_fns);
gdbarch_register_osabi (bfd_arch_sh, 0, GDB_OSABI_NETBSD_ELF,
shnbsd_init_abi);
Index: sun3-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/sun3-nat.c,v
retrieving revision 1.11
diff -u -r1.11 sun3-nat.c
--- sun3-nat.c 17 Sep 2003 14:24:31 -0000 1.11
+++ sun3-nat.c 12 Apr 2004 16:56:33 -0000
@@ -162,5 +162,5 @@
void
_initialize_core_sun3 (void)
{
- add_core_fns (&sun3_core_fns);
+ deprecated_add_core_fns (&sun3_core_fns);
}
Index: win32-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/win32-nat.c,v
retrieving revision 1.87
diff -u -r1.87 win32-nat.c
--- win32-nat.c 5 Jan 2004 19:53:08 -0000 1.87
+++ win32-nat.c 12 Apr 2004 16:56:33 -0000
@@ -2427,7 +2427,7 @@
void
_initialize_core_win32 (void)
{
- add_core_fns (&win32_elf_core_fns);
+ deprecated_add_core_fns (&win32_elf_core_fns);
}
void