[Lldb-commits] [lldb] r181756 - Small change to the previous checkin, read in the fpu register context
Jason Molenda
jmolenda at apple.com
Mon May 13 20:52:22 PDT 2013
Author: jmolenda
Date: Mon May 13 22:52:22 2013
New Revision: 181756
URL: http://llvm.org/viewvc/llvm-project?rev=181756&view=rev
Log:
Small change to the previous checkin, read in the fpu register context
in one large block - and be sure toget the fpscr value as well when
processing a core file.
Modified:
lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp?rev=181756&r1=181755&r2=181756&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Mon May 13 22:52:22 2013
@@ -305,12 +305,18 @@ public:
case FPURegSet:
{
- uint32_t *d = &fpu.floats.s[0];
- for (uint32_t i = 0; i < count && d < d + (sizeof (fpu.floats) / sizeof (uint32_t)); i++)
+ uint8_t *fpu_reg_buf = (uint8_t*) &fpu.floats.s[0];
+ const int fpu_reg_buf_size = sizeof (fpu.floats);
+ if (data.ExtractBytes (offset, fpu_reg_buf_size, eByteOrderLittle, fpu_reg_buf) == fpu_reg_buf_size)
{
- *d++ = data.GetU32(&offset);
+ offset += fpu_reg_buf_size;
+ fpu.fpscr = data.GetU32(&offset);
+ SetError (FPURegSet, Read, 0);
+ }
+ else
+ {
+ done = true;
}
- SetError (FPURegSet, Read, 0);
}
break;
More information about the lldb-commits
mailing list