diff options
Diffstat (limited to 'gdb/corelow.c')
-rw-r--r-- | gdb/corelow.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/gdb/corelow.c b/gdb/corelow.c index f98814a..3e0c7cd 100644 --- a/gdb/corelow.c +++ b/gdb/corelow.c @@ -129,8 +129,7 @@ default_core_sniffer (struct core_fns *our_fns, bfd *abfd) } /* Walk through the list of core functions to find a set that can - handle the core file open on ABFD. Default to the first one in the - list if nothing matches. Returns pointer to set that is + handle the core file open on ABFD. Returns pointer to set that is selected. */ static struct core_fns * @@ -159,15 +158,9 @@ sniff_core_bfd (bfd *abfd) bfd_get_filename (abfd), matches); } else if (matches == 0) - { - warning (_("\"%s\": no core file handler " - "recognizes format, using default"), - bfd_get_filename (abfd)); - } - if (yummy == NULL) - { - yummy = core_file_fns; - } + error (_("\"%s\": no core file handler recognizes format"), + bfd_get_filename (abfd)); + return (yummy); } @@ -211,15 +204,19 @@ core_close (int quitting) int pid = ptid_get_pid (inferior_ptid); inferior_ptid = null_ptid; /* Avoid confusion from thread stuff. */ - exit_inferior_silent (pid); + if (pid != 0) + exit_inferior_silent (pid); /* Clear out solib state while the bfd is still open. See comments in clear_solib in solib.c. */ clear_solib (); - xfree (core_data->sections); - xfree (core_data); - core_data = NULL; + if (core_data) + { + xfree (core_data->sections); + xfree (core_data); + core_data = NULL; + } core_has_fake_pid = 0; name = bfd_get_filename (core_bfd); |