|
LLDB mainline
|
#include "lldb/Expression/DWARFExpression.h"#include <cinttypes>#include <optional>#include <vector>#include "lldb/Core/Module.h"#include "lldb/Core/Value.h"#include "lldb/Utility/DataEncoder.h"#include "lldb/Utility/LLDBLog.h"#include "lldb/Utility/Log.h"#include "lldb/Utility/RegisterValue.h"#include "lldb/Utility/Scalar.h"#include "lldb/Utility/StreamString.h"#include "lldb/Utility/VMRange.h"#include "lldb/Host/Host.h"#include "lldb/Utility/Endian.h"#include "lldb/Symbol/Function.h"#include "lldb/Target/ABI.h"#include "lldb/Target/ExecutionContext.h"#include "lldb/Target/Process.h"#include "lldb/Target/RegisterContext.h"#include "lldb/Target/StackFrame.h"#include "lldb/Target/StackID.h"#include "lldb/Target/Target.h"#include "lldb/Target/Thread.h"#include "llvm/DebugInfo/DWARF/DWARFExpressionPrinter.h"#include "llvm/DebugInfo/DWARF/LowLevel/DWARFExpression.h"Go to the source code of this file.
Functions | |
| static lldb::offset_t | GetOpcodeDataSize (const DataExtractor &data, const lldb::offset_t data_offset, const LocationAtom op, const DWARFExpression::Delegate *dwarf_cu) |
Return the length in bytes of the set of operands for op. | |
| static const char * | DW_OP_value_to_name (uint32_t val) |
| static llvm::Error | Evaluate_DW_OP_entry_value (DWARFExpression::Stack &stack, ExecutionContext *exe_ctx, RegisterContext *reg_ctx, const DataExtractor &opcodes, lldb::offset_t &opcode_offset, Log *log) |
| static llvm::Expected< lldb::addr_t > | ResolveLoadAddress (ExecutionContext *exe_ctx, lldb::ModuleSP &module_sp, const char *dw_op_type, lldb::addr_t file_addr, Address &so_addr, bool check_sectionoffset=false) |
| Helper function to move common code used to resolve a file address and turn into a load address. | |
| static Scalar | DerefSizeExtractDataHelper (uint8_t *addr_bytes, size_t size_addr_bytes, ByteOrder byte_order, size_t size) |
| Helper function to load sized data from a uint8_t buffer. | |
| static llvm::Error | Evaluate_DW_OP_deref_size (DWARFExpression::Stack &stack, ExecutionContext *exe_ctx, lldb::ModuleSP module_sp, Process *process, Target *target, uint8_t size, size_t size_addr_bytes, LocationDescriptionKind &dwarf4_location_description_kind) |
|
static |
Helper function to load sized data from a uint8_t buffer.
| addr_bytes | The buffer containing raw data. |
| size_addr_bytes | How large is the underlying raw data. |
| byte_order | What is the byte order of the underlying data. |
| size | How much of the underlying data we want to use. |
Definition at line 871 of file DWARFExpression.cpp.
References lldb_private::DataExtractor::GetAddress(), and lldb_private::DataExtractor::GetMaxU64().
Referenced by Evaluate_DW_OP_deref_size().
|
static |
Definition at line 395 of file DWARFExpression.cpp.
Referenced by lldb_private::DWARFExpression::Evaluate(), and lldb_private::DWARFExpression::GetLocation_DW_OP_addr().
|
static |
Definition at line 882 of file DWARFExpression.cpp.
References DerefSizeExtractDataHelper(), error(), lldb_private::Value::FileAddress, lldb_private::ObjectFile::GetByteOrder(), lldb_private::Process::GetByteOrder(), lldb_private::Value::HostAddress, lldb_private::Value::Invalid, lldb_private::Address::IsSectionOffset(), LLDB_INVALID_ADDRESS, lldb_private::Value::LoadAddress, lldb_private::Memory, lldb_private::Process::ReadMemory(), lldb_private::Target::ReadMemory(), ResolveLoadAddress(), lldb_private::Value::Scalar, and lldb_private::Scalar::TruncOrExtendTo().
Referenced by lldb_private::DWARFExpression::Evaluate().
|
static |
Definition at line 593 of file DWARFExpression.cpp.
References lldb_private::DataExtractor::BytesLeft(), lldb_private::DWARFExpressionList::Evaluate(), lldb_private::SymbolContext::function, lldb_private::Function::GetCallEdgeForReturnAddress(), lldb_private::CallEdge::GetCallee(), lldb_private::CallEdge::GetCallSiteParameters(), lldb_private::DataExtractor::GetData(), lldb_private::StackFrame::GetFrameIndex(), lldb_private::ExecutionContext::GetFramePtr(), lldb_private::Target::GetImages(), lldb_private::Function::GetName(), lldb_private::StackFrame::GetSymbolContext(), lldb_private::Function::GetTailCallingEdges(), lldb_private::ExecutionContext::GetTargetRef(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::DataExtractor::GetULEB128(), lldb_private::ExecutionContext::HasTargetScope(), LLDB_INVALID_ADDRESS, LLDB_LOG, lldb_private::CallSiteParameter::LocationInCaller, and lldb_private::ExecutionContext::SetFrameSP().
Referenced by lldb_private::DWARFExpression::Evaluate().
|
static |
Return the length in bytes of the set of operands for op.
No guarantees are made on the state of data after this call.
Definition at line 132 of file DWARFExpression.cpp.
References lldb_private::DataExtractor::GetAddressByteSize(), lldb_private::DWARFExpression::Delegate::GetAddressByteSize(), lldb_private::DataExtractor::GetU8(), lldb_private::DataExtractor::GetULEB128(), lldb_private::DWARFExpression::Delegate::GetVendorDWARFOpcodeSize(), LLDB_INVALID_OFFSET, and lldb_private::DataExtractor::Skip_LEB128().
Referenced by lldb_private::DWARFExpression::ContainsThreadLocalStorage(), lldb_private::DWARFExpression::GetLocation_DW_OP_addr(), lldb_private::DWARFExpression::LinkThreadLocalStorage(), and lldb_private::DWARFExpression::Update_DW_OP_addr().
|
static |
Helper function to move common code used to resolve a file address and turn into a load address.
| exe_ctx | Pointer to the execution context |
| module_sp | shared_ptr contains the module if we have one |
| dw_op_type | C-style string used to vary the error output |
| file_addr | the file address we are trying to resolve and turn into a load address |
| so_addr | out parameter, will be set to load address or section offset |
| check_sectionoffset | bool which determines if having a section offset but not a load address is considerd a success |
Definition at line 845 of file DWARFExpression.cpp.
References lldb_private::Address::GetLoadAddress(), lldb_private::ExecutionContext::GetTargetPtr(), lldb_private::Address::IsSectionOffset(), and LLDB_INVALID_ADDRESS.
Referenced by ProcessMachCore::DoGetMemoryRegionInfo(), and Evaluate_DW_OP_deref_size().