Main Page | Class Hierarchy | Class List | File List | Class Members | Related Pages

DebugDirectory Class Reference

Class that handles the Debug directory. More...

#include <DebugDirectory.h>

List of all members.

Public Member Functions

void addEntry ()
 Adds a new debug structure.

dword getAddressOfRawData (unsigned int uiIndex) const
 Returns the AddressOfRawData value of a debug structure.

dword getCharacteristics (unsigned int uiIndex) const
 Returns the Characteristics value of a debug structure.

word getMajorVersion (unsigned int uiIndex) const
 Returns the MajorVersion value of a debug structure.

word getMinorVersion (unsigned int uiIndex) const
 Returns the MinorVersion value of a debug structure.

unsigned int getNumberOfEntries () const
 Returns the number of DebugDirectory image structures in the current DebugDirectory.

dword getPointerToRawData (unsigned int uiIndex) const
 Returns the PointerToRawData value of a debug structure.

dword getSizeOfData (unsigned int uiIndex) const
 Returns the SizeOfData value of a debug structure.

dword getTimeDateStamp (unsigned int uiIndex) const
 Returns the TimeDateStamp value of a debug structure.

dword getType (unsigned int uiIndex) const
 Returns the Type value of a debug structure.

int read (const std::string &strFilename, unsigned int uiOffset, unsigned int uiSize)
 Reads the Debug directory from a file.

void rebuild (std::vector< byte > &obBuffer) const
 Rebuilds the current Debug directory.

void removeEntry (unsigned int uiIndex)
 Removes a debug structure.

void setAddressOfRawData (unsigned int uiIndex, dword dwValue)
 Sets the AddressOfRawData value of a debug structure.

void setCharacteristics (unsigned int uiIndex, dword dwValue)
 Sets the Characteristics value of a debug structure.

void setMajorVersion (unsigned int uiIndex, word wValue)
 Sets the MajorVersion value of a debug structure.

void setMinorVersion (unsigned int uiIndex, word wValue)
 Sets the MinorVersion value of a debug structure.

void setPointerToRawData (unsigned int uiIndex, dword dwValue)
 Sets the PointerToRawData value of a debug structure.

void setSizeOfData (unsigned int uiIndex, dword dwValue)
 Sets the SizeOfData value of a debug structure.

void setTimeDateStamp (unsigned int uiIndex, dword dwValue)
 Sets the TimeDateStamp value of a debug structure.

void setType (unsigned int uiIndex, dword dwValue)
 Sets the Type value of a debug structure.

unsigned int size () const
 Returns the size the current Debug directory needs after rebuilding.

int write (const std::string &strFilename, unsigned int uiOffset) const
 Writes the current Debug directory back to a file.


Private Attributes

std::vector< PELIB_IMG_DEBUG_DIRECTORY > m_vDebugInfo
 Stores the various DebugDirectory structures.


Detailed Description

Class that handles the Debug directory.


Member Function Documentation

void addEntry  ) 
 

Adds a new debug structure.

Adds a new debug structure to the debug directory. The initial values of all members of the structure are undefined.

dword getAddressOfRawData unsigned int  uiIndex  )  const
 

Returns the AddressOfRawData value of a debug structure.

Returns the AddressOfRawData value of a debug structure. If an invalid structure is specified by the parameter uiIndex the result will be undefined behaviour.

Parameters:
uiIndex Identifies the debug structure.
Returns:
AddressOfRawData value of the debug structure.

dword getCharacteristics unsigned int  uiIndex  )  const
 

Returns the Characteristics value of a debug structure.

Returns the Characteristics value of a debug structure. If an invalid structure is specified by the parameter uiIndex the result will be undefined behaviour.

Parameters:
uiIndex Identifies the debug structure.
Returns:
Characteristics value of the debug structure.

word getMajorVersion unsigned int  uiIndex  )  const
 

Returns the MajorVersion value of a debug structure.

Returns the MajorVersion value of a debug structure. If an invalid structure is specified by the parameter uiIndex the result will be undefined behaviour.

Parameters:
uiIndex Identifies the debug structure.
Returns:
MajorVersion value of the debug structure.

word getMinorVersion unsigned int  uiIndex  )  const
 

Returns the MinorVersion value of a debug structure.

Returns the MinorVersion value of a debug structure. If an invalid structure is specified by the parameter uiIndex the result will be undefined behaviour.

Parameters:
uiIndex Identifies the debug structure.
Returns:
MinorVersion value of the debug structure.

unsigned int getNumberOfEntries  )  const
 

Returns the number of DebugDirectory image structures in the current DebugDirectory.

Returns:
Number of debug structures in the current Debug directory.

dword getPointerToRawData unsigned int  uiIndex  )  const
 

Returns the PointerToRawData value of a debug structure.

Returns the PointerToRawData value of a debug structure. If an invalid structure is specified by the parameter uiIndex the result will be undefined behaviour.

Parameters:
uiIndex Identifies the debug structure.
Returns:
PointerToRawData value of the debug structure.

dword getSizeOfData unsigned int  uiIndex  )  const
 

