convert to_files_info
authorTom Tromey <tromey@redhat.com>
Wed, 18 Dec 2013 16:51:47 +0000 (09:51 -0700)
committerTom Tromey <tromey@redhat.com>
Wed, 19 Feb 2014 14:47:04 +0000 (07:47 -0700)
2014-02-19  Tom Tromey  <tromey@redhat.com>

* target-delegates.c: Rebuild.
* target.c (update_current_target): Don't inherit or default
to_files_info.
* target.h (struct target_ops) <to_files_info>: Use
TARGET_DEFAULT_IGNORE.

gdb/ChangeLog
gdb/target-delegates.c
gdb/target.c
gdb/target.h

index 9a2ff8cb6d3da88f486fccec42d3b2676da4b154..ebeb7d6dd78d52f3a4d22b73ebd83ea62d6a89fc 100644 (file)
@@ -1,3 +1,11 @@
+2014-02-19  Tom Tromey  <tromey@redhat.com>
+
+       * target-delegates.c: Rebuild.
+       * target.c (update_current_target): Don't inherit or default
+       to_files_info.
+       * target.h (struct target_ops) <to_files_info>: Use
+       TARGET_DEFAULT_IGNORE.
+
 2014-02-19  Tom Tromey  <tromey@redhat.com>
 
        * target-delegates.c: Rebuild.
index 3f1ec9ba022cb7b4a0df83406746d4404eeacee9..3186a58033fdbedf3d375d32b3d369ba476a6e83 100644 (file)
@@ -86,6 +86,18 @@ tdefault_prepare_to_store (struct target_ops *self, struct regcache *arg1)
   noprocess ();
 }
 
+static void
+delegate_files_info (struct target_ops *self)
+{
+  self = self->beneath;
+  self->to_files_info (self);
+}
+
+static void
+tdefault_files_info (struct target_ops *self)
+{
+}
+
 static int
 delegate_insert_breakpoint (struct target_ops *self, struct gdbarch *arg1, struct bp_target_info *arg2)
 {
@@ -203,6 +215,8 @@ install_delegators (struct target_ops *ops)
     ops->to_store_registers = delegate_store_registers;
   if (ops->to_prepare_to_store == NULL)
     ops->to_prepare_to_store = delegate_prepare_to_store;
+  if (ops->to_files_info == NULL)
+    ops->to_files_info = delegate_files_info;
   if (ops->to_insert_breakpoint == NULL)
     ops->to_insert_breakpoint = delegate_insert_breakpoint;
   if (ops->to_remove_breakpoint == NULL)
@@ -235,6 +249,7 @@ install_dummy_methods (struct target_ops *ops)
   ops->to_wait = tdefault_wait;
   ops->to_store_registers = tdefault_store_registers;
   ops->to_prepare_to_store = tdefault_prepare_to_store;
+  ops->to_files_info = tdefault_files_info;
   ops->to_insert_breakpoint = memory_insert_breakpoint;
   ops->to_remove_breakpoint = memory_remove_breakpoint;
   ops->to_stopped_by_watchpoint = tdefault_stopped_by_watchpoint;
index 05b307dc800a90de2a01f6e1fd4db02686199784..fc16272e0e4147732c5272ab4bcc41cb611a9958 100644 (file)
@@ -601,7 +601,7 @@ update_current_target (void)
       /* Do not inherit to_store_registers.  */
       /* Do not inherit to_prepare_to_store.  */
       INHERIT (deprecated_xfer_memory, t);
-      INHERIT (to_files_info, t);
+      /* Do not inherit to_files_info.  */
       /* Do not inherit to_insert_breakpoint.  */
       /* Do not inherit to_remove_breakpoint.  */
       INHERIT (to_can_use_hw_breakpoint, t);
@@ -734,9 +734,6 @@ update_current_target (void)
            (int (*) (CORE_ADDR, gdb_byte *, int, int,
                      struct mem_attrib *, struct target_ops *))
            nomemory);
-  de_fault (to_files_info,
-           (void (*) (struct target_ops *))
-           target_ignore);
   de_fault (to_can_use_hw_breakpoint,
            (int (*) (struct target_ops *, int, int, int))
            return_zero);
index 4b476aa4d8d95ac199f5dce86c416a908c0214c2..fd0afcf4df4d2c72d1ac0ef5b784c1b0aa6f9e65 100644 (file)
@@ -447,7 +447,8 @@ struct target_ops
                                   struct mem_attrib *attrib,
                                   struct target_ops *target);
 
-    void (*to_files_info) (struct target_ops *);
+    void (*to_files_info) (struct target_ops *)
+      TARGET_DEFAULT_IGNORE ();
     int (*to_insert_breakpoint) (struct target_ops *, struct gdbarch *,
                                 struct bp_target_info *)
       TARGET_DEFAULT_FUNC (memory_insert_breakpoint);