summaryrefslogtreecommitdiff
path: root/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp')
-rw-r--r--source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp b/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
index 03ce7ef9f524..b478645e035d 100644
--- a/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
+++ b/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
@@ -11,16 +11,14 @@
#include "RegisterContextDarwin_arm64.h"
#include "RegisterContextDarwinConstants.h"
-// C++ Includes
-// Other libraries and framework includes
-#include "lldb/Core/RegisterValue.h"
-#include "lldb/Core/Scalar.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/Thread.h"
#include "lldb/Utility/DataBufferHeap.h"
#include "lldb/Utility/DataExtractor.h"
#include "lldb/Utility/Endian.h"
#include "lldb/Utility/Log.h"
+#include "lldb/Utility/RegisterValue.h"
+#include "lldb/Utility/Scalar.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Compiler.h"
@@ -32,7 +30,6 @@
#define LLVM_EXTENSION
#endif
-// Project includes
#include "Utility/ARM64_DWARF_Registers.h"
using namespace lldb;
@@ -341,12 +338,22 @@ bool RegisterContextDarwin_arm64::ReadRegister(const RegisterInfo *reg_info,
case gpr_x26:
case gpr_x27:
case gpr_x28:
+ value.SetUInt64(gpr.x[reg - gpr_x0]);
+ break;
case gpr_fp:
+ value.SetUInt64(gpr.fp);
+ break;
case gpr_sp:
+ value.SetUInt64(gpr.sp);
+ break;
case gpr_lr:
+ value.SetUInt64(gpr.lr);
+ break;
case gpr_pc:
+ value.SetUInt64(gpr.pc);
+ break;
case gpr_cpsr:
- value.SetUInt64(gpr.x[reg - gpr_x0]);
+ value.SetUInt64(gpr.cpsr);
break;
case gpr_w0:
@@ -949,7 +956,7 @@ uint32_t RegisterContextDarwin_arm64::SetHardwareWatchpoint(lldb::addr_t addr,
return LLDB_INVALID_INDEX32;
// We must watch for either read or write
- if (read == false && write == false)
+ if (!read && !write)
return LLDB_INVALID_INDEX32;
// Can't watch more than 4 bytes per WVR/WCR pair