diff options
Diffstat (limited to 'lldb/tools/debugserver/source/DNBDataRef.cpp')
-rw-r--r-- | lldb/tools/debugserver/source/DNBDataRef.cpp | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/lldb/tools/debugserver/source/DNBDataRef.cpp b/lldb/tools/debugserver/source/DNBDataRef.cpp index eab379aac3b..9cf0f01d02c 100644 --- a/lldb/tools/debugserver/source/DNBDataRef.cpp +++ b/lldb/tools/debugserver/source/DNBDataRef.cpp @@ -195,105 +195,6 @@ DNBDataRef::GetPointer(offset_t *offset_ptr) const assert(m_ptrSize != 0); return GetMax64(offset_ptr, m_ptrSize); } - -//---------------------------------------------------------------------- -// GetDwarfEHPtr -// -// Used for calls when the value type is specified by a DWARF EH Frame -// pointer encoding. -//---------------------------------------------------------------------- -/* -uint64_t -DNBDataRef::GetDwarfEHPtr(offset_t *offset_ptr, uint32_t encoding) const -{ - if (encoding == DW_EH_PE_omit) - return ULLONG_MAX; // Value isn't in the buffer... - - uint64_t baseAddress = 0; - uint64_t addressValue = 0; - - BOOL signExtendValue = NO; - // Decode the base part or adjust our offset - switch (encoding & 0x70) - { - case DW_EH_PE_pcrel: - // SetEHPtrBaseAddresses should be called prior to extracting these - // so the base addresses are cached. - assert(m_addrPCRelative != INVALID_NUB_ADDRESS); - signExtendValue = YES; - baseAddress = *offset_ptr + m_addrPCRelative; - break; - - case DW_EH_PE_textrel: - // SetEHPtrBaseAddresses should be called prior to extracting these - // so the base addresses are cached. - assert(m_addrTEXT != INVALID_NUB_ADDRESS); - signExtendValue = YES; - baseAddress = m_addrTEXT; - break; - - case DW_EH_PE_datarel: - // SetEHPtrBaseAddresses should be called prior to extracting these - // so the base addresses are cached. - assert(m_addrDATA != INVALID_NUB_ADDRESS); - signExtendValue = YES; - baseAddress = m_addrDATA; - break; - - case DW_EH_PE_funcrel: - signExtendValue = YES; - break; - - case DW_EH_PE_aligned: - // SetPointerSize should be called prior to extracting these so the - // pointer size is cached - assert(m_ptrSize != 0); - if (m_ptrSize) - { - // Align to a address size boundary first - uint32_t alignOffset = *offset_ptr % m_ptrSize; - if (alignOffset) - offset_ptr += m_ptrSize - alignOffset; - } - break; - - default: - break; - } - - // Decode the value part - switch (encoding & DW_EH_PE_MASK_ENCODING) - { - case DW_EH_PE_absptr : addressValue = GetPointer(offset_ptr); break; - case DW_EH_PE_uleb128 : addressValue = Get_ULEB128(offset_ptr); break; - case DW_EH_PE_udata2 : addressValue = Get16(offset_ptr); break; - case DW_EH_PE_udata4 : addressValue = Get32(offset_ptr); break; - case DW_EH_PE_udata8 : addressValue = Get64(offset_ptr); break; - case DW_EH_PE_sleb128 : addressValue = Get_SLEB128(offset_ptr); break; - case DW_EH_PE_sdata2 : addressValue = (int16_t)Get16(offset_ptr); break; - case DW_EH_PE_sdata4 : addressValue = (int32_t)Get32(offset_ptr); break; - case DW_EH_PE_sdata8 : addressValue = (int64_t)Get64(offset_ptr); break; - default: - // Unhandled encoding type - assert(encoding); - break; - } - - // Since we promote everything to 64 bit, we may need to sign extend - if (signExtendValue && m_ptrSize < sizeof(baseAddress)) - { - uint64_t sign_bit = 1ull << ((m_ptrSize * 8ull) - 1ull); - if (sign_bit & addressValue) - { - uint64_t mask = ~sign_bit + 1; - addressValue |= mask; - } - } - return baseAddress + addressValue; -} -*/ - - //---------------------------------------------------------------------- // GetCStr //---------------------------------------------------------------------- |