aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-18 14:20:36 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:48:06 -0700
commit843f59ed2647d73ed7ba46885ac3820ff97fbdc5 (patch)
tree12ce415ae968cc3aad16a553cb3681ee409a0e14
parentccfde2a0c07136f95907a7d545cf6781273ba4a0 (diff)
downloadgdb-843f59ed2647d73ed7ba46885ac3820ff97fbdc5.zip
gdb-843f59ed2647d73ed7ba46885ac3820ff97fbdc5.tar.gz
gdb-843f59ed2647d73ed7ba46885ac3820ff97fbdc5.tar.bz2
convert to_can_run_breakpoint_commands
2014-02-19 Tom Tromey <tromey@redhat.com> * target-delegates.c: Rebuild. * target.c (update_current_target): Don't inherit or default to_can_run_breakpoint_commands. * target.h (struct target_ops) <to_can_run_breakpoint_commands>: Use TARGET_DEFAULT_RETURN.
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/target-delegates.c16
-rw-r--r--gdb/target.c5
-rw-r--r--gdb/target.h3
4 files changed, 27 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8368621..4d867fa 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -2,6 +2,14 @@
* target-delegates.c: Rebuild.
* target.c (update_current_target): Don't inherit or default
+ to_can_run_breakpoint_commands.
+ * target.h (struct target_ops) <to_can_run_breakpoint_commands>:
+ Use TARGET_DEFAULT_RETURN.
+
+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
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c
index 509cc7a..69a498d 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -643,6 +643,19 @@ tdefault_supports_evaluation_of_breakpoint_conditions (struct target_ops *self)
return 0;
}
+static int
+delegate_can_run_breakpoint_commands (struct target_ops *self)
+{
+ self = self->beneath;
+ return self->to_can_run_breakpoint_commands (self);
+}
+
+static int
+tdefault_can_run_breakpoint_commands (struct target_ops *self)
+{
+ return 0;
+}
+
static struct gdbarch *
delegate_thread_architecture (struct target_ops *self, ptid_t arg1)
{
@@ -1164,6 +1177,8 @@ install_delegators (struct target_ops *ops)
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_can_run_breakpoint_commands == NULL)
+ ops->to_can_run_breakpoint_commands = delegate_can_run_breakpoint_commands;
if (ops->to_thread_architecture == NULL)
ops->to_thread_architecture = delegate_thread_architecture;
if (ops->to_trace_init == NULL)
@@ -1289,6 +1304,7 @@ install_dummy_methods (struct target_ops *ops)
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_can_run_breakpoint_commands = tdefault_can_run_breakpoint_commands;
ops->to_thread_architecture = default_thread_architecture;
ops->to_trace_init = tdefault_trace_init;
ops->to_download_tracepoint = tdefault_download_tracepoint;
diff --git a/gdb/target.c b/gdb/target.c
index 64c5cd6..6533e7e 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -717,7 +717,7 @@ update_current_target (void)
INHERIT (to_magic, t);
/* Do not inherit
to_supports_evaluation_of_breakpoint_conditions. */
- INHERIT (to_can_run_breakpoint_commands, t);
+ /* Do not inherit to_can_run_breakpoint_commands. */
/* Do not inherit to_memory_map. */
/* Do not inherit to_flash_erase. */
/* Do not inherit to_flash_done. */
@@ -749,9 +749,6 @@ update_current_target (void)
(void (*) (struct target_ops *, ptid_t))
target_ignore);
current_target.to_read_description = NULL;
- de_fault (to_can_run_breakpoint_commands,
- (int (*) (struct target_ops *))
- return_zero);
#undef de_fault
diff --git a/gdb/target.h b/gdb/target.h
index 97c5384..44d270c 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -735,7 +735,8 @@ struct target_ops
/* Does this target support evaluation of breakpoint commands on its
end? */
- int (*to_can_run_breakpoint_commands) (struct target_ops *);
+ int (*to_can_run_breakpoint_commands) (struct target_ops *)
+ TARGET_DEFAULT_RETURN (0);
/* Determine current architecture of thread PTID.