tberghammer created this revision.
tberghammer added reviewers: ovyalov, clayborg.
tberghammer added a subscriber: lldb-commits.
Add support for DW_OP_push_object_address in dwarf expressions
Additionally fix the type of some dwarf expression where we had a confusion
between scalar and load address types after a dereference.
http://reviews.llvm.org/D17604
Files:
include/lldb/Expression/DWARFExpression.h
source/Core/ValueObjectVariable.cpp
source/Expression/DWARFExpression.cpp
source/Plugins/Process/Utility/RegisterContextLLDB.cpp
source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.cpp
source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
source/Target/StackFrame.cpp
Index: source/Target/StackFrame.cpp
===
--- source/Target/StackFrame.cpp
+++ source/Target/StackFrame.cpp
@@ -1221,8 +1221,15 @@
if (m_sc.function->GetFrameBaseExpression().IsLocationList())
loclist_base_addr = m_sc.function->GetAddressRange().GetBaseAddress().GetLoadAddress (exe_ctx.GetTargetPtr());
-if (!m_sc.function->GetFrameBaseExpression().Evaluate(_ctx, nullptr, nullptr, nullptr, loclist_base_addr,
- nullptr, expr_value, _frame_base_error))
+if (m_sc.function->GetFrameBaseExpression().Evaluate(_ctx,
+ nullptr,
+ nullptr,
+ nullptr,
+ loclist_base_addr,
+ nullptr,
+ nullptr,
+ expr_value,
+ _frame_base_error) == false)
{
// We should really have an error if evaluate returns, but in case
// we don't, lets set the error to something at least.
Index: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
===
--- source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -1063,7 +1063,6 @@
if (cu_die)
{
const char * cu_comp_dir = resolveCompDir(cu_die.GetAttributeValueAsString(DW_AT_comp_dir, nullptr));
-
const dw_offset_t stmt_list = cu_die.GetAttributeValueAsUnsigned(DW_AT_stmt_list, DW_INVALID_OFFSET);
if (stmt_list != DW_INVALID_OFFSET)
{
@@ -1832,7 +1831,7 @@
const DWARFExpression = var_sp->LocationExpression();
Value location_result;
Error error;
-if (location.Evaluate(NULL, NULL, NULL, LLDB_INVALID_ADDRESS, NULL, location_result, ))
+if (location.Evaluate(nullptr, nullptr, nullptr, LLDB_INVALID_ADDRESS, nullptr, nullptr, location_result, ))
{
if (location_result.GetValueType() == Value::eValueTypeFileAddress)
{
Index: source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.cpp
===
--- source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.cpp
+++ source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.cpp
@@ -715,7 +715,7 @@
NULL, // RegisterContext *
module_sp, debug_info_data, die.GetCU(),
block_offset, block_length, eRegisterKindDWARF,
- , memberOffset, NULL))
+ , NULL, memberOffset, NULL))
{
member_byte_offset = memberOffset.ResolveValue(NULL).UInt();
}
Index: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
===
--- source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -2702,19 +2702,20 @@
const DWARFDataExtractor& debug_info_data = die.GetDWARF()->get_debug_info_data();
uint32_t block_length = form_value.Unsigned();