Ghidra Decompiler Analysis Engine
Public Member Functions | List of all members
SourceFileIndexer Class Reference

class for recording source file information for SLEIGH constructors. More...

#include <sleighbase.hh>

Public Member Functions

int4 index (const string filename)
 Returns the index of the file. If the file is not in the index it is added.
 
int4 getIndex (const string)
 get the index of a file. Error if the file is not in the index.
 
string getFilename (int4)
 get the filename corresponding to an index
 
void restoreXml (const Element *el)
 read a stored index mapping from an XML file
 
void saveXml (ostream &) const
 save the index mapping to an XML file
 

Detailed Description

class for recording source file information for SLEIGH constructors.

A SLEIGH specification may contain many source files. This class is used to associate each constructor in a SLEIGH language to the source file where it is defined. This information is useful when debugging SLEIGH specifications. Sourcefiles are assigned a numeric index and the mapping from indices to filenames is written to the generated .sla file. For each constructor, the data written to the .sla file includes the source file index.


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