diff options
Diffstat (limited to 'gdb/displaced-stepping.h')
-rw-r--r-- | gdb/displaced-stepping.h | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/gdb/displaced-stepping.h b/gdb/displaced-stepping.h index e154927..ccbf39b 100644 --- a/gdb/displaced-stepping.h +++ b/gdb/displaced-stepping.h @@ -33,7 +33,7 @@ extern bool debug_displaced; /* Print a "displaced" debug statement. */ #define displaced_debug_printf(fmt, ...) \ - debug_prefixed_printf_cond (debug_displaced, "displaced",fmt, ##__VA_ARGS__) + debug_prefixed_printf_cond (debug_displaced, "displaced", fmt, ##__VA_ARGS__) enum displaced_step_prepare_status { @@ -75,8 +75,9 @@ using displaced_step_copy_insn_closure_up struct buf_displaced_step_copy_insn_closure : displaced_step_copy_insn_closure { buf_displaced_step_copy_insn_closure (int buf_size) - : buf (buf_size) - {} + : buf (buf_size) + { + } /* The content of this buffer is up to the user of the class, but typically original instruction bytes, used during fixup to determine what needs to @@ -88,10 +89,7 @@ struct buf_displaced_step_copy_insn_closure : displaced_step_copy_insn_closure struct displaced_step_inferior_state { - displaced_step_inferior_state () - { - reset (); - } + displaced_step_inferior_state () { reset (); } /* Put this object back in its original state. */ void reset () @@ -120,16 +118,10 @@ struct displaced_step_inferior_state struct displaced_step_thread_state { /* Return true if this thread is currently executing a displaced step. */ - bool in_progress () const - { - return m_original_gdbarch != nullptr; - } + bool in_progress () const { return m_original_gdbarch != nullptr; } /* Return the gdbarch of the thread prior to the step. */ - gdbarch *get_original_gdbarch () const - { - return m_original_gdbarch; - } + gdbarch *get_original_gdbarch () const { return m_original_gdbarch; } /* Mark this thread as currently executing a displaced step. @@ -141,12 +133,10 @@ struct displaced_step_thread_state } /* Mark this thread as no longer executing a displaced step. */ - void reset () - { - m_original_gdbarch = nullptr; - } + void reset () { m_original_gdbarch = nullptr; } private: + gdbarch *m_original_gdbarch = nullptr; }; @@ -171,7 +161,7 @@ struct displaced_step_buffers gdb_signal sig); const displaced_step_copy_insn_closure * - copy_insn_closure_by_addr (CORE_ADDR addr); + copy_insn_closure_by_addr (CORE_ADDR addr); void restore_in_ptid (ptid_t ptid); @@ -183,7 +173,8 @@ private: { explicit displaced_step_buffer (CORE_ADDR addr) : addr (addr) - {} + { + } /* Address of the buffer. */ const CORE_ADDR addr; |