Add target_ops argument to to_make_corefile_notes
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.
This commit is contained in:
parent
2e73927ca5
commit
fc6691b259
@ -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
|
||||
|
@ -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"));
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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 */
|
||||
|
@ -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. */
|
||||
|
@ -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 */
|
||||
|
@ -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;
|
||||
|
@ -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) (¤t_target, BFD, SIZE_P)
|
||||
|
||||
/* Bookmark interfaces. */
|
||||
#define target_get_bookmark(ARGS, FROM_TTY) \
|
||||
|
Loading…
Reference in New Issue
Block a user