Don't write to inferior_ptid in nto-procfs.c
[deliverable/binutils-gdb.git] / bfd / trad-core.c
index 9e44802ca94d52937fcf703f220402513b08f1ef..1b2477a4c588c2ce371331dd1a0bdbb979e49d5f 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back end for traditional Unix core files (U-area and raw sections)
 /* BFD back end for traditional Unix core files (U-area and raw sections)
-   Copyright (C) 1988-2017 Free Software Foundation, Inc.
+   Copyright (C) 1988-2020 Free Software Foundation, Inc.
    Written by John Gilmore of Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
    Written by John Gilmore of Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -71,13 +71,13 @@ struct trad_core_struct
 
 /* Handle 4.2-style (and perhaps also sysV-style) core dump file.  */
 
 
 /* Handle 4.2-style (and perhaps also sysV-style) core dump file.  */
 
-static const bfd_target *
+static bfd_cleanup
 trad_unix_core_file_p (bfd *abfd)
 {
   int val;
   struct user u;
   struct trad_core_struct *rawptr;
 trad_unix_core_file_p (bfd *abfd)
 {
   int val;
   struct user u;
   struct trad_core_struct *rawptr;
-  bfd_size_type amt;
+  size_t amt;
   flagword flags;
 
 #ifdef TRAD_CORE_USER_OFFSET
   flagword flags;
 
 #ifdef TRAD_CORE_USER_OFFSET
@@ -220,7 +220,7 @@ trad_unix_core_file_p (bfd *abfd)
   core_datasec (abfd)->alignment_power = 2;
   core_regsec (abfd)->alignment_power = 2;
 
   core_datasec (abfd)->alignment_power = 2;
   core_regsec (abfd)->alignment_power = 2;
 
-  return abfd->xvec;
+  return _bfd_no_cleanup;
 
  fail:
   bfd_release (abfd, abfd->tdata.any);
 
  fail:
   bfd_release (abfd, abfd->tdata.any);
@@ -293,12 +293,16 @@ const bfd_target core_trad_vec =
       trad_unix_core_file_p            /* a core file */
     },
     {                          /* bfd_set_format */
       trad_unix_core_file_p            /* a core file */
     },
     {                          /* bfd_set_format */
-      bfd_false, bfd_false,
-      bfd_false, bfd_false
+      _bfd_bool_bfd_false_error,
+      _bfd_bool_bfd_false_error,
+      _bfd_bool_bfd_false_error,
+      _bfd_bool_bfd_false_error
     },
     {                          /* bfd_write_contents */
     },
     {                          /* bfd_write_contents */
-      bfd_false, bfd_false,
-      bfd_false, bfd_false
+      _bfd_bool_bfd_false_error,
+      _bfd_bool_bfd_false_error,
+      _bfd_bool_bfd_false_error,
+      _bfd_bool_bfd_false_error
     },
 
     BFD_JUMP_TABLE_GENERIC (_bfd_generic),
     },
 
     BFD_JUMP_TABLE_GENERIC (_bfd_generic),
This page took 0.025249 seconds and 4 git commands to generate.