aboutsummaryrefslogtreecommitdiffstats
path: root/source/Target/RegisterContext.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-07-28 11:09:23 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-07-28 11:09:23 +0000
commitf73363f1dd94996356cefbf24388f561891acf0b (patch)
treee3c31248bdb36eaec5fd833490d4278162dba2a0 /source/Target/RegisterContext.cpp
parent160ee69dd7ae18978f4068116777639ea98dc951 (diff)
downloadsrc-f73363f1dd94996356cefbf24388f561891acf0b.tar.gz
src-f73363f1dd94996356cefbf24388f561891acf0b.zip
Vendor import of lldb trunk r338150:vendor/lldb/lldb-trunk-r338150
Notes
Notes: svn path=/vendor/lldb/dist/; revision=336823 svn path=/vendor/lldb/lldb-trunk-r338150/; revision=336824; tag=vendor/lldb/lldb-trunk-r338150
Diffstat (limited to 'source/Target/RegisterContext.cpp')
-rw-r--r--source/Target/RegisterContext.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/source/Target/RegisterContext.cpp b/source/Target/RegisterContext.cpp
index 28beb7bcb5e8..eaec03d9b595 100644
--- a/source/Target/RegisterContext.cpp
+++ b/source/Target/RegisterContext.cpp
@@ -76,8 +76,7 @@ RegisterContext::UpdateDynamicRegisterSize(const lldb_private::ArchSpec &arch,
ExecutionContext exe_ctx(CalculateThread());
// In MIPS, the floating point registers size is depends on FR bit of SR
- // register.
- // if SR.FR == 1 then all floating point registers are 64 bits.
+ // register. if SR.FR == 1 then all floating point registers are 64 bits.
// else they are all 32 bits.
int expr_result;
@@ -136,7 +135,7 @@ uint64_t RegisterContext::GetPC(uint64_t fail_value) {
if (target_sp) {
Target *target = target_sp.get();
if (target)
- pc = target->GetOpcodeLoadAddress(pc, eAddressClassCode);
+ pc = target->GetOpcodeLoadAddress(pc, AddressClass::eCode);
}
}
@@ -262,8 +261,7 @@ bool RegisterContext::CopyFromRegisterContext(lldb::RegisterContextSP context) {
RegisterValue reg_value;
// If we can reconstruct the register from the frame we are copying from,
- // then do so, otherwise
- // use the value from frame 0.
+ // then do so, otherwise use the value from frame 0.
if (context->ReadRegister(reg_info, reg_value)) {
WriteRegister(reg_info, reg_value);
} else if (frame_zero_context->ReadRegister(reg_info, reg_value)) {
@@ -355,12 +353,11 @@ Status RegisterContext::ReadRegisterValueFromMemory(
return error;
}
- // We now have a memory buffer that contains the part or all of the register
- // value. Set the register value using this memory data.
+ // We now have a memory buffer that contains the part or all of the
+ // register value. Set the register value using this memory data.
// TODO: we might need to add a parameter to this function in case the byte
// order of the memory data doesn't match the process. For now we are
- // assuming
- // they are the same.
+ // assuming they are the same.
reg_value.SetFromMemoryData(reg_info, src, src_len,
process_sp->GetByteOrder(), error);
} else
@@ -381,8 +378,7 @@ Status RegisterContext::WriteRegisterValueToMemory(
// TODO: we might need to add a parameter to this function in case the byte
// order of the memory data doesn't match the process. For now we are
- // assuming
- // they are the same.
+ // assuming they are the same.
const uint32_t bytes_copied = reg_value.GetAsMemoryData(
reg_info, dst, dst_len, process_sp->GetByteOrder(), error);
@@ -431,9 +427,9 @@ ThreadSP RegisterContext::CalculateThread() {
}
StackFrameSP RegisterContext::CalculateStackFrame() {
- // Register contexts might belong to many frames if we have inlined
- // functions inside a frame since all inlined functions share the
- // same registers, so we can't definitively say which frame we come from...
+ // Register contexts might belong to many frames if we have inlined functions
+ // inside a frame since all inlined functions share the same registers, so we
+ // can't definitively say which frame we come from...
return StackFrameSP();
}