C# Class PERWAPI.PDBWriter

Writes PDB files
Show file Open project: xored/f4 Class Usage Examples

Public Methods

Method Description
AddSequencePoint ( string sourceFile, System.Guid docLanguage, System.Guid langVendor, System.Guid docType, uint offset, uint line, uint col, uint endLine, uint endCol ) : void

Add a new sequnce point.

BindLocal ( string name, int idx, uint token, int startOffset, int endOffset ) : void

Bind a local to the current scope.

CloseMethod ( ) : void

Close the current method.

CloseScope ( int offset ) : void

Close the current scope at the given offset.

OpenMethod ( int token ) : void

Open a method. Scopes and sequence points will be added to this method.

OpenScope ( int offset ) : void

Open a new scope.

PDBWriter ( string PEFilename ) : System

Create a new instance of the PDB Writer

SetEntryPoint ( int token ) : void

Set the entry method of the applicaiton

WritePDBFile ( ) : void

Write the PDB file to disk.

Private Methods

Method Description
WriteScopeAndLocals ( SymbolWriter symWriter, Scope scope ) : void

Write out the scopes and the locals to the PDB file.

Method Details

AddSequencePoint() public method

Add a new sequnce point.
public AddSequencePoint ( string sourceFile, System.Guid docLanguage, System.Guid langVendor, System.Guid docType, uint offset, uint line, uint col, uint endLine, uint endCol ) : void
sourceFile string The source file the sequence point is in.
docLanguage System.Guid The language of the source file.
langVendor System.Guid The language vendor of the source file.
docType System.Guid The document type.
offset uint The offset of the sequence point.
line uint The starting line for the sequence point.
col uint The starting column for the sequence point.
endLine uint The ending line for the sequence point.
endCol uint The ending column for the sequence point.
return void

BindLocal() public method

Bind a local to the current scope.
public BindLocal ( string name, int idx, uint token, int startOffset, int endOffset ) : void
name string The name of the variable.
idx int The index of the variable in the locals table.
token uint The symbol token for the given variable.
startOffset int The starting offset for the binding. Set to 0 to default to current scope.
endOffset int The ending offset for the binding. Set to 0 to default to current scope.
return void

CloseMethod() public method

Close the current method.
public CloseMethod ( ) : void
return void

CloseScope() public method

Close the current scope at the given offset.
public CloseScope ( int offset ) : void
offset int The offset of where to close the scope.
return void

OpenMethod() public method

Open a method. Scopes and sequence points will be added to this method.
public OpenMethod ( int token ) : void
token int The token for this method.
return void

OpenScope() public method

Open a new scope.
public OpenScope ( int offset ) : void
offset int Offset as to where the scope should start.
return void

PDBWriter() public method

Create a new instance of the PDB Writer
public PDBWriter ( string PEFilename ) : System
PEFilename string The name of the PE file we are writting the PDB file for.
return System

SetEntryPoint() public method

Set the entry method of the applicaiton
public SetEntryPoint ( int token ) : void
token int The token for the entry method.
return void

WritePDBFile() public method

Write the PDB file to disk.
public WritePDBFile ( ) : void
return void