[Lldb-commits] [lldb] r339033 - Fix offsetof usage that got lost when passing patches between linux and mac.
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 6 10:07:50 PDT 2018
Author: gclayton
Date: Mon Aug 6 10:07:50 2018
New Revision: 339033
URL: http://llvm.org/viewvc/llvm-project?rev=339033&view=rev
Log:
Fix offsetof usage that got lost when passing patches between linux and mac.
Modified:
lldb/trunk/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.cpp
lldb/trunk/source/Plugins/Process/minidump/RegisterContextMinidump_ARM64.cpp
Modified: lldb/trunk/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.cpp?rev=339033&r1=339032&r2=339033&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.cpp (original)
+++ lldb/trunk/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.cpp Mon Aug 6 10:07:50 2018
@@ -31,33 +31,35 @@ using namespace minidump;
#define DEF_R(i) \
{ \
- "r" #i, nullptr, 4, OFFSET(r[i]), eEncodingUint, eFormatHex, \
+ "r" #i, nullptr, 4, OFFSET(r) + i * 4, eEncodingUint, eFormatHex, \
{INV, dwarf_r##i, INV, INV, reg_r##i}, nullptr, nullptr, nullptr, 0 \
}
#define DEF_R_ARG(i, n) \
{ \
- "r" #i, "arg" #n, 4, OFFSET(r[i]), eEncodingUint, eFormatHex, \
+ "r" #i, "arg" #n, 4, OFFSET(r) + i * 4, eEncodingUint, eFormatHex, \
{INV, dwarf_r##i, LLDB_REGNUM_GENERIC_ARG1 + i, INV, reg_r##i}, \
nullptr, nullptr, nullptr, 0 \
}
#define DEF_D(i) \
{ \
- "d" #i, nullptr, 8, OFFSET(d[i]), eEncodingVector, eFormatVectorOfUInt8, \
- {INV, dwarf_d##i, INV, INV, reg_d##i}, nullptr, nullptr, nullptr, 0 \
+ "d" #i, nullptr, 8, OFFSET(d) + i * 8, eEncodingVector, \
+ eFormatVectorOfUInt8, {INV, dwarf_d##i, INV, INV, reg_d##i}, \
+ nullptr, nullptr, nullptr, 0 \
}
#define DEF_S(i) \
{ \
- "s" #i, nullptr, 4, OFFSET(s[i]), eEncodingIEEE754, eFormatFloat, \
+ "s" #i, nullptr, 4, OFFSET(s) + i * 4, eEncodingIEEE754, eFormatFloat, \
{INV, dwarf_s##i, INV, INV, reg_s##i}, nullptr, nullptr, nullptr, 0 \
}
#define DEF_Q(i) \
{ \
- "q" #i, nullptr, 16, OFFSET(q[i]), eEncodingVector, eFormatVectorOfUInt8, \
- {INV, dwarf_q##i, INV, INV, reg_q##i}, nullptr, nullptr, nullptr, 0 \
+ "q" #i, nullptr, 16, OFFSET(q) + i * 16, eEncodingVector, \
+ eFormatVectorOfUInt8, {INV, dwarf_q##i, INV, INV, reg_q##i}, \
+ nullptr, nullptr, nullptr, 0 \
}
// Zero based LLDB register numbers for this register context
Modified: lldb/trunk/source/Plugins/Process/minidump/RegisterContextMinidump_ARM64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/minidump/RegisterContextMinidump_ARM64.cpp?rev=339033&r1=339032&r2=339033&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/minidump/RegisterContextMinidump_ARM64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/minidump/RegisterContextMinidump_ARM64.cpp Mon Aug 6 10:07:50 2018
@@ -30,48 +30,48 @@ using namespace minidump;
#define DEF_X(i) \
{ \
- "x" #i, nullptr, 8, OFFSET(x[i]), eEncodingUint, eFormatHex, \
+ "x" #i, nullptr, 8, OFFSET(x) + i * 8, eEncodingUint, eFormatHex, \
{INV, arm64_dwarf::x##i, INV, INV, reg_x##i}, nullptr, nullptr, \
nullptr, 0 \
}
#define DEF_W(i) \
{ \
- "w" #i, nullptr, 4, OFFSET(x[i]), eEncodingUint, eFormatHex, \
+ "w" #i, nullptr, 4, OFFSET(x) + i * 8, eEncodingUint, eFormatHex, \
{INV, INV, INV, INV, reg_w##i}, nullptr, nullptr, nullptr, 0 \
}
#define DEF_X_ARG(i, n) \
{ \
- "x" #i, "arg" #n, 8, OFFSET(x[i]), eEncodingUint, eFormatHex, \
+ "x" #i, "arg" #n, 8, OFFSET(x) + i * 8, eEncodingUint, eFormatHex, \
{INV, arm64_dwarf::x##i, LLDB_REGNUM_GENERIC_ARG1 + i, INV, reg_x##i}, \
nullptr, nullptr, nullptr, 0 \
}
#define DEF_V(i) \
{ \
- "v" #i, nullptr, 16, OFFSET(v[i * 16]), eEncodingVector, \
+ "v" #i, nullptr, 16, OFFSET(v) + i * 16, eEncodingVector, \
eFormatVectorOfUInt8, {INV, arm64_dwarf::v##i, INV, INV, reg_v##i}, \
nullptr, nullptr, nullptr, 0 \
}
#define DEF_D(i) \
{ \
- "d" #i, nullptr, 8, OFFSET(v[i * 16]), eEncodingVector, \
+ "d" #i, nullptr, 8, OFFSET(v) + i * 16, eEncodingVector, \
eFormatVectorOfUInt8, {INV, INV, INV, INV, reg_d##i}, nullptr, \
nullptr, nullptr, 0 \
}
#define DEF_S(i) \
{ \
- "s" #i, nullptr, 4, OFFSET(v[i * 16]), eEncodingVector, \
+ "s" #i, nullptr, 4, OFFSET(v) + i * 16, eEncodingVector, \
eFormatVectorOfUInt8, {INV, INV, INV, INV, reg_s##i}, nullptr, \
nullptr, nullptr, 0 \
}
#define DEF_H(i) \
{ \
- "h" #i, nullptr, 2, OFFSET(v[i * 16]), eEncodingVector, \
+ "h" #i, nullptr, 2, OFFSET(v) + i * 16, eEncodingVector, \
eFormatVectorOfUInt8, {INV, INV, INV, INV, reg_h##i}, nullptr, \
nullptr, nullptr, 0 \
}
More information about the lldb-commits
mailing list