Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
source/Target/StackFrame.cpp
Show All 23 Lines | |||||
#include "lldb/Symbol/VariableList.h" | #include "lldb/Symbol/VariableList.h" | ||||
#include "lldb/Target/ABI.h" | #include "lldb/Target/ABI.h" | ||||
#include "lldb/Target/ExecutionContext.h" | #include "lldb/Target/ExecutionContext.h" | ||||
#include "lldb/Target/Process.h" | #include "lldb/Target/Process.h" | ||||
#include "lldb/Target/RegisterContext.h" | #include "lldb/Target/RegisterContext.h" | ||||
#include "lldb/Target/StackFrameRecognizer.h" | #include "lldb/Target/StackFrameRecognizer.h" | ||||
#include "lldb/Target/Target.h" | #include "lldb/Target/Target.h" | ||||
#include "lldb/Target/Thread.h" | #include "lldb/Target/Thread.h" | ||||
#include "lldb/Utility/Log.h" | |||||
#include "lldb/Utility/RegisterValue.h" | #include "lldb/Utility/RegisterValue.h" | ||||
#include "lldb/lldb-enumerations.h" | #include "lldb/lldb-enumerations.h" | ||||
#include <memory> | #include <memory> | ||||
using namespace lldb; | using namespace lldb; | ||||
using namespace lldb_private; | using namespace lldb_private; | ||||
▲ Show 20 Lines • Show All 1,312 Lines • ▼ Show 20 Lines | for (const Instruction::Operand &operand : operands) { | ||||
} | } | ||||
switch (base_and_offset.first->m_type) { | switch (base_and_offset.first->m_type) { | ||||
case Instruction::Operand::Type::Immediate: { | case Instruction::Operand::Type::Immediate: { | ||||
lldb_private::Address addr; | lldb_private::Address addr; | ||||
if (target_sp->ResolveLoadAddress(base_and_offset.first->m_immediate + | if (target_sp->ResolveLoadAddress(base_and_offset.first->m_immediate + | ||||
base_and_offset.second, | base_and_offset.second, | ||||
addr)) { | addr)) { | ||||
TypeSystem *c_type_system = | auto c_type_system_or_err = | ||||
target_sp->GetScratchTypeSystemForLanguage(nullptr, eLanguageTypeC); | target_sp->GetScratchTypeSystemForLanguage(eLanguageTypeC); | ||||
if (!c_type_system) { | if (auto err = c_type_system_or_err.takeError()) { | ||||
LLDB_LOG_ERROR( | |||||
lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_THREAD), | |||||
std::move(err), "Unable to guess value for given address"); | |||||
return ValueObjectSP(); | return ValueObjectSP(); | ||||
} else { | } else { | ||||
CompilerType void_ptr_type = | CompilerType void_ptr_type = | ||||
c_type_system | c_type_system_or_err | ||||
->GetBasicTypeFromAST(lldb::BasicType::eBasicTypeChar) | ->GetBasicTypeFromAST(lldb::BasicType::eBasicTypeChar) | ||||
.GetPointerType(); | .GetPointerType(); | ||||
return ValueObjectMemory::Create(this, "", addr, void_ptr_type); | return ValueObjectMemory::Create(this, "", addr, void_ptr_type); | ||||
} | } | ||||
} else { | } else { | ||||
return ValueObjectSP(); | return ValueObjectSP(); | ||||
} | } | ||||
break; | break; | ||||
▲ Show 20 Lines • Show All 590 Lines • Show Last 20 Lines |