summaryrefslogtreecommitdiff
path: root/source/Plugins/Process/Utility/RegisterContextMach_x86_64.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Plugins/Process/Utility/RegisterContextMach_x86_64.cpp')
-rw-r--r--source/Plugins/Process/Utility/RegisterContextMach_x86_64.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/Plugins/Process/Utility/RegisterContextMach_x86_64.cpp b/source/Plugins/Process/Utility/RegisterContextMach_x86_64.cpp
index 522b73a2888e..0180879d51ee 100644
--- a/source/Plugins/Process/Utility/RegisterContextMach_x86_64.cpp
+++ b/source/Plugins/Process/Utility/RegisterContextMach_x86_64.cpp
@@ -46,17 +46,23 @@ int RegisterContextMach_x86_64::DoReadEXC(lldb::tid_t tid, int flavor,
int RegisterContextMach_x86_64::DoWriteGPR(lldb::tid_t tid, int flavor,
const GPR &gpr) {
- return ::thread_set_state(tid, flavor, (thread_state_t)&gpr, GPRWordCount);
+ return ::thread_set_state(
+ tid, flavor, reinterpret_cast<thread_state_t>(const_cast<GPR *>(&gpr)),
+ GPRWordCount);
}
int RegisterContextMach_x86_64::DoWriteFPU(lldb::tid_t tid, int flavor,
const FPU &fpu) {
- return ::thread_set_state(tid, flavor, (thread_state_t)&fpu, FPUWordCount);
+ return ::thread_set_state(
+ tid, flavor, reinterpret_cast<thread_state_t>(const_cast<FPU *>(&fpu)),
+ FPUWordCount);
}
int RegisterContextMach_x86_64::DoWriteEXC(lldb::tid_t tid, int flavor,
const EXC &exc) {
- return ::thread_set_state(tid, flavor, (thread_state_t)&exc, EXCWordCount);
+ return ::thread_set_state(
+ tid, flavor, reinterpret_cast<thread_state_t>(const_cast<EXC *>(&exc)),
+ EXCWordCount);
}
#endif