change to_info_record to use target delegation
authorTom Tromey <tromey@redhat.com>
Wed, 25 Jun 2014 16:23:35 +0000 (10:23 -0600)
committerTom Tromey <tromey@redhat.com>
Mon, 7 Jul 2014 15:06:15 +0000 (09:06 -0600)
This changes to_info_record to use target delegation.
Also, target_info_record was unused, so this patch removes it.

2014-07-07  Tom Tromey  <tromey@redhat.com>

* target-delegates.c: Rebuild.
* target.c (target_info_record): Remove.
* record.c (info_record_command): Unconditionally call
to_info_record.
* target.h (struct target_ops) <to_info_record>: Use
TARGET_DEFAULT_IGNORE.
(target_info_record): Remove.

gdb/ChangeLog
gdb/record.c
gdb/target.c
gdb/target.h

index f79973790e4aeb0b3a203c560f23970f6464c50b..f41451a16f3732b5fa3abf6999958824dc807840 100644 (file)
@@ -1,3 +1,13 @@
+2014-07-07  Tom Tromey  <tromey@redhat.com>
+
+       * target-delegates.c: Rebuild.
+       * target.c (target_info_record): Remove.
+       * record.c (info_record_command): Unconditionally call
+       to_info_record.
+       * target.h (struct target_ops) <to_info_record>: Use
+       TARGET_DEFAULT_IGNORE.
+       (target_info_record): Remove.
+
 2014-07-07  Tom Tromey  <tromey@redhat.com>
 
        * target.h (struct target_ops) <to_get_thread_local_address>: Use
index acdbc1a0a5053b04900443c2c157a3179c3842ff..ff54a8bd0da659e1360c8b8d9b68051b4cd195fb 100644 (file)
@@ -285,8 +285,7 @@ info_record_command (char *args, int from_tty)
     }
 
   printf_filtered (_("Active record target: %s\n"), t->to_shortname);
-  if (t->to_info_record != NULL)
-    t->to_info_record (t);
+  t->to_info_record (t);
 }
 
 /* The "record save" command.  */
index 91756c874507434808bf912ef416e75900b93f29..c9c5e4b83e0f0ba23e74c373d8a954aeec531c5c 100644 (file)
@@ -3442,23 +3442,6 @@ target_stop_recording (void)
 
 /* See target.h.  */
 
-void
-target_info_record (void)
-{
-  struct target_ops *t;
-
-  for (t = current_target.beneath; t != NULL; t = t->beneath)
-    if (t->to_info_record != NULL)
-      {
-       t->to_info_record (t);
-       return;
-      }
-
-  tcomplain ();
-}
-
-/* See target.h.  */
-
 void
 target_save_record (const char *filename)
 {
index cf4ced1730fd992155dedadf9eecfe0fd974f3a4..8bf160cbde55ca461ed4e44dbafcfbeab064f301 100644 (file)
@@ -1022,7 +1022,8 @@ struct target_ops
       TARGET_DEFAULT_IGNORE ();
 
     /* Print information about the recording.  */
-    void (*to_info_record) (struct target_ops *);
+    void (*to_info_record) (struct target_ops *)
+      TARGET_DEFAULT_IGNORE ();
 
     /* Save the recorded execution trace into a file.  */
     void (*to_save_record) (struct target_ops *, const char *filename)
@@ -2221,9 +2222,6 @@ extern enum btrace_error target_read_btrace (VEC (btrace_block_s) **,
 /* See to_stop_recording in struct target_ops.  */
 extern void target_stop_recording (void);
 
-/* See to_info_record in struct target_ops.  */
-extern void target_info_record (void);
-
 /* See to_save_record in struct target_ops.  */
 extern void target_save_record (const char *filename);