* mips-linux-tdep.c: Adjust formatting throughout.
[deliverable/binutils-gdb.git] / gdb / corelow.c
index a98ae548fe1ab2216f8df2d005ee1a438fcf8a96..0bfa7431d74e91a3b51318a6bfc30983144d097c 100644 (file)
@@ -46,6 +46,8 @@
 #include "progspace.h"
 #include "objfiles.h"
 #include "gdb_bfd.h"
+#include "completer.h"
+#include "filestuff.h"
 
 #ifndef O_LARGEFILE
 #define O_LARGEFILE 0
@@ -85,7 +87,7 @@ static void core_open (char *, int);
 
 static void core_detach (struct target_ops *ops, char *, int);
 
-static void core_close (int);
+static void core_close (void);
 
 static void core_close_cleanup (void *ignore);
 
@@ -192,7 +194,7 @@ gdb_check_format (bfd *abfd)
    stack spaces as empty.  */
 
 static void
-core_close (int quitting)
+core_close (void)
 {
   if (core_bfd)
     {
@@ -223,7 +225,7 @@ core_close (int quitting)
 static void
 core_close_cleanup (void *ignore)
 {
-  core_close (0/*ignored*/);
+  core_close ();
 }
 
 /* Look for sections whose names start with `.reg/' so that we can
@@ -311,7 +313,7 @@ core_open (char *filename, int from_tty)
     flags |= O_RDWR;
   else
     flags |= O_RDONLY;
-  scratch_chan = open (filename, flags, 0);
+  scratch_chan = gdb_open_cloexec (filename, flags, 0);
   if (scratch_chan < 0)
     perror_with_name (filename);
 
@@ -465,24 +467,6 @@ core_detach (struct target_ops *ops, char *args, int from_tty)
     printf_filtered (_("No core file now.\n"));
 }
 
-#ifdef DEPRECATED_IBM6000_TARGET
-
-/* Resize the core memory's section table, by NUM_ADDED.  Returns a
-   pointer into the first new slot.  This will not be necessary when
-   the rs6000 target is converted to use the standard solib
-   framework.  */
-
-struct target_section *
-deprecated_core_resize_section_table (int num_added)
-{
-  int old_count;
-
-  old_count = resize_section_table (core_data, num_added);
-  return core_data->sections + old_count;
-}
-
-#endif
-
 /* Try to retrieve registers from a section in core_bfd, and supply
    them to core_vec->core_read_registers, as the register set numbered
    WHICH.
@@ -772,6 +756,18 @@ core_xfer_partial (struct target_ops *ops, enum target_object object,
        }
       /* FALL THROUGH */
 
+    case TARGET_OBJECT_LIBRARIES_AIX:
+      if (core_gdbarch
+         && gdbarch_core_xfer_shared_libraries_aix_p (core_gdbarch))
+       {
+         if (writebuf)
+           return -1;
+         return
+           gdbarch_core_xfer_shared_libraries_aix (core_gdbarch,
+                                                   readbuf, offset, len);
+       }
+      /* FALL THROUGH */
+
     case TARGET_OBJECT_SPU:
       if (readbuf && annex)
        {
@@ -977,5 +973,5 @@ _initialize_corelow (void)
 {
   init_core_ops ();
 
-  add_target (&core_ops);
+  add_target_with_completer (&core_ops, filename_completer);
 }
This page took 0.024754 seconds and 4 git commands to generate.