+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
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. */
}
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"));
}
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);
/* 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 */
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. */
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);
}
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;
}
#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 */
/* 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;
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 */
*/
#define target_make_corefile_notes(BFD, SIZE_P) \
- (current_target.to_make_corefile_notes) (BFD, SIZE_P)
+ (current_target.to_make_corefile_notes) (¤t_target, BFD, SIZE_P)
/* Bookmark interfaces. */
#define target_get_bookmark(ARGS, FROM_TTY) \