Refactor queries for hardware and software single stepping support in GDBServer.
[deliverable/binutils-gdb.git] / gdb / gdbserver / target.h
index d3fcb36033330a89af55d18f5474b6b5ee7e3c9f..9cd07bc2d945d13410e4431c6b357458a1e7d386 100644 (file)
@@ -463,6 +463,9 @@ struct target_ops
      PC.  The PCPTR is adjusted to the real memory location in case a flag
      (e.g., the Thumb bit on ARM) is present in the PC.  */
   int (*breakpoint_kind_from_current_state) (CORE_ADDR *pcptr);
+
+  /* Returns true if the target can software single step.  */
+  int (*supports_software_single_step) (void);
 };
 
 extern struct target_ops *the_target;
@@ -655,6 +658,10 @@ int kill_inferior (int);
    ? (*the_target->breakpoint_kind_from_current_state) (pcptr) \
    : target_breakpoint_kind_from_pc (pcptr))
 
+#define target_supports_software_single_step() \
+  (the_target->supports_software_single_step ? \
+   (*the_target->supports_software_single_step) () : 0)
+
 /* Start non-stop mode, returns 0 on success, -1 on failure.   */
 
 int start_non_stop (int nonstop);
This page took 0.023751 seconds and 4 git commands to generate.