#include <emitWin.h>
Public Member Functions | |
| emitWin (PCHAR baseaddress, Object *o_nt, void(*)(const char *)=log_msg) | |
| ~emitWin () | |
| bool | driver (Symtab *obj, std::string fName) |
Private Member Functions | |
| Offset | PEAlign (Offset dwAddr, Offset dwAlign) |
| unsigned int | NumOfTotalAllowedSec () |
| unsigned int | NumOfAllowedSecInSectionTable () |
| unsigned int | NumOfAllowedSecInDosHeader () |
| PIMAGE_SECTION_HEADER | CreateSecHeader (unsigned int size, PIMAGE_SECTION_HEADER preSecHdr) |
| bool | AlignSection (PIMAGE_SECTION_HEADER p) |
| bool | writeImpTable (Symtab *) |
| void | log_winerror (void(*err_func)(const char *), const char *msg) |
Private Attributes | |
| PCHAR | base_addr |
| Offset | bit_addr |
| unsigned int | bit_size |
| Object * | obj_nt |
| bool | isMoveAhead |
| void(* | err_func_ )(const char *) |
Static Private Attributes | |
| static const unsigned int | SizeOfSecHeader = 40 |
Definition at line 45 of file emitWin.h.
| emitWin::emitWin | ( | PCHAR | baseaddress, | |
| Object * | o_nt, | |||
| void(*)(const char *) | err_func = log_msg | |||
| ) |
| Dyninst::SymtabAPI::emitWin::~emitWin | ( | ) |
| bool emitWin::AlignSection | ( | PIMAGE_SECTION_HEADER | p | ) | [private] |
| PIMAGE_SECTION_HEADER emitWin::CreateSecHeader | ( | unsigned int | size, | |
| PIMAGE_SECTION_HEADER | preSecHdr | |||
| ) | [private] |
| bool emitWin::driver | ( | Symtab * | obj, | |
| std::string | fName | |||
| ) |
Definition at line 317 of file emitWin.C.
References base_addr, bit_addr, bit_size, CreateSecHeader(), err_func_, Dyninst::SymtabAPI::Symtab::getAddressWidth(), Dyninst::SymtabAPI::Object::GetImageHeader(), Dyninst::SymtabAPI::Symtab::getObject(), Dyninst::SymtabAPI::Object::getPEHdr(), Dyninst::SymtabAPI::Object::getRefs(), INVALID_HANDLE_VALUE, isMoveAhead, log_winerror(), NumOfAllowedSecInDosHeader(), NumOfAllowedSecInSectionTable(), obj_nt, PEAlign(), SizeOfSecHeader, Dyninst::SymtabAPI::Object::trapHeader(), and writeImpTable().
| void emitWin::log_winerror | ( | void(*)(const char *) | err_func, | |
| const char * | msg | |||
| ) | [private] |
| unsigned int emitWin::NumOfAllowedSecInDosHeader | ( | ) | [private] |
| unsigned int emitWin::NumOfAllowedSecInSectionTable | ( | ) | [private] |
| unsigned int emitWin::NumOfTotalAllowedSec | ( | ) | [private] |
Definition at line 551 of file emitWin.C.
Referenced by CreateSecHeader(), and driver().
| bool emitWin::writeImpTable | ( | Symtab * | obj | ) | [private] |
Definition at line 137 of file emitWin.C.
References copy_ILT_or_ALT(), Dyninst::SymtabAPI::Symtab::getAddressWidth(), Dyninst::SymtabAPI::Region::getDiskSize(), getDyninstSection(), Dyninst::SymtabAPI::Object::getImportDescriptorTable(), Dyninst::SymtabAPI::Region::getMemOffset(), Dyninst::SymtabAPI::Object::getPEHdr(), Dyninst::SymtabAPI::Region::getPtrToRawData(), Dyninst::SymtabAPI::Object::getRefs(), obj_nt, and Dyninst::SymtabAPI::Region::setPtrToRawData().
Referenced by driver().
PCHAR Dyninst::SymtabAPI::emitWin::base_addr [private] |
Definition at line 54 of file emitWin.h.
Referenced by driver(), emitWin(), NumOfAllowedSecInDosHeader(), and NumOfAllowedSecInSectionTable().
Offset Dyninst::SymtabAPI::emitWin::bit_addr [private] |
Definition at line 55 of file emitWin.h.
Referenced by driver(), and NumOfAllowedSecInSectionTable().
unsigned int Dyninst::SymtabAPI::emitWin::bit_size [private] |
Definition at line 56 of file emitWin.h.
Referenced by driver(), and NumOfAllowedSecInSectionTable().
void(* Dyninst::SymtabAPI::emitWin::err_func_)(const char *) [private] |
bool Dyninst::SymtabAPI::emitWin::isMoveAhead [private] |
Object* Dyninst::SymtabAPI::emitWin::obj_nt [private] |
Definition at line 57 of file emitWin.h.
Referenced by CreateSecHeader(), driver(), emitWin(), NumOfAllowedSecInDosHeader(), NumOfAllowedSecInSectionTable(), NumOfTotalAllowedSec(), and writeImpTable().
const unsigned int Dyninst::SymtabAPI::emitWin::SizeOfSecHeader = 40 [static, private] |
Definition at line 53 of file emitWin.h.
Referenced by driver(), NumOfAllowedSecInDosHeader(), and NumOfAllowedSecInSectionTable().
1.6.1