Object-nt.C File Reference

#include <windows.h>
#include <cvconst.h>
#include <oleauto.h>
#include <dbghelp.h>
#include <iostream>
#include <iomanip>
#include <limits.h>
#include <crtdbg.h>
#include <winnt.h>
#include "symtabAPI/src/Object.h"
#include "symtabAPI/src/Object-nt.h"
#include "LineInformation.h"
#include "Collections.h"
#include "Symtab.h"
#include "Module.h"
#include "Function.h"
#include "Variable.h"
#include "emitWin.h"
#include "common/h/headers.h"

Go to the source code of this file.

Data Structures

struct  CompareSymAddresses
struct  line_info_tmp_t
struct  line_info_tmp_lt
struct  localsStruct
struct  proc_mod_pair

Defines

#define WIN32_LEAN_AND_MEAN
#define SymTagFunction   0x5
#define SymTagData   0x7
#define SymTagPublicSymbol   0xa
#define SymTagMisc   0x3808

Typedefs

typedef std::multiset
< line_info_tmp_t,
line_info_tmp_lt
info_for_file_t
typedef std::map< std::string,
info_for_file_t * > 
info_for_all_files_t

Functions

TypegetType (HANDLE p, Offset mod_base, int typeIndex, Module *mod=NULL)
std::string convertCharToString (const char *ptr)
static void printSysError (unsigned errNo)
BOOL CALLBACK SymEnumSymbolsCallback (PSYMBOL_INFO pSymInfo, ULONG symSize, PVOID userContext)
static void stripAtSuffix (char *str)
char * cplus_demangle (char *c, int, bool includeTypes)
static BOOL isGlobalSymbol (PSYMBOL_INFO pSymInfo)
Region::perm_t getRegionPerms (DWORD flags)
Region::RegionType getRegionType (DWORD flags)
void fixup_filename (std::string &filename)
static BOOL CALLBACK add_line_info (SRCCODEINFO *srcinfo, void *param)
static bool store_line_info (dyn_hash_map< std::string, LineInformation > *lineInfo, info_for_all_files_t *baseInfo)
Dyninst::MachRegister WinConvert (Register reg)
BOOL CALLBACK enumLocalSymbols (PSYMBOL_INFO pSymInfo, unsigned long symSize, void *userContext)
static void enumLocalVars (Function *func, localsStruct *locals)
static int variantValue (VARIANT *v)
static void addTypeToCollection (Type *type, Module *mod)
static char * getTypeName (HANDLE p, Offset base, int typeIndex)
static dataClass getDataClass (HANDLE p, Offset base, int typeIndex)
static TypegetEnumType (HANDLE p, Offset base, int typeIndex, Module *mod)
static TypegetPointerType (HANDLE p, Offset base, int typeIndex, Module *mod)
static TypegetArrayType (HANDLE p, Offset base, int typeIndex, Module *mod)
static TypegetTypedefType (HANDLE p, Offset base, int typeIndex, Module *mod)
static TypegetUDTType (HANDLE p, Offset base, int typeIndex, Module *mod)
static TypegetLayeredType (HANDLE p, Offset base, int typeIndex, Module *mod)
static TypegetFunctionType (HANDLE p, Offset base, int typeIndex, Module *mod)
static TypegetBaseType (HANDLE p, Offset base, int typeIndex, Module *mod)
static void findLocalVars (Function *func, proc_mod_pair base)
BOOL CALLBACK add_type_info (PSYMBOL_INFO pSymInfo, ULONG SymbolSize, void *info)

Variables

bool pd_debug_export_symbols = false

Define Documentation

#define SymTagData   0x7

Definition at line 446 of file Object-nt.C.

Referenced by getType(), and isGlobalSymbol().

#define SymTagFunction   0x5
#define SymTagMisc   0x3808

Definition at line 448 of file Object-nt.C.

Referenced by isGlobalSymbol().

#define SymTagPublicSymbol   0xa

Definition at line 447 of file Object-nt.C.

Referenced by isGlobalSymbol().

#define WIN32_LEAN_AND_MEAN

Definition at line 31 of file Object-nt.C.


Typedef Documentation

typedef std::map<std::string, info_for_file_t*> info_for_all_files_t

Definition at line 1143 of file Object-nt.C.

Definition at line 1142 of file Object-nt.C.


Function Documentation

static BOOL CALLBACK add_line_info ( SRCCODEINFO *  srcinfo,
void *  param 
) [static]

