aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/target.h
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2015-09-15 14:09:18 +0100
committerYao Qi <yao.qi@linaro.org>2015-09-15 14:09:18 +0100
commit70b90b91bf77e72a36abdef039234359195b1942 (patch)
tree1329a9bb77526fdea4cface796617b5b9a001c25 /gdb/gdbserver/target.h
parentade90bdeb78ccaeb294e34af04751f2f649a324f (diff)
downloadgdb-70b90b91bf77e72a36abdef039234359195b1942.zip
gdb-70b90b91bf77e72a36abdef039234359195b1942.tar.gz
gdb-70b90b91bf77e72a36abdef039234359195b1942.tar.bz2
[gdbserver] Rename supports_conditional_breakpoints to supports_hardware_single_step
In my patch https://sourceware.org/ml/gdb-patches/2015-04/msg01110.html a new target_ops hook supports_conditional_breakpoints was added to disable conditional breakpoints if target doesn't have hardware single step. This patch is to generalize this hook from supports_conditional_breakpoints to supports_hardware_single_step, so that the following patch can use it. gdb/gdbserver: 2015-09-15 Yao Qi <yao.qi@linaro.org> * linux-low.c (linux_supports_conditional_breakpoints): Rename it to ... (linux_supports_hardware_single_step): ... New function. (linux_target_ops): Update. * lynx-low.c (lynx_target_ops): Set field supports_hardware_single_step to target_can_do_hardware_single_step. * nto-low.c (nto_target_ops): Likewise. * spu-low.c (spu_target_ops): Likewise. * win32-low.c (win32_target_ops): Likewise. * target.c (target_can_do_hardware_single_step): New function. * target.h (struct target_ops) <supports_conditional_breakpoints>: Remove. <supports_hardware_single_step>: New field. (target_supports_conditional_breakpoints): Remove. (target_supports_hardware_single_step): New macro. (target_can_do_hardware_single_step): Declare. * server.c (handle_query): Use target_supports_hardware_single_step instead of target_supports_conditional_breakpoints.
Diffstat (limited to 'gdb/gdbserver/target.h')
-rw-r--r--gdb/gdbserver/target.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h
index aea3d15..a2842b4 100644
--- a/gdb/gdbserver/target.h
+++ b/gdb/gdbserver/target.h
@@ -225,9 +225,8 @@ struct target_ops
HW breakpoint triggering. */
int (*supports_stopped_by_hw_breakpoint) (void);
- /* Returns true if the target can evaluate conditions of
- breakpoints. */
- int (*supports_conditional_breakpoints) (void);
+ /* Returns true if the target can do hardware single step. */
+ int (*supports_hardware_single_step) (void);
/* Returns 1 if target was stopped due to a watchpoint hit, 0 otherwise. */
@@ -616,9 +615,9 @@ int kill_inferior (int);
(the_target->supports_stopped_by_hw_breakpoint ? \
(*the_target->supports_stopped_by_hw_breakpoint) () : 0)
-#define target_supports_conditional_breakpoints() \
- (the_target->supports_conditional_breakpoints ? \
- (*the_target->supports_conditional_breakpoints) () : 0)
+#define target_supports_hardware_single_step() \
+ (the_target->supports_hardware_single_step ? \
+ (*the_target->supports_hardware_single_step) () : 0)
#define target_stopped_by_hw_breakpoint() \
(the_target->stopped_by_hw_breakpoint ? \
@@ -656,4 +655,6 @@ int set_desired_thread (int id);
const char *target_pid_to_str (ptid_t);
+int target_can_do_hardware_single_step (void);
+
#endif /* TARGET_H */