Fix offsetof usage that got lost when passing patches between linux and mac.

llvm-svn: 339033
This commit is contained in:
Greg Clayton 2018-08-06 17:07:50 +00:00
parent 19c8f394bc
commit d6836209a7
2 changed files with 16 additions and 14 deletions

View File

@ -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

View File

@ -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 \
}