aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2014-01-15 12:58:50 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:48:46 -0700
commit596b6b39ab5f26a86980bc9aa6cf348d32d244b4 (patch)
tree187ab6a888c4f1d1f8c09c0eee7343c2c5a77770
parentb427c1bc161e6e0dcbce0c27b385b3ecb9c47552 (diff)
downloadgdb-596b6b39ab5f26a86980bc9aa6cf348d32d244b4.zip
gdb-596b6b39ab5f26a86980bc9aa6cf348d32d244b4.tar.gz
gdb-596b6b39ab5f26a86980bc9aa6cf348d32d244b4.tar.bz2
remove some calls to INHERIT and de_fault
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-19 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.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/target.c8
2 files changed, 5 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d7275aa..d41f14e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2014-02-19 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.
+
+2014-02-19 Tom Tromey <tromey@redhat.com>
+
* gcore.h (objfile_find_memory_regions): Declare.
* gcore.c (objfile_find_memory_regions): No longer static. Add
"self" argument.
diff --git a/gdb/target.c b/gdb/target.c
index bd656da..e816f71 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 *))