This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFC v2 35/38] remove some calls to INHERIT and de_fault
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at redhat dot com>
- Date: Thu, 6 Feb 2014 13:55:33 -0700
- Subject: [RFC v2 35/38] remove some calls to INHERIT and de_fault
- Authentication-results: sourceware.org; auth=none
- References: <1391720136-2121-1-git-send-email-tromey at redhat dot com>
This removes a few unnecessary calls to INHERIT and de_fault:
* to_doc is only used when a target is registered
* to_magic is only used when a target is pushed and not useful for
current_target.
* to_open and to_close are only ever called using a specific
target_ops object; there is no need to de_fault them.
2014-02-06 Tom Tromey <tromey@redhat.com>
* target.c (update_current_target): Do not INHERIT to_doc or
to_magic. Do not de_fault to_open or to_close.
---
gdb/ChangeLog | 5 +++++
gdb/target.c | 8 --------
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/gdb/target.c b/gdb/target.c
index 8de7487..bded196 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -606,13 +606,11 @@ update_current_target (void)
{
INHERIT (to_shortname, t);
INHERIT (to_longname, t);
- INHERIT (to_doc, t);
INHERIT (to_attach_no_wait, t);
INHERIT (deprecated_xfer_memory, t);
INHERIT (to_have_steppable_watchpoint, t);
INHERIT (to_have_continuable_watchpoint, t);
INHERIT (to_has_thread_control, t);
- INHERIT (to_magic, t);
}
#undef INHERIT
@@ -624,12 +622,6 @@ update_current_target (void)
if (!current_target.field) \
current_target.field = value
- de_fault (to_open,
- (void (*) (char *, int))
- tcomplain);
- de_fault (to_close,
- (void (*) (struct target_ops *))
- target_ignore);
de_fault (deprecated_xfer_memory,
(int (*) (CORE_ADDR, gdb_byte *, int, int,
struct mem_attrib *, struct target_ops *))
--
1.8.1.4