LLDB
mainline
llvm-project
lldb
source
Plugins
SymbolFile
DWARF
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
9
#include "
DWARFDataExtractor.h
"
10
#include "llvm/ADT/StringRef.h"
11
12
namespace
lldb_private
{
13
14
uint64_t
15
DWARFDataExtractor::GetDWARFInitialLength
(
lldb::offset_t
*offset_ptr)
const
{
16
return
GetU32
(offset_ptr);
17
}
18
19
dw_offset_t
20
DWARFDataExtractor::GetDWARFOffset
(
lldb::offset_t
*offset_ptr)
const
{
21
return
GetMaxU64
(offset_ptr,
GetDWARFSizeOfOffset
());
22
}
23
24
llvm::DWARFDataExtractor
DWARFDataExtractor::GetAsLLVMDWARF
()
const
{
25
return
llvm::DWARFDataExtractor(llvm::ArrayRef(
GetDataStart
(),
GetByteSize
()),
26
GetByteOrder
() ==
lldb::eByteOrderLittle
,
27
GetAddressByteSize
());
28
}
29
llvm::DataExtractor
DWARFDataExtractor::GetAsLLVM
()
const
{
30
return
llvm::DataExtractor(llvm::ArrayRef(
GetDataStart
(),
GetByteSize
()),
31
GetByteOrder
() ==
lldb::eByteOrderLittle
,
32
GetAddressByteSize
());
33
}
34
}
// namespace lldb_private
DWARFDataExtractor.h
lldb_private::DWARFDataExtractor::GetDWARFInitialLength
uint64_t GetDWARFInitialLength(lldb::offset_t *offset_ptr) const
Definition:
DWARFDataExtractor.cpp:15
lldb_private::DWARFDataExtractor::GetDWARFSizeOfOffset
size_t GetDWARFSizeOfOffset() const
Definition:
DWARFDataExtractor.h:31
lldb_private::DWARFDataExtractor::GetAsLLVMDWARF
llvm::DWARFDataExtractor GetAsLLVMDWARF() const
Definition:
DWARFDataExtractor.cpp:24
lldb_private::DWARFDataExtractor::GetDWARFOffset
dw_offset_t GetDWARFOffset(lldb::offset_t *offset_ptr) const
Definition:
DWARFDataExtractor.cpp:20
lldb_private::DWARFDataExtractor::GetAsLLVM
llvm::DataExtractor GetAsLLVM() const
Definition:
DWARFDataExtractor.cpp:29
lldb_private::DataExtractor::GetU32
uint32_t GetU32(lldb::offset_t *offset_ptr) const
Extract a uint32_t value from *offset_ptr.
Definition:
DataExtractor.cpp:426
lldb_private::DataExtractor::GetByteSize
uint64_t GetByteSize() const
Get the number of bytes contained in this object.
Definition:
DataExtractor.h:270
lldb_private::DataExtractor::GetDataStart
const uint8_t * GetDataStart() const
Get the data start pointer.
Definition:
DataExtractor.h:422
lldb_private::DataExtractor::GetAddressByteSize
uint32_t GetAddressByteSize() const
Get the current address size.
Definition:
DataExtractor.h:264
lldb_private::DataExtractor::GetMaxU64
uint64_t GetMaxU64(lldb::offset_t *offset_ptr, size_t byte_size) const
Extract an unsigned integer of size byte_size from *offset_ptr.
Definition:
DataExtractor.cpp:525
lldb_private::DataExtractor::GetByteOrder
lldb::ByteOrder GetByteOrder() const
Get the current byte order value.
Definition:
DataExtractor.h:594
dw_offset_t
uint64_t dw_offset_t
Definition:
dwarf.h:31
lldb_private
A class that represents a running process on the host machine.
Definition:
SBAddressRange.h:14
lldb::offset_t
uint64_t offset_t
Definition:
lldb-types.h:85
lldb::eByteOrderLittle
@ eByteOrderLittle
Definition:
lldb-enumerations.h:143
Generated on Wed Nov 20 2024 18:15:28 for LLDB by
1.9.6