summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.h
diff options
context:
space:
mode:
authorKate Stone <katherine.stone@apple.com>2016-09-06 20:57:50 +0000
committerKate Stone <katherine.stone@apple.com>2016-09-06 20:57:50 +0000
commitb9c1b51e45b845debb76d8658edabca70ca56079 (patch)
treedfcb5a13ef2b014202340f47036da383eaee74aa /lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.h
parentd5aa73376966339caad04013510626ec2e42c760 (diff)
downloadbcm5719-llvm-b9c1b51e45b845debb76d8658edabca70ca56079.tar.gz
bcm5719-llvm-b9c1b51e45b845debb76d8658edabca70ca56079.zip
*** This commit represents a complete reformatting of the LLDB source code
*** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
Diffstat (limited to 'lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.h')
-rw-r--r--lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.h163
1 files changed, 74 insertions, 89 deletions
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.h b/lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.h
index b4680de7951..7e0a2a9f7f1 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.h
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.h
@@ -16,103 +16,88 @@
// Other libraries and framework includes
// Project includes
-#include "lldb/lldb-private.h"
-#include "lldb/Target/RegisterContext.h"
#include "lldb/Symbol/SymbolContext.h"
+#include "lldb/Target/RegisterContext.h"
+#include "lldb/lldb-private.h"
namespace lldb_private {
-
-class RegisterContextThreadMemory : public lldb_private::RegisterContext
-{
+
+class RegisterContextThreadMemory : public lldb_private::RegisterContext {
public:
- RegisterContextThreadMemory (Thread &thread,
- lldb::addr_t register_data_addr);
-
- ~RegisterContextThreadMemory() override;
-
- void
- InvalidateAllRegisters() override;
-
- size_t
- GetRegisterCount() override;
-
- const RegisterInfo *
- GetRegisterInfoAtIndex(size_t reg) override;
-
- size_t
- GetRegisterSetCount() override;
-
- const RegisterSet *
- GetRegisterSet(size_t reg_set) override;
-
- bool
- ReadRegister(const RegisterInfo *reg_info, RegisterValue &reg_value) override;
-
- bool
- WriteRegister(const RegisterInfo *reg_info, const RegisterValue &reg_value) override;
-
- // These two functions are used to implement "push" and "pop" of register states. They are used primarily
- // for expression evaluation, where we need to push a new state (storing the old one in data_sp) and then
- // restoring the original state by passing the data_sp we got from ReadAllRegisters to WriteAllRegisterValues.
- // ReadAllRegisters will do what is necessary to return a coherent set of register values for this thread, which
- // may mean e.g. interrupting a thread that is sitting in a kernel trap. That is a somewhat disruptive operation,
- // so these API's should only be used when this behavior is needed.
-
- bool
- ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
-
- bool
- WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
-
- bool
- CopyFromRegisterContext (lldb::RegisterContextSP context);
-
- uint32_t
- ConvertRegisterKindToRegisterNumber(lldb::RegisterKind kind, uint32_t num) override;
-
- uint32_t
- NumSupportedHardwareBreakpoints() override;
-
- uint32_t
- SetHardwareBreakpoint(lldb::addr_t addr, size_t size) override;
-
- bool
- ClearHardwareBreakpoint(uint32_t hw_idx) override;
-
- uint32_t
- NumSupportedHardwareWatchpoints() override;
-
- uint32_t
- SetHardwareWatchpoint(lldb::addr_t addr, size_t size, bool read, bool write) override;
-
- bool
- ClearHardwareWatchpoint(uint32_t hw_index) override;
-
- bool
- HardwareSingleStep(bool enable) override;
-
- Error
- ReadRegisterValueFromMemory(const lldb_private::RegisterInfo *reg_info,
- lldb::addr_t src_addr,
- uint32_t src_len,
- RegisterValue &reg_value) override;
-
- Error
- WriteRegisterValueToMemory(const lldb_private::RegisterInfo *reg_info,
- lldb::addr_t dst_addr, uint32_t dst_len,
- const RegisterValue &reg_value) override;
+ RegisterContextThreadMemory(Thread &thread, lldb::addr_t register_data_addr);
+
+ ~RegisterContextThreadMemory() override;
+
+ void InvalidateAllRegisters() override;
+
+ size_t GetRegisterCount() override;
+
+ const RegisterInfo *GetRegisterInfoAtIndex(size_t reg) override;
+
+ size_t GetRegisterSetCount() override;
+
+ const RegisterSet *GetRegisterSet(size_t reg_set) override;
+
+ bool ReadRegister(const RegisterInfo *reg_info,
+ RegisterValue &reg_value) override;
+
+ bool WriteRegister(const RegisterInfo *reg_info,
+ const RegisterValue &reg_value) override;
+
+ // These two functions are used to implement "push" and "pop" of register
+ // states. They are used primarily
+ // for expression evaluation, where we need to push a new state (storing the
+ // old one in data_sp) and then
+ // restoring the original state by passing the data_sp we got from
+ // ReadAllRegisters to WriteAllRegisterValues.
+ // ReadAllRegisters will do what is necessary to return a coherent set of
+ // register values for this thread, which
+ // may mean e.g. interrupting a thread that is sitting in a kernel trap. That
+ // is a somewhat disruptive operation,
+ // so these API's should only be used when this behavior is needed.
+
+ bool ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+
+ bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
+
+ bool CopyFromRegisterContext(lldb::RegisterContextSP context);
+
+ uint32_t ConvertRegisterKindToRegisterNumber(lldb::RegisterKind kind,
+ uint32_t num) override;
+
+ uint32_t NumSupportedHardwareBreakpoints() override;
+
+ uint32_t SetHardwareBreakpoint(lldb::addr_t addr, size_t size) override;
+
+ bool ClearHardwareBreakpoint(uint32_t hw_idx) override;
+
+ uint32_t NumSupportedHardwareWatchpoints() override;
+
+ uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size, bool read,
+ bool write) override;
+
+ bool ClearHardwareWatchpoint(uint32_t hw_index) override;
+
+ bool HardwareSingleStep(bool enable) override;
+
+ Error ReadRegisterValueFromMemory(const lldb_private::RegisterInfo *reg_info,
+ lldb::addr_t src_addr, uint32_t src_len,
+ RegisterValue &reg_value) override;
+
+ Error WriteRegisterValueToMemory(const lldb_private::RegisterInfo *reg_info,
+ lldb::addr_t dst_addr, uint32_t dst_len,
+ const RegisterValue &reg_value) override;
protected:
- void
- UpdateRegisterContext ();
-
- lldb::ThreadWP m_thread_wp;
- lldb::RegisterContextSP m_reg_ctx_sp;
- lldb::addr_t m_register_data_addr;
- uint32_t m_stop_id;
+ void UpdateRegisterContext();
+
+ lldb::ThreadWP m_thread_wp;
+ lldb::RegisterContextSP m_reg_ctx_sp;
+ lldb::addr_t m_register_data_addr;
+ uint32_t m_stop_id;
private:
- DISALLOW_COPY_AND_ASSIGN (RegisterContextThreadMemory);
+ DISALLOW_COPY_AND_ASSIGN(RegisterContextThreadMemory);
};
} // namespace lldb_private
OpenPOWER on IntegriCloud