Definition at line 1145 of file Object-nt.C.

Referenced by Dyninst::SymtabAPI::Object::parseFileLineInfo().

BOOL CALLBACK add_type_info ( PSYMBOL_INFO  pSymInfo,
ULONG  SymbolSize,
void *  info 
)
static void addTypeToCollection ( Type type,
Module mod 
) [static]
std::string convertCharToString ( const char *  ptr  ) 
char* cplus_demangle ( char *  c,
int  ,
bool  includeTypes 
)

Definition at line 120 of file Object-nt.C.

References P_strdup(), and stripAtSuffix().

BOOL CALLBACK enumLocalSymbols ( PSYMBOL_INFO  pSymInfo,
unsigned long  symSize,
void *  userContext 
)
static void enumLocalVars ( Function func,
localsStruct locals 
) [static]
static void findLocalVars ( Function func,
proc_mod_pair  base 
) [static]
void fixup_filename ( std::string &  filename  ) 

Definition at line 1088 of file Object-nt.C.

Referenced by Dyninst::SymtabAPI::Symtab::Symtab().

static Type* getArrayType ( HANDLE  p,
Offset  base,
int  typeIndex,
Module mod 
) [static]
static Type* getBaseType ( HANDLE  p,
Offset  base,
int  typeIndex,
Module mod 
) [static]

Definition at line 1844 of file Object-nt.C.

References addTypeToCollection(), and fprintf.

Referenced by getType().

static dataClass getDataClass ( HANDLE  p,
Offset  base,
int  typeIndex 
) [static]
static Type* getEnumType ( HANDLE  p,
Offset  base,
int  typeIndex,
Module mod 
) [static]
static Type* getFunctionType ( HANDLE  p,
Offset  base,
int  typeIndex,
Module mod 
) [static]
static Type* getLayeredType ( HANDLE  p,
Offset  base,
int  typeIndex,
Module mod 
) [static]

Definition at line 1755 of file Object-nt.C.

References fprintf, and getType().

Referenced by getType().

static Type* getPointerType ( HANDLE  p,
Offset  base,
int  typeIndex,
Module mod 
) [static]

Definition at line 1549 of file Object-nt.C.

References addTypeToCollection(), fprintf, getType(), and Dyninst::SymtabAPI::typePointer::setPtr().

Referenced by getType().

Region::perm_t getRegionPerms ( DWORD  flags  ) 
Region::RegionType getRegionType ( DWORD  flags  ) 
static Type * getType ( HANDLE  p,
Offset  mod_base,
int  typeIndex,
Module mod = NULL 
)
static Type* getTypedefType ( HANDLE  p,
Offset  base,
int  typeIndex,
Module mod 
) [static]

Definition at line 1624 of file Object-nt.C.

References addTypeToCollection(), convertCharToString(), fprintf, getType(), and getTypeName().

Referenced by getType().

static char* getTypeName ( HANDLE  p,
Offset  base,
int  typeIndex 
) [static]
static Type* getUDTType ( HANDLE  p,
Offset  base,
int  typeIndex,
Module mod 
) [static]
static BOOL isGlobalSymbol ( PSYMBOL_INFO  pSymInfo  )  [static]
static void printSysError ( unsigned  errNo  )  [static]

Definition at line 76 of file Object-nt.C.

References fprintf, and printSysError().

static bool store_line_info ( dyn_hash_map< std::string, LineInformation > *  lineInfo,
info_for_all_files_t baseInfo 
) [static]

Definition at line 1161 of file Object-nt.C.

Referenced by Dyninst::SymtabAPI::Object::parseFileLineInfo().

static void stripAtSuffix ( char *  str  )  [static]

Definition at line 104 of file Object-nt.C.

Referenced by cplus_demangle().

BOOL CALLBACK SymEnumSymbolsCallback ( PSYMBOL_INFO  pSymInfo,
ULONG  symSize,
PVOID  userContext 
)
static int variantValue ( VARIANT *  v  )  [static]

Definition at line 1394 of file Object-nt.C.

Referenced by getEnumType().

Dyninst::MachRegister WinConvert ( Register  reg  ) 

Definition at line 1214 of file Object-nt.C.

Referenced by enumLocalSymbols().


Variable Documentation

Definition at line 64 of file Object-nt.C.

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 12 Jul 2013 for SymtabAPI by  doxygen 1.6.1