Returns the SizeOfData value of a debug structure.

Returns the SizeOfData value of a debug structure. If an invalid structure is specified by the parameter uiIndex the result will be undefined behaviour.

Parameters:
uiIndex Identifies the debug structure.
Returns:
SizeOfData value of the debug structure.

dword getTimeDateStamp unsigned int  uiIndex  )  const
 

Returns the TimeDateStamp value of a debug structure.

Returns the TimeDateStamp value of a debug structure. If an invalid structure is specified by the parameter uiIndex the result will be undefined behaviour.

Parameters:
uiIndex Identifies the debug structure.
Returns:
TimeDateStamp value of the debug structure.

dword getType unsigned int  uiIndex  )  const
 

Returns the Type value of a debug structure.

Returns the Type value of a debug structure. If an invalid structure is specified by the parameter uiIndex the result will be undefined behaviour.

Parameters:
uiIndex Identifies the debug structure.
Returns:
Type value of the debug structure.

int read const std::string &  strFilename,
unsigned int  uiOffset,
unsigned int  uiSize
 

Reads the Debug directory from a file.

Parameters:
strFilename Name of the file which will be read.
uiOffset File offset of the Debug directory.
uiSize Size of the Debug directory.

void rebuild std::vector< byte > &  vBuffer  )  const
 

Rebuilds the current Debug directory.

Rebuilds the current debug directory.

Parameters:
vBuffer Buffer where the rebuilt directory is stored.

void removeEntry unsigned int  uiIndex  ) 
 

Removes a debug structure.

Removes a debug structure from the current debug directory. If an invalid structure is specified by the parameter uiIndex the result will be undefined behaviour.

Parameters:
uiIndex Identifies the debug structure.

void setAddressOfRawData unsigned int  uiIndex,
dword  dwValue
 

Sets the AddressOfRawData value of a debug structure.

Changes the AddressOfRawData value of a debug structure. If an invalid structure is specified by the parameter uiIndex the result will be undefined behaviour.

Parameters:
uiIndex Identifies the debug structure.
dwValue New value of the AddressOfRawData value of the debug structure.

void setCharacteristics unsigned int  uiIndex,
dword  dwValue
 

Sets the Characteristics value of a debug structure.

Changes the Characteristics value of a debug structure. If an invalid structure is specified by the parameter uiIndex the result will be undefined behaviour.

Parameters:
uiIndex Identifies the debug structure.
dwValue New value of the Characteristics value of the debug structure.

void setMajorVersion unsigned int  uiIndex,
word  wValue
 

Sets the MajorVersion value of a debug structure.

Changes the MajorVersion value of a debug structure. If an invalid structure is specified by the parameter uiIndex the result will be undefined behaviour.

Parameters:
uiIndex Identifies the debug structure.
wValue New value of the MajorVersion value of the debug structure.

void setMinorVersion unsigned int  uiIndex,
word  wValue
 

Sets the MinorVersion value of a debug structure.

Changes the MinorVersion value of a debug structure. If an invalid structure is specified by the parameter uiIndex the result will be undefined behaviour.

Parameters:
uiIndex Identifies the debug structure.
wValue New value of the MinorVersion value of the debug structure.

void setPointerToRawData unsigned int  uiIndex,
dword  dwValue
 

Sets the PointerToRawData value of a debug structure.

Changes the PointerToRawData value of a debug structure. If an invalid structure is specified by the parameter uiIndex the result will be undefined behaviour.

Parameters:
uiIndex Identifies the debug structure.
dwValue New value of the PointerToRawData value of the debug structure.

void setSizeOfData unsigned int  uiIndex,
dword  dwValue
 

Sets the SizeOfData value of a debug structure.

Changes the SizeOfData value of a debug structure. If an invalid structure is specified by the parameter uiIndex the result will be undefined behaviour.

Parameters:
uiIndex Identifies the debug structure.
dwValue New value of the SizeOfData value of the debug structure.

void setTimeDateStamp unsigned int  uiIndex,
dword  dwValue
 

Sets the TimeDateStamp value of a debug structure.

Changes the TimeDateStamp value of a debug structure. If an invalid structure is specified by the parameter uiIndex the result will be undefined behaviour.

Parameters:
uiIndex Identifies the debug structure.
dwValue New value of the TimeDateStamp value of the debug structure.

void setType unsigned int  uiIndex,
dword  dwValue
 

Sets the Type value of a debug structure.

Changes the Type value of a debug structure. If an invalid structure is specified by the parameter uiIndex the result will be undefined behaviour.

Parameters:
uiIndex Identifies the debug structure.
dwValue New value of the Type value of the debug structure.

unsigned int size  )  const
 

Returns the size the current Debug directory needs after rebuilding.

Returns:
Size of the debug directory.

int write const std::string &  strFilename,
unsigned int  uiOffset
const
 

Writes the current Debug directory back to a file.

Parameters:
strFilename Name of the file which will be written.
uiOffset File offset where the debug directory will be stored.


The documentation for this class was generated from the following files:
Generated on Mon Jan 17 20:50:09 2005 for PeLib by doxygen 1.3.7