[Lldb-commits] [lldb] r351564 - Make sure to fill in the compiler register number so when we try to backtrace using EH frame, it works.
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 18 09:06:01 PST 2019
Author: gclayton
Date: Fri Jan 18 09:06:01 2019
New Revision: 351564
URL: http://llvm.org/viewvc/llvm-project?rev=351564&view=rev
Log:
Make sure to fill in the compiler register number so when we try to backtrace using EH frame, it works.
Prior to this, backtraces could fail due to not being able to convert a EH frame register number to LLDB register number.
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=351564&r1=351563&r2=351564&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.cpp (original)
+++ lldb/trunk/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.cpp Fri Jan 18 09:06:01 2019
@@ -30,33 +30,35 @@ using namespace minidump;
#define DEF_R(i) \
{ \
"r" #i, nullptr, 4, OFFSET(r) + i * 4, eEncodingUint, eFormatHex, \
- {INV, dwarf_r##i, INV, INV, reg_r##i}, nullptr, nullptr, nullptr, 0 \
+ {dwarf_r##i, 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 * 4, eEncodingUint, eFormatHex, \
- {INV, dwarf_r##i, LLDB_REGNUM_GENERIC_ARG1 + i, INV, reg_r##i}, \
+ {dwarf_r##i, 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 * 8, eEncodingVector, \
- eFormatVectorOfUInt8, {INV, dwarf_d##i, INV, INV, reg_d##i}, \
+ eFormatVectorOfUInt8, {dwarf_d##i, dwarf_d##i, INV, INV, reg_d##i}, \
nullptr, nullptr, nullptr, 0 \
}
#define DEF_S(i) \
{ \
"s" #i, nullptr, 4, OFFSET(s) + i * 4, eEncodingIEEE754, eFormatFloat, \
- {INV, dwarf_s##i, INV, INV, reg_s##i}, nullptr, nullptr, nullptr, 0 \
+ {dwarf_s##i, dwarf_s##i, INV, INV, reg_s##i}, \
+ nullptr, nullptr, nullptr, 0 \
}
#define DEF_Q(i) \
{ \
"q" #i, nullptr, 16, OFFSET(q) + i * 16, eEncodingVector, \
- eFormatVectorOfUInt8, {INV, dwarf_q##i, INV, INV, reg_q##i}, \
+ eFormatVectorOfUInt8, {dwarf_q##i, dwarf_q##i, INV, INV, reg_q##i}, \
nullptr, nullptr, nullptr, 0 \
}
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=351564&r1=351563&r2=351564&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/minidump/RegisterContextMinidump_ARM64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/minidump/RegisterContextMinidump_ARM64.cpp Fri Jan 18 09:06:01 2019
@@ -29,8 +29,8 @@ using namespace minidump;
#define DEF_X(i) \
{ \
"x" #i, nullptr, 8, OFFSET(x) + i * 8, eEncodingUint, eFormatHex, \
- {INV, arm64_dwarf::x##i, INV, INV, reg_x##i}, nullptr, nullptr, \
- nullptr, 0 \
+ {arm64_dwarf::x##i, arm64_dwarf::x##i, INV, INV, reg_x##i}, \
+ nullptr, nullptr, nullptr, 0 \
}
#define DEF_W(i) \
@@ -42,15 +42,15 @@ using namespace minidump;
#define DEF_X_ARG(i, n) \
{ \
"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 \
+ {arm64_dwarf::x##i, 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, \
- eFormatVectorOfUInt8, {INV, arm64_dwarf::v##i, INV, INV, reg_v##i}, \
- nullptr, nullptr, nullptr, 0 \
+ eFormatVectorOfUInt8, {arm64_dwarf::v##i, arm64_dwarf::v##i, INV, INV, \
+ reg_v##i}, nullptr, nullptr, nullptr, 0 \
}
#define DEF_D(i) \
@@ -314,7 +314,7 @@ static RegisterInfo g_reg_infos[] = {
OFFSET(x) + 29 * 8,
eEncodingUint,
eFormatHex,
- {INV, arm64_dwarf::x29, LLDB_REGNUM_GENERIC_FP, INV, reg_fp},
+ {arm64_dwarf::x29, arm64_dwarf::x29, LLDB_REGNUM_GENERIC_FP, INV, reg_fp},
nullptr,
nullptr,
nullptr,
@@ -325,7 +325,7 @@ static RegisterInfo g_reg_infos[] = {
OFFSET(x) + 30 * 8,
eEncodingUint,
eFormatHex,
- {INV, arm64_dwarf::x30, LLDB_REGNUM_GENERIC_RA, INV, reg_lr},
+ {arm64_dwarf::x30, arm64_dwarf::x30, LLDB_REGNUM_GENERIC_RA, INV, reg_lr},
nullptr,
nullptr,
nullptr,
@@ -336,7 +336,7 @@ static RegisterInfo g_reg_infos[] = {
OFFSET(x) + 31 * 8,
eEncodingUint,
eFormatHex,
- {INV, arm64_dwarf::x31, LLDB_REGNUM_GENERIC_SP, INV, reg_sp},
+ {arm64_dwarf::x31, arm64_dwarf::x31, LLDB_REGNUM_GENERIC_SP, INV, reg_sp},
nullptr,
nullptr,
nullptr,
@@ -347,7 +347,7 @@ static RegisterInfo g_reg_infos[] = {
OFFSET(pc),
eEncodingUint,
eFormatHex,
- {INV, arm64_dwarf::pc, LLDB_REGNUM_GENERIC_PC, INV, reg_pc},
+ {arm64_dwarf::pc, arm64_dwarf::pc, LLDB_REGNUM_GENERIC_PC, INV, reg_pc},
nullptr,
nullptr,
nullptr,
More information about the lldb-commits
mailing list