class DwarfTransformer
Declaration
class DwarfTransformer { /* full declaration omitted */ };
Description
A class that transforms the DWARF in a DWARFContext into GSYM information by populating the GsymCreator object that it is constructed with. This class supports converting all DW_TAG_subprogram DIEs into gsym::FunctionInfo objects that includes line table information and inline function information. Creating a separate class to transform this data allows this class to be unit tested.
Declared at: llvm/include/llvm/DebugInfo/GSYM/DwarfTransformer.h:32
Member Variables
- private llvm::DWARFContext& DICtx
- private llvm::raw_ostream& Log
- private llvm::gsym::GsymCreator& Gsym
Method Overview
- public DwarfTransformer(llvm::DWARFContext & D, llvm::raw_ostream & OS, llvm::gsym::GsymCreator & G)
- public llvm::Error convert(uint32_t NumThreads)
- private void handleDie(llvm::raw_ostream & Strm, llvm::gsym::CUInfo & CUI, llvm::DWARFDie Die)
- private llvm::Error parse()
- public llvm::Error verify(llvm::StringRef GsymPath)
Methods
¶DwarfTransformer(llvm::DWARFContext& D,
llvm::raw_ostream& OS,
llvm::gsym::GsymCreator& G)
DwarfTransformer(llvm::DWARFContext& D,
llvm::raw_ostream& OS,
llvm::gsym::GsymCreator& G)
Description
Create a DWARF transformer.
Declared at: llvm/include/llvm/DebugInfo/GSYM/DwarfTransformer.h:43
Parameters
- llvm::DWARFContext& D
- The DWARF to use when converting to GSYM.
- llvm::raw_ostream& OS
- The stream to log warnings and non fatal issues to.
- llvm::gsym::GsymCreator& G
- The GSYM creator to populate with the function information from the debug info.
¶llvm::Error convert(uint32_t NumThreads)
llvm::Error convert(uint32_t NumThreads)
Description
Extract the DWARF from the supplied object file and convert it into the Gsym format in the GsymCreator object that is passed in. Returns an error if something fatal is encountered.
Declared at: llvm/include/llvm/DebugInfo/GSYM/DwarfTransformer.h:52
Parameters
- uint32_t NumThreads
Returns
An error indicating any fatal issues that happen when parsing the DWARF, or Error::success() if all goes well.
¶void handleDie(llvm::raw_ostream& Strm,
llvm::gsym::CUInfo& CUI,
llvm::DWARFDie Die)
void handleDie(llvm::raw_ostream& Strm,
llvm::gsym::CUInfo& CUI,
llvm::DWARFDie Die)
Description
Handle any DIE (debug info entry) from the DWARF. This function will find all DW_TAG_subprogram DIEs that convert them into GSYM FuntionInfo objects and add them to the GsymCreator supplied during construction. The DIE and all its children will be recursively parsed with calls to this function.
Declared at: llvm/include/llvm/DebugInfo/GSYM/DwarfTransformer.h:79
Parameters
- llvm::raw_ostream& Strm
- The thread specific log stream for any non fatal errors and warnings. Once a thread has finished parsing an entire compile unit, all information in this temporary stream will be forwarded to the member variable log. This keeps logging thread safe.
- llvm::gsym::CUInfo& CUI
- The compile unit specific information that contains the DWARF line table, cached file list, and other compile unit specific information.
- llvm::DWARFDie Die
- The DWARF debug info entry to parse.
¶llvm::Error parse()
llvm::Error parse()
Description
Parse the DWARF in the object file and convert it into the GsymCreator.
Declared at: llvm/include/llvm/DebugInfo/GSYM/DwarfTransformer.h:60
¶llvm::Error verify(llvm::StringRef GsymPath)
llvm::Error verify(llvm::StringRef GsymPath)
Declared at: llvm/include/llvm/DebugInfo/GSYM/DwarfTransformer.h:54
Parameters
- llvm::StringRef GsymPath