From: Tom Tromey Date: Wed, 18 Dec 2013 17:57:18 +0000 (-0700) Subject: convert to_make_corefile_notes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=16f796b16a0a7c16c8c11800136b99e53984f4c2;p=binutils-gdb.git convert to_make_corefile_notes 2014-02-19 Tom Tromey * target-delegates.c: Rebuild. * target.c (update_current_target): Don't inherit or default to_make_corefile_notes. (init_dummy_target): Don't initialize to_make_corefile_notes. * target.h (struct target_ops) : Use TARGET_DEFAULT_FUNC. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f91a1bac7cd..23d5c3bba3e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +2014-02-19 Tom Tromey + + * target-delegates.c: Rebuild. + * target.c (update_current_target): Don't inherit or default + to_make_corefile_notes. + (init_dummy_target): Don't initialize to_make_corefile_notes. + * target.h (struct target_ops) : Use + TARGET_DEFAULT_FUNC. + 2014-02-19 Tom Tromey * target-delegates.c: Rebuild. diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c index 301b07aa3c6..33bb3291a4e 100644 --- a/gdb/target-delegates.c +++ b/gdb/target-delegates.c @@ -518,6 +518,13 @@ delegate_find_memory_regions (struct target_ops *self, find_memory_region_ftype return self->to_find_memory_regions (self, arg1, arg2); } +static char * +delegate_make_corefile_notes (struct target_ops *self, bfd *arg1, int *arg2) +{ + self = self->beneath; + return self->to_make_corefile_notes (self, arg1, arg2); +} + static enum target_xfer_status delegate_xfer_partial (struct target_ops *self, enum target_object arg1, const char *arg2, gdb_byte *arg3, const gdb_byte *arg4, ULONGEST arg5, ULONGEST arg6, ULONGEST *arg7) { @@ -637,6 +644,8 @@ install_delegators (struct target_ops *ops) ops->to_async = delegate_async; if (ops->to_find_memory_regions == NULL) ops->to_find_memory_regions = delegate_find_memory_regions; + if (ops->to_make_corefile_notes == NULL) + ops->to_make_corefile_notes = delegate_make_corefile_notes; if (ops->to_xfer_partial == NULL) ops->to_xfer_partial = delegate_xfer_partial; if (ops->to_supports_btrace == NULL) @@ -691,6 +700,7 @@ install_dummy_methods (struct target_ops *ops) ops->to_is_async_p = find_default_is_async_p; ops->to_async = tdefault_async; ops->to_find_memory_regions = dummy_find_memory_regions; + ops->to_make_corefile_notes = dummy_make_corefile_notes; ops->to_xfer_partial = tdefault_xfer_partial; ops->to_supports_btrace = tdefault_supports_btrace; } diff --git a/gdb/target.c b/gdb/target.c index 767bcad2a42..911c4975043 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -82,6 +82,9 @@ static int dummy_find_memory_regions (struct target_ops *self, find_memory_region_ftype ignore1, void *ignore2); +static char *dummy_make_corefile_notes (struct target_ops *self, + bfd *ignore1, int *ignore2); + static int find_default_can_async_p (struct target_ops *ignore); static int find_default_is_async_p (struct target_ops *ignore); @@ -666,7 +669,7 @@ update_current_target (void) /* Do not inherit to_is_async_p. */ /* Do not inherit to_async. */ /* Do not inherit to_find_memory_regions. */ - INHERIT (to_make_corefile_notes, t); + /* Do not inherit to_make_corefile_notes. */ INHERIT (to_get_bookmark, t); INHERIT (to_goto_bookmark, t); /* Do not inherit to_get_thread_local_address. */ @@ -3707,7 +3710,6 @@ init_dummy_target (void) = find_default_supports_disable_randomization; dummy_target.to_pid_to_str = dummy_pid_to_str; dummy_target.to_stratum = dummy_stratum; - dummy_target.to_make_corefile_notes = dummy_make_corefile_notes; dummy_target.to_get_bookmark = dummy_get_bookmark; dummy_target.to_goto_bookmark = dummy_goto_bookmark; dummy_target.to_has_all_memory = (int (*) (struct target_ops *)) return_zero; diff --git a/gdb/target.h b/gdb/target.h index 35b95c6aa0c..26a95bc9555 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -585,7 +585,8 @@ struct target_ops find_memory_region_ftype func, void *data) TARGET_DEFAULT_FUNC (dummy_find_memory_regions); /* make_corefile_notes support method for gcore */ - char * (*to_make_corefile_notes) (struct target_ops *, bfd *, int *); + char * (*to_make_corefile_notes) (struct target_ops *, bfd *, int *) + TARGET_DEFAULT_FUNC (dummy_make_corefile_notes); /* get_bookmark support method for bookmarks */ gdb_byte * (*to_get_bookmark) (struct target_ops *, char *, int); /* goto_bookmark support method for bookmarks */