Add target_ops argument to to_make_corefile_notes
authorTom Tromey <tromey@redhat.com>
Wed, 18 Dec 2013 04:35:52 +0000 (21:35 -0700)
committerTom Tromey <tromey@redhat.com>
Wed, 19 Feb 2014 14:46:00 +0000 (07:46 -0700)
2014-02-19  Tom Tromey  <tromey@redhat.com>

* target.h (struct target_ops) <to_make_corefile_notes>: Add
argument.
(target_make_corefile_notes): Add argument.
* target.c (dummy_make_corefile_notes): Add 'self' argument.
* procfs.c (procfs_make_note_section): Add 'self' argument.
(procfs_make_note_section): Add 'self' argument.
(procfs_make_note_section): Add 'self' argument.
* linux-nat.c (linux_nat_make_corefile_notes): Add 'self'
argument.
* fbsd-nat.h (fbsd_make_corefile_notes): Add 'self' argument.
* fbsd-nat.c (fbsd_make_corefile_notes): Add 'self' argument.
* exec.c (exec_make_note_section): Add 'self' argument.
(exec_make_note_section): Add 'self' argument.

gdb/ChangeLog
gdb/exec.c
gdb/fbsd-nat.c
gdb/fbsd-nat.h
gdb/linux-nat.c
gdb/procfs.c
gdb/target.c
gdb/target.h

index 7cade09543acd8b6e5563307f78de975c8d9cf17..1d0550f09e1de873f661becaa9bcfb9a2d27cf8e 100644 (file)
@@ -1,3 +1,19 @@
+2014-02-19  Tom Tromey  <tromey@redhat.com>
+
+       * target.h (struct target_ops) <to_make_corefile_notes>: Add
+       argument.
+       (target_make_corefile_notes): Add argument.
+       * target.c (dummy_make_corefile_notes): Add 'self' argument.
+       * procfs.c (procfs_make_note_section): Add 'self' argument.
+       (procfs_make_note_section): Add 'self' argument.
+       (procfs_make_note_section): Add 'self' argument.
+       * linux-nat.c (linux_nat_make_corefile_notes): Add 'self'
+       argument.
+       * fbsd-nat.h (fbsd_make_corefile_notes): Add 'self' argument.
+       * fbsd-nat.c (fbsd_make_corefile_notes): Add 'self' argument.
+       * exec.c (exec_make_note_section): Add 'self' argument.
+       (exec_make_note_section): Add 'self' argument.
+
 2014-02-19  Tom Tromey  <tromey@redhat.com>
 
        * target.h (struct target_ops) <to_find_memory_regions>: Add
index f3df4b1b2919406e401dcefd207123eb3a8b5757..61dea49e2d9a9838d0c1d5042a00c26950c0b007 100644 (file)
@@ -849,7 +849,7 @@ exec_find_memory_regions (struct target_ops *self,
   return exec_do_find_memory_regions (func, data);
 }
 
-static char *exec_make_note_section (bfd *, int *);
+static char *exec_make_note_section (struct target_ops *self, bfd *, int *);
 
 /* Fill in the exec file target vector.  Very few entries need to be
    defined.  */
@@ -921,7 +921,7 @@ Show writing into executable and core files."), NULL,
 }
 
 static char *
-exec_make_note_section (bfd *obfd, int *note_size)
+exec_make_note_section (struct target_ops *self, bfd *obfd, int *note_size)
 {
   error (_("Can't create a corefile"));
 }
index dc6d76d753319ae1deef16d0861404e1f6df5fcc..a2a1f60ec4b4a2f3c1a2e09199182f7beeb93bf2 100644 (file)
@@ -167,7 +167,7 @@ find_stop_signal (void)
    allocated memory.  */
 
 char *
-fbsd_make_corefile_notes (bfd *obfd, int *note_size)
+fbsd_make_corefile_notes (struct target_ops *self, bfd *obfd, int *note_size)
 {
   const struct regcache *regcache = get_current_regcache ();
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
index 7ed89464e26e20ebcfaa5499c194c2b30875b910..a3f51d65cebdff53ec4a4740eb0b4d9eead7df88 100644 (file)
@@ -35,6 +35,7 @@ extern int fbsd_find_memory_regions (struct target_ops *self,
 /* Create appropriate note sections for a corefile, returning them in
    allocated memory.  */
 
-extern char *fbsd_make_corefile_notes (bfd *obfd, int *note_size);
+extern char *fbsd_make_corefile_notes (struct target_ops *self,
+                                      bfd *obfd, int *note_size);
 
 #endif /* fbsd-nat.h */
index cb8b3bd83adad15879af38df5ea1f21c2468a981..5bb89c1894706339a624a98cf36cf133fa5949e9 100644 (file)
@@ -4097,7 +4097,8 @@ linux_nat_collect_thread_registers (const struct regcache *regcache,
    section for a corefile, and returns it in a malloc buffer.  */
 
 static char *
-linux_nat_make_corefile_notes (bfd *obfd, int *note_size)
+linux_nat_make_corefile_notes (struct target_ops *self,
+                              bfd *obfd, int *note_size)
 {
   /* FIXME: uweigand/2011-10-06: Once all GNU/Linux architectures have been
      converted to gdbarch_core_regset_sections, this function can go away.  */
index 360a5155a317f5fcede44dc9abc73bf4f160f3f6..822e1e0a1df0d9d58b3a052770e1156f02fd4d51 100644 (file)
@@ -140,7 +140,8 @@ static char *procfs_pid_to_str (struct target_ops *, ptid_t);
 static int proc_find_memory_regions (struct target_ops *self,
                                     find_memory_region_ftype, void *);
 
-static char * procfs_make_note_section (bfd *, int *);
+static char * procfs_make_note_section (struct target_ops *self,
+                                       bfd *, int *);
 
 static int procfs_can_use_hw_breakpoint (struct target_ops *self,
                                         int, int, int);
@@ -5475,7 +5476,7 @@ find_stop_signal (void)
 }
 
 static char *
-procfs_make_note_section (bfd *obfd, int *note_size)
+procfs_make_note_section (struct target_ops *self, bfd *obfd, int *note_size)
 {
   struct cleanup *old_chain;
   gdb_gregset_t gregs;
@@ -5545,7 +5546,7 @@ procfs_make_note_section (bfd *obfd, int *note_size)
 }
 #else /* !Solaris */
 static char *
-procfs_make_note_section (bfd *obfd, int *note_size)
+procfs_make_note_section (struct target_ops *self, bfd *obfd, int *note_size)
 {
   error (_("gcore not implemented for this host."));
   return NULL; /* lint */
index fd4f62d8154f19fbc37666cc4107fabdb639797e..4d193c9abb7352f39b3af6d85d5d0e3468178e4c 100644 (file)
@@ -3779,7 +3779,8 @@ dummy_find_memory_regions (struct target_ops *self,
 
 /* Error-catcher for target_make_corefile_notes.  */
 static char *
-dummy_make_corefile_notes (bfd *ignore1, int *ignore2)
+dummy_make_corefile_notes (struct target_ops *self,
+                          bfd *ignore1, int *ignore2)
 {
   error (_("Command not implemented for this target."));
   return NULL;
index 8f7d38c94086db3f14405823493da7cc8c0e0f79..7faf059624dce6f941dc1cf2623cdfe033d18eac 100644 (file)
@@ -550,7 +550,7 @@ struct target_ops
     int (*to_find_memory_regions) (struct target_ops *,
                                   find_memory_region_ftype func, void *data);
     /* make_corefile_notes support method for gcore */
-    char * (*to_make_corefile_notes) (bfd *, int *);
+    char * (*to_make_corefile_notes) (struct target_ops *, bfd *, int *);
     /* get_bookmark support method for bookmarks */
     gdb_byte * (*to_get_bookmark) (char *, int);
     /* goto_bookmark support method for bookmarks */
@@ -1568,7 +1568,7 @@ extern char *target_thread_name (struct thread_info *);
  */
 
 #define target_make_corefile_notes(BFD, SIZE_P) \
-     (current_target.to_make_corefile_notes) (BFD, SIZE_P)
+     (current_target.to_make_corefile_notes) (&current_target, BFD, SIZE_P)
 
 /* Bookmark interfaces.  */
 #define target_get_bookmark(ARGS, FROM_TTY) \
This page took 0.050802 seconds and 4 git commands to generate.