convert to_supports_string_tracing
authorTom Tromey <tromey@redhat.com>
Wed, 18 Dec 2013 20:56:04 +0000 (13:56 -0700)
committerTom Tromey <tromey@redhat.com>
Wed, 19 Feb 2014 14:47:41 +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_supports_string_tracing.
* target.h (struct target_ops) <to_supports_string_tracing>: Use
TARGET_DEFAULT_RETURN.

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

index 13f4a7d452510c3ac34b9d275114e35b5e516ecf..e2a0e58850cc47d7e00eb841df3d70b1b058f80d 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_supports_string_tracing.
+       * target.h (struct target_ops) <to_supports_string_tracing>: Use
+       TARGET_DEFAULT_RETURN.
+
 2014-02-19  Tom Tromey  <tromey@redhat.com>
 
        * target-delegates.c: Rebuild.
index 30bea1c1b8cc58c5e50fb8708daf68596fb33c9d..275ce58ee07c0ad8ab9cddcaf6717e5f523370ca 100644 (file)
@@ -617,6 +617,19 @@ tdefault_supports_enable_disable_tracepoint (struct target_ops *self)
   return 0;
 }
 
+static int
+delegate_supports_string_tracing (struct target_ops *self)
+{
+  self = self->beneath;
+  return self->to_supports_string_tracing (self);
+}
+
+static int
+tdefault_supports_string_tracing (struct target_ops *self)
+{
+  return 0;
+}
+
 static struct gdbarch *
 delegate_thread_architecture (struct target_ops *self, ptid_t arg1)
 {
@@ -748,6 +761,8 @@ install_delegators (struct target_ops *ops)
     ops->to_supports_multi_process = delegate_supports_multi_process;
   if (ops->to_supports_enable_disable_tracepoint == NULL)
     ops->to_supports_enable_disable_tracepoint = delegate_supports_enable_disable_tracepoint;
+  if (ops->to_supports_string_tracing == NULL)
+    ops->to_supports_string_tracing = delegate_supports_string_tracing;
   if (ops->to_thread_architecture == NULL)
     ops->to_thread_architecture = delegate_thread_architecture;
   if (ops->to_supports_btrace == NULL)
@@ -811,6 +826,7 @@ install_dummy_methods (struct target_ops *ops)
   ops->to_execution_direction = default_execution_direction;
   ops->to_supports_multi_process = tdefault_supports_multi_process;
   ops->to_supports_enable_disable_tracepoint = tdefault_supports_enable_disable_tracepoint;
+  ops->to_supports_string_tracing = tdefault_supports_string_tracing;
   ops->to_thread_architecture = default_thread_architecture;
   ops->to_supports_btrace = tdefault_supports_btrace;
 }
index 7d96806fa7109346864d1b7966b99f34973caf4f..c9e2ba59f39c69a7956907d043c99315014a9d6a 100644 (file)
@@ -687,7 +687,7 @@ update_current_target (void)
       /* Do not inherit to_search_memory.  */
       /* Do not inherit to_supports_multi_process.  */
       /* Do not inherit to_supports_enable_disable_tracepoint.  */
-      INHERIT (to_supports_string_tracing, t);
+      /* Do not inherit to_supports_string_tracing.  */
       INHERIT (to_trace_init, t);
       INHERIT (to_download_tracepoint, t);
       INHERIT (to_can_download_tracepoint, t);
@@ -752,9 +752,6 @@ update_current_target (void)
            (void (*) (struct target_ops *, ptid_t))
            target_ignore);
   current_target.to_read_description = NULL;
-  de_fault (to_supports_string_tracing,
-           (int (*) (struct target_ops *))
-           return_zero);
   de_fault (to_trace_init,
            (void (*) (struct target_ops *))
            tcomplain);
index 5fb7defe89db083178658255db4d714e6fc40443..db31b5eaf6e634ae4c6b9075f67b99f466616e44 100644 (file)
@@ -725,7 +725,8 @@ struct target_ops
     int (*to_supports_disable_randomization) (struct target_ops *);
 
     /* Does this target support the tracenz bytecode for string collection?  */
-    int (*to_supports_string_tracing) (struct target_ops *);
+    int (*to_supports_string_tracing) (struct target_ops *)
+      TARGET_DEFAULT_RETURN (0);
 
     /* Does this target support evaluation of breakpoint conditions on its
        end?  */
This page took 0.034415 seconds and 4 git commands to generate.