SEC: Section Object


Enumerations

enum  LEVEL_CORE::SEC_TYPE {
  SEC_TYPE_INVALID,
  SEC_TYPE_UNUSED,
  LEVEL_CORE::SEC_TYPE_REGREL,
  LEVEL_CORE::SEC_TYPE_DYNREL,
  LEVEL_CORE::SEC_TYPE_EXEC,
  LEVEL_CORE::SEC_TYPE_DATA,
  SEC_TYPE_DYNAMIC,
  SEC_TYPE_OPD,
  SEC_TYPE_GOT,
  SEC_TYPE_STACK,
  SEC_TYPE_PLTOFF,
  SEC_TYPE_HASH,
  LEVEL_CORE::SEC_TYPE_LSDA,
  SEC_TYPE_UNWIND,
  SEC_TYPE_UNWINDINFO,
  SEC_TYPE_REGSYM,
  SEC_TYPE_DYNSYM,
  SEC_TYPE_DEBUG,
  LEVEL_CORE::SEC_TYPE_BSS,
  SEC_TYPE_SYMSTR,
  SEC_TYPE_DYNSTR,
  SEC_TYPE_SECSTR,
  SEC_TYPE_COMMENT,
  SEC_TYPE_LAST
}

Functions

IMG LEVEL_PINCLIENT::SEC_Img (SEC x)
SEC LEVEL_PINCLIENT::SEC_Next (SEC x)
SEC LEVEL_PINCLIENT::SEC_Prev (SEC x)
SEC LEVEL_PINCLIENT::SEC_Invalid ()
BOOL LEVEL_PINCLIENT::SEC_Valid (SEC x)
RTN LEVEL_PINCLIENT::SEC_RtnHead (SEC x)
RTN LEVEL_PINCLIENT::SEC_RtnTail (SEC x)
const string & LEVEL_PINCLIENT::SEC_Name (SEC x)
SEC_TYPE LEVEL_PINCLIENT::SEC_Type (SEC x)
BOOL LEVEL_PINCLIENT::SEC_Mapped (SEC sec)
const VOID * LEVEL_PINCLIENT::SEC_Data (SEC x)
ADDRINT LEVEL_PINCLIENT::SEC_Address (SEC sec)
BOOL LEVEL_PINCLIENT::SEC_IsReadable (SEC sec)
BOOL LEVEL_PINCLIENT::SEC_IsWriteable (SEC sec)
BOOL LEVEL_PINCLIENT::SEC_IsExecutable (SEC sec)
USIZE LEVEL_PINCLIENT::SEC_Size (SEC sec)

Detailed Description

A SEC is modeled after the sections found inside elf images. Can be accessed at instrumentation time and analysis time.

SECs can be mapped or unmapped, a mapped SEC occupies address space inside the IMG. Unmapped SECs often contain debug and relocation information.

Iteration idioms:

  // Forward pass over all sections in an image
  for( SEC sec= IMG_SecHead(img); SEC_Valid(sec); sec = SEC_Next(sec) )

  // Reverse pass over all sections in animage
  for( SEC sec= IMG_SecTail(img); SEC_Valid(sec); sec = SEC_Prev(sec) )

Enumeration Type Documentation

enum LEVEL_CORE::SEC_TYPE
 

SEC types

Enumerator:
SEC_TYPE_REGREL  relocations
SEC_TYPE_DYNREL  dynamic relocations
SEC_TYPE_EXEC  contains code
SEC_TYPE_DATA  contains initialized data
SEC_TYPE_LSDA  old exception_info (obsolete)
SEC_TYPE_BSS  contains uninitialized data


Function Documentation

ADDRINT LEVEL_PINCLIENT::SEC_Address SEC  sec  ) 
 

Returns:
Address in memory of sec

const VOID* LEVEL_PINCLIENT::SEC_Data SEC  x  ) 
 

Returns:
For an unmapped section, return a pointer to the raw data for the section

IMG LEVEL_PINCLIENT::SEC_Img SEC  x  ) 
 

Returns:
Image that contains this section

SEC LEVEL_PINCLIENT::SEC_Invalid  ) 
 

Returns:
Invalid section value

BOOL LEVEL_PINCLIENT::SEC_IsExecutable SEC  sec  ) 
 

Returns:
TRUE if section is executable

BOOL LEVEL_PINCLIENT::SEC_IsReadable SEC  sec  ) 
 

Returns:
TRUE if section is readable

BOOL LEVEL_PINCLIENT::SEC_IsWriteable SEC  sec  ) 
 

Returns:
TRUE if section is writable

BOOL LEVEL_PINCLIENT::SEC_Mapped SEC  sec  ) 
 

Returns:
True if section is mapped in memory, unmapped section contain data not needed at run time, like debug information

const string& LEVEL_PINCLIENT::SEC_Name SEC  x  ) 
 

Returns:
Section name

SEC LEVEL_PINCLIENT::SEC_Next SEC  x  ) 
 

Returns:
Section that follows x, or SEC_Invalid() is x is last section in the image

SEC LEVEL_PINCLIENT::SEC_Prev SEC  x  ) 
 

Returns:
Previous section of x, or SEC_Invalid() if x is the first in the image

RTN LEVEL_PINCLIENT::SEC_RtnHead SEC  x  ) 
 

Returns:
First RTN of x, or RTN_Invalid() if no RTNs

RTN LEVEL_PINCLIENT::SEC_RtnTail SEC  x  ) 
 

Returns:
Last RTN of x, or RTN_Invalid() if no RTNs

USIZE LEVEL_PINCLIENT::SEC_Size SEC  sec  ) 
 

Returns:
Size of section

SEC_TYPE LEVEL_PINCLIENT::SEC_Type SEC  x  ) 
 

Returns:
Section type

BOOL LEVEL_PINCLIENT::SEC_Valid SEC  x  ) 
 

Returns:
True if x is not SEC_Invalid()


Generated on Tue Jan 16 00:09:08 2007 for Pin by  doxygen 1.4.6