LLDB mainline
DWARFDataExtractor.cpp
Go to the documentation of this file.
1//===-- DWARFDataExtractor.cpp --------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
10#include "llvm/ADT/StringRef.h"
11
12namespace lldb_private {
13
14uint64_t
16 return GetU32(offset_ptr);
17}
18
21 return GetMaxU64(offset_ptr, GetDWARFSizeOfOffset());
22}
23
24llvm::DWARFDataExtractor DWARFDataExtractor::GetAsLLVMDWARF() const {
25 return llvm::DWARFDataExtractor(llvm::ArrayRef(GetDataStart(), GetByteSize()),
28}
29llvm::DataExtractor DWARFDataExtractor::GetAsLLVM() const {
30 return llvm::DataExtractor(llvm::ArrayRef(GetDataStart(), GetByteSize()),
33}
34} // namespace lldb_private
uint64_t GetDWARFInitialLength(lldb::offset_t *offset_ptr) const
llvm::DWARFDataExtractor GetAsLLVMDWARF() const
dw_offset_t GetDWARFOffset(lldb::offset_t *offset_ptr) const
llvm::DataExtractor GetAsLLVM() const
uint32_t GetU32(lldb::offset_t *offset_ptr) const
Extract a uint32_t value from *offset_ptr.
uint64_t GetByteSize() const
Get the number of bytes contained in this object.
const uint8_t * GetDataStart() const
Get the data start pointer.
uint32_t GetAddressByteSize() const
Get the current address size.
uint64_t GetMaxU64(lldb::offset_t *offset_ptr, size_t byte_size) const
Extract an unsigned integer of size byte_size from *offset_ptr.
lldb::ByteOrder GetByteOrder() const
Get the current byte order value.
uint64_t dw_offset_t
Definition: dwarf.h:31
A class that represents a running process on the host machine.
Definition: SBAttachInfo.h:14
uint64_t offset_t
Definition: lldb-types.h:83
@ eByteOrderLittle