convert to_supports_evaluation_of_breakpoint_conditions
authorTom Tromey <tromey@redhat.com>
Wed, 18 Dec 2013 21:20:06 +0000 (14:20 -0700)
committerTom Tromey <tromey@redhat.com>
Wed, 19 Feb 2014 14:48:05 +0000 (07:48 -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_evaluation_of_breakpoint_conditions.
* target.h (struct target_ops)
<to_supports_evaluation_of_breakpoint_conditions>: Use
TARGET_DEFAULT_RETURN.

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

index 80026444e5e3c0375fc115694925741b26f0450f..8368621deaaadf73fe3e78705232cd9091743cc1 100644 (file)
@@ -1,3 +1,12 @@
+2014-02-19  Tom Tromey  <tromey@redhat.com>
+
+       * target-delegates.c: Rebuild.
+       * target.c (update_current_target): Don't inherit or default
+       to_supports_evaluation_of_breakpoint_conditions.
+       * target.h (struct target_ops)
+       <to_supports_evaluation_of_breakpoint_conditions>: Use
+       TARGET_DEFAULT_RETURN.
+
 2014-02-19  Tom Tromey  <tromey@redhat.com>
 
        * target-delegates.c: Rebuild.
index 0ddfbc16a8047506aeda053d673bbe34533fc033..509cc7a7135900ffc512ac4397530d20200e6c34 100644 (file)
@@ -630,6 +630,19 @@ tdefault_supports_string_tracing (struct target_ops *self)
   return 0;
 }
 
+static int
+delegate_supports_evaluation_of_breakpoint_conditions (struct target_ops *self)
+{
+  self = self->beneath;
+  return self->to_supports_evaluation_of_breakpoint_conditions (self);
+}
+
+static int
+tdefault_supports_evaluation_of_breakpoint_conditions (struct target_ops *self)
+{
+  return 0;
+}
+
 static struct gdbarch *
 delegate_thread_architecture (struct target_ops *self, ptid_t arg1)
 {
@@ -1149,6 +1162,8 @@ install_delegators (struct target_ops *ops)
     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_supports_evaluation_of_breakpoint_conditions == NULL)
+    ops->to_supports_evaluation_of_breakpoint_conditions = delegate_supports_evaluation_of_breakpoint_conditions;
   if (ops->to_thread_architecture == NULL)
     ops->to_thread_architecture = delegate_thread_architecture;
   if (ops->to_trace_init == NULL)
@@ -1273,6 +1288,7 @@ install_dummy_methods (struct target_ops *ops)
   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_supports_evaluation_of_breakpoint_conditions = tdefault_supports_evaluation_of_breakpoint_conditions;
   ops->to_thread_architecture = default_thread_architecture;
   ops->to_trace_init = tdefault_trace_init;
   ops->to_download_tracepoint = tdefault_download_tracepoint;
index 0178f56a57ae64dd02bd2329062ea38b7774e8ab..64c5cd665e44e88a1842f624273f8a0a3231beaf 100644 (file)
@@ -715,7 +715,8 @@ update_current_target (void)
       /* Do not inherit to_can_use_agent.  */
       /* Do not inherit to_augmented_libraries_svr4_read.  */
       INHERIT (to_magic, t);
-      INHERIT (to_supports_evaluation_of_breakpoint_conditions, t);
+      /* Do not inherit
+        to_supports_evaluation_of_breakpoint_conditions.  */
       INHERIT (to_can_run_breakpoint_commands, t);
       /* Do not inherit to_memory_map.  */
       /* Do not inherit to_flash_erase.  */
@@ -748,9 +749,6 @@ update_current_target (void)
            (void (*) (struct target_ops *, ptid_t))
            target_ignore);
   current_target.to_read_description = NULL;
-  de_fault (to_supports_evaluation_of_breakpoint_conditions,
-           (int (*) (struct target_ops *))
-           return_zero);
   de_fault (to_can_run_breakpoint_commands,
            (int (*) (struct target_ops *))
            return_zero);
index 7dfe61a6e55ce88f9a27d61ebe73f89c1dde47cc..97c5384187d932f91a6ee072e4503dbd7e642276 100644 (file)
@@ -730,7 +730,8 @@ struct target_ops
 
     /* Does this target support evaluation of breakpoint conditions on its
        end?  */
-    int (*to_supports_evaluation_of_breakpoint_conditions) (struct target_ops *);
+    int (*to_supports_evaluation_of_breakpoint_conditions) (struct target_ops *)
+      TARGET_DEFAULT_RETURN (0);
 
     /* Does this target support evaluation of breakpoint commands on its
        end?  */