LLVM 19.0.0git
Public Types | Public Member Functions | List of all members
llvm::DWARFDebugLine::SectionParser Class Reference

Helper to allow for parsing of an entire .debug_line section in sequence. More...

#include "llvm/DebugInfo/DWARF/DWARFDebugLine.h"

Public Types

using LineToUnitMap = std::map< uint64_t, DWARFUnit * >
 

Public Member Functions

 SectionParser (DWARFDataExtractor &Data, const DWARFContext &C, DWARFUnitVector::iterator_range Units)
 
LineTable parseNext (function_ref< void(Error)> RecoverableErrorHandler, function_ref< void(Error)> UnrecoverableErrorHandler, raw_ostream *OS=nullptr, bool Verbose=false)
 Get the next line table from the section.
 
void skip (function_ref< void(Error)> RecoverableErrorHandler, function_ref< void(Error)> UnrecoverableErrorHandler)
 Skip the current line table and go to the following line table (if present) immediately.
 
bool done () const
 Indicates if the parser has parsed as much as possible.
 
uint64_t getOffset () const
 Get the offset the parser has reached.
 

Detailed Description

Helper to allow for parsing of an entire .debug_line section in sequence.

Definition at line 318 of file DWARFDebugLine.h.

Member Typedef Documentation

◆ LineToUnitMap

Definition at line 320 of file DWARFDebugLine.h.

Constructor & Destructor Documentation

◆ SectionParser()

DWARFDebugLine::SectionParser::SectionParser ( DWARFDataExtractor Data,
const DWARFContext C,
DWARFUnitVector::iterator_range  Units 
)

Member Function Documentation

◆ done()

bool llvm::DWARFDebugLine::SectionParser::done ( ) const
inline

Indicates if the parser has parsed as much as possible.

Note
Certain problems with the line table structure might mean that parsing stops before the end of the section is reached.

Definition at line 354 of file DWARFDebugLine.h.

◆ getOffset()

uint64_t llvm::DWARFDebugLine::SectionParser::getOffset ( ) const
inline

Get the offset the parser has reached.

Definition at line 357 of file DWARFDebugLine.h.

◆ parseNext()

DWARFDebugLine::LineTable DWARFDebugLine::SectionParser::parseNext ( function_ref< void(Error)>  RecoverableErrorHandler,
function_ref< void(Error)>  UnrecoverableErrorHandler,
raw_ostream OS = nullptr,
bool  Verbose = false 
)

Get the next line table from the section.

Report any issues via the handlers.

Parameters
RecoverableErrorHandler- any issues that don't prevent further parsing of the table will be reported through this handler.
UnrecoverableErrorHandler- any issues that prevent further parsing of the table will be reported through this handler.
OS- if not null, the parser will print information about the table as it parses it.
Verbose- if true, the parser will print verbose information when printing to the output.

Definition at line 1542 of file DWARFDebugLine.cpp.

References assert(), Context, llvm::DataExtractor::isValidOffset(), llvm::Offset, OS, and llvm::Verbose.

◆ skip()

void DWARFDebugLine::SectionParser::skip ( function_ref< void(Error)>  RecoverableErrorHandler,
function_ref< void(Error)>  UnrecoverableErrorHandler 
)

Skip the current line table and go to the following line table (if present) immediately.

Parameters
RecoverableErrorHandler- report any recoverable prologue parsing issues via this handler.
UnrecoverableErrorHandler- report any unrecoverable prologue parsing issues via this handler.

Definition at line 1558 of file DWARFDebugLine.cpp.

References assert(), Context, llvm::DataExtractor::isValidOffset(), and llvm::Offset.


The documentation for this class was generated from the following files: