LLVM 22.0.0git
DWARFDebugLine.cpp File Reference
#include "llvm/DebugInfo/DWARF/DWARFDebugLine.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/DebugInfo/DWARF/DWARFDataExtractor.h"
#include "llvm/DebugInfo/DWARF/DWARFDie.h"
#include "llvm/DebugInfo/DWARF/DWARFFormValue.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cinttypes>
#include <cstdint>
#include <cstdio>
#include <utility>

Go to the source code of this file.

Functions

static bool versionIsSupported (uint16_t Version)
static Error parseV2DirFileTables (const DWARFDataExtractor &DebugLineData, uint64_t *OffsetPtr, DWARFDebugLine::ContentTypeTracker &ContentTypes, std::vector< DWARFFormValue > &IncludeDirectories, std::vector< DWARFDebugLine::FileNameEntry > &FileNames)
static llvm::Expected< ContentDescriptors > parseV5EntryFormat (const DWARFDataExtractor &DebugLineData, uint64_t *OffsetPtr, DWARFDebugLine::ContentTypeTracker *ContentTypes)
static Error parseV5DirFileTables (const DWARFDataExtractor &DebugLineData, uint64_t *OffsetPtr, const dwarf::FormParams &FormParams, const DWARFContext &Ctx, const DWARFUnit *U, DWARFDebugLine::ContentTypeTracker &ContentTypes, std::vector< DWARFFormValue > &IncludeDirectories, std::vector< DWARFDebugLine::FileNameEntry > &FileNames)
static StringRef getOpcodeName (uint8_t Opcode, uint8_t OpcodeBase)
template<typename T>
static std::optional< TparseULEB128 (DWARFDataExtractor &Data, DataExtractor::Cursor &Cursor)
 Parse a ULEB128 using the specified Cursor.
static bool isPathAbsoluteOnWindowsOrPosix (const Twine &Path)
static DWARFDebugLine::SectionParser::LineToUnitMap buildLineToUnitMap (DWARFUnitVector::iterator_range Units)

Function Documentation

◆ buildLineToUnitMap()

◆ getOpcodeName()

StringRef getOpcodeName ( uint8_t Opcode,
uint8_t OpcodeBase )
static

Definition at line 627 of file DWARFDebugLine.cpp.

References assert(), and llvm::dwarf::LNStandardString().

◆ isPathAbsoluteOnWindowsOrPosix()

bool isPathAbsoluteOnWindowsOrPosix ( const Twine & Path)
static

◆ parseULEB128()

template<typename T>
std::optional< T > parseULEB128 ( DWARFDataExtractor & Data,
DataExtractor::Cursor & Cursor )
static

Parse a ULEB128 using the specified Cursor.

Returns
the parsed value on success, or std::nullopt if Cursor is in a failing state.

Definition at line 781 of file DWARFDebugLine.cpp.

References llvm::Data, and T.

Referenced by llvm::DWARFDebugLine::LineTable::parse().

◆ parseV2DirFileTables()

◆ parseV5DirFileTables()

◆ parseV5EntryFormat()

◆ versionIsSupported()

bool versionIsSupported ( uint16_t Version)
static