-/* Link a new core_fns into the global core_file_fns list. Called on
- gdb startup by the _initialize routine in each core file register
- reader, to register information about each format the reader is
- prepared to handle. */
-
-void
-deprecated_add_core_fns (struct core_fns *cf)
-{
- cf->next = core_file_fns;
- core_file_fns = cf;
-}
-
-/* The default function that core file handlers can use to examine a
- core file BFD and decide whether or not to accept the job of
- reading the core file. */
-
-int
-default_core_sniffer (struct core_fns *our_fns, bfd *abfd)
-{
- int result;
-
- result = (bfd_get_flavour (abfd) == our_fns -> core_flavour);
- return (result);
-}
-
-/* Walk through the list of core functions to find a set that can
- handle the core file open on ABFD. Returns pointer to set that is
- selected. */
-
-static struct core_fns *
-sniff_core_bfd (struct gdbarch *core_gdbarch, bfd *abfd)
-{
- struct core_fns *cf;
- struct core_fns *yummy = NULL;
- int matches = 0;
-
- /* Don't sniff if we have support for register sets in
- CORE_GDBARCH. */
- if (core_gdbarch && gdbarch_iterate_over_regset_sections_p (core_gdbarch))
- return NULL;
-
- for (cf = core_file_fns; cf != NULL; cf = cf->next)
- {
- if (cf->core_sniffer (cf, abfd))
- {
- yummy = cf;
- matches++;
- }
- }
- if (matches > 1)
- {
- warning (_("\"%s\": ambiguous core format, %d handlers match"),
- bfd_get_filename (abfd), matches);
- }
- else if (matches == 0)
- error (_("\"%s\": no core file handler recognizes format"),
- bfd_get_filename (abfd));
-
- return (yummy);
-}
-
-/* The default is to reject every core file format we see. Either
- BFD has to recognize it, or we have to provide a function in the
- core file handler that recognizes it. */
-
-int
-default_check_format (bfd *abfd)
-{
- return (0);
-}
-
-/* Attempt to recognize core file formats that BFD rejects. */
-
-static int
-gdb_check_format (bfd *abfd)
-{
- struct core_fns *cf;
-
- for (cf = core_file_fns; cf != NULL; cf = cf->next)
- {
- if (cf->check_format (abfd))
- {
- return (1);
- }
- }
- return (0);
-}
-