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

CoffAnalyser Class Reference

#include <coff_analy.h>

Inheritance diagram for CoffAnalyser:

Analyser Object List of all members.

Public Member Functions

void init (ht_coff_shared_data *Coff_shared, ht_streamfile *File)
int load (ht_object_stream *f)
virtual void done ()
virtual OBJECT_ID object_id () const
virtual void beginAnalysis ()
virtual UINT bufPtr (Address *Addr, byte *buf, int size)
bool convertAddressToRVA (Address *addr, RVA *r)
virtual AddresscreateAddress ()
AddresscreateAddress32 (dword addr)
virtual AssemblercreateAssembler ()
virtual const char * getName ()
virtual char * getSegmentNameByAddress (Address *Addr)
virtual const char * getType ()
virtual void initCodeAnalyser ()
virtual void initUnasm ()
virtual void log (const char *msg)
virtual AddressnextValid (Address *Addr)
virtual void store (ht_object_stream *f)
virtual int queryConfig (int mode)
virtual AddressfileofsToAddress (FILEOFS fileofs)
virtual FILEOFS addressToFileofs (Address *Addr)
virtual bool validAddress (Address *Addr, tsectype action)

Public Attributes

ht_coff_shared_datacoff_shared
ht_streamfilefile
Areavalidarea

Member Function Documentation

FILEOFS CoffAnalyser::addressToFileofs Address Addr  )  [virtual]
 

Implements Analyser.

Definition at line 298 of file coff_analy.cc.

References coff_rva_to_ofs(), coff_shared, convertAddressToRVA(), FILEOFS, INVALID_FILE_OFS, RVA, scinitialized, ht_coff_shared_data::sections, and validAddress().

Referenced by bufPtr().

void CoffAnalyser::beginAnalysis  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 90 of file coff_analy.cc.

References Area::add(), Address::add(), Analyser::addComment(), AF_FUNCTION_END, Analyser::assignSymbol(), Analyser::beginAnalysis(), ht_coff_shared_data::coff32header, COFF_DLL, coff_shared, ht_coff_shared_data::coffheader, createAddress32(), Object::duplicate(), Location::flags, getSegmentNameByAddress(), ht_coff_shared_data::hdr_ofs, label_func, MAX, MIN, Analyser::newLocation(), Analyser::pushAddress(), scinitialized, coff_section_headers::section_count, coff_section_headers::sections, ht_coff_shared_data::sections, Analyser::setLocationTreeOptimizeThreshold(), Analyser::setSymbolTreeOptimizeThreshold(), UINT, validAddress(), and validarea.

UINT CoffAnalyser::bufPtr Address Addr,
byte *  buf,
int  size
[virtual]
 

Implements Analyser.

Definition at line 234 of file coff_analy.cc.

References addressToFileofs(), assert, buf, file, FILEOFS, INVALID_FILE_OFS, ht_stream::read(), ht_streamfile::seek(), size, and UINT.

bool CoffAnalyser::convertAddressToRVA Address addr,
RVA r
 

Definition at line 242 of file coff_analy.cc.

References ATOM_ADDRESS_FLAT_32, ATOM_ADDRESS_X86_FLAT_32, Object::object_id(), and RVA.

Referenced by addressToFileofs(), getSegmentNameByAddress(), and validAddress().

Address * CoffAnalyser::createAddress  )  [virtual]
 

Implements Analyser.

Definition at line 254 of file coff_analy.cc.

References COFF_MACHINE_I386, COFF_MACHINE_I486, COFF_MACHINE_I586, coff_shared, and ht_coff_shared_data::coffheader.

Address * CoffAnalyser::createAddress32 dword  addr  ) 
 

Definition at line 266 of file coff_analy.cc.

References COFF_MACHINE_I386, COFF_MACHINE_I486, COFF_MACHINE_I586, coff_shared, and ht_coff_shared_data::coffheader.

Referenced by beginAnalysis(), and fileofsToAddress().

Assembler * CoffAnalyser::createAssembler  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 281 of file coff_analy.cc.

References COFF_MACHINE_I386, COFF_MACHINE_I486, COFF_MACHINE_I586, coff_shared, ht_coff_shared_data::coffheader, Object::init(), NULL, X86_ADDRSIZE32, and X86_OPSIZE32.

void CoffAnalyser::done  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 80 of file coff_analy.cc.

References Analyser::done(), Area::done(), and validarea.

Address * CoffAnalyser::fileofsToAddress FILEOFS  fileofs  )  [virtual]
 

converts |FILEOFS fileaddr| to |Address|

Reimplemented from Analyser.

Definition at line 453 of file coff_analy.cc.

References coff_ofs_to_rva(), coff_shared, createAddress32(), FILEOFS, RVA, and ht_coff_shared_data::sections.

const char * CoffAnalyser::getName  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 333 of file coff_analy.cc.

References file, and ht_stream::get_desc().

char * CoffAnalyser::getSegmentNameByAddress Address Addr  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 315 of file coff_analy.cc.

References coff_rva_is_valid(), coff_rva_to_section(), coff_shared, convertAddressToRVA(), NULL, RVA, coff_section_headers::sections, and ht_coff_shared_data::sections.

Referenced by beginAnalysis().

const char * CoffAnalyser::getType  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 341 of file coff_analy.cc.

void CoffAnalyser::init ht_coff_shared_data Coff_shared,
ht_streamfile File
 

Definition at line 46 of file coff_analy.cc.

References coff_shared, file, Analyser::init(), Area::init(), Analyser::setLocationTreeOptimizeThreshold(), Analyser::setSymbolTreeOptimizeThreshold(), and validarea.

void CoffAnalyser::initCodeAnalyser  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 349 of file coff_analy.cc.

References Analyser::initCodeAnalyser().

void CoffAnalyser::initUnasm  )  [virtual]
 

Implements Analyser.

Definition at line 357 of file coff_analy.cc.

References COFF_MACHINE_ALPHA, COFF_MACHINE_I386, COFF_MACHINE_I486, COFF_MACHINE_I586, COFF_MACHINE_POWERPC_BE, COFF_MACHINE_POWERPC_LE, COFF_MACHINE_R10000, COFF_MACHINE_R3000, COFF_MACHINE_R4000, COFF_MACHINE_UNKNOWN, coff_shared, ht_coff_shared_data::coffheader, DPRINTF, and warnbox.

int CoffAnalyser::load ht_object_stream f  )  [virtual]
 

loads object from object stream.

Returns:
ht_stream errorcode

Reimplemented from Analyser.

Definition at line 66 of file coff_analy.cc.

References GET_OBJECT, Analyser::load(), and validarea.

void CoffAnalyser::log const char *  msg  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 403 of file coff_analy.cc.

Address * CoffAnalyser::nextValid Address Addr  )  [virtual]
 

Implements Analyser.

Definition at line 416 of file coff_analy.cc.

References Area::findNext(), and validarea.

OBJECT_ID CoffAnalyser::object_id  )  const [virtual]
 

Returns:
unique object id.

Reimplemented from Object.

Definition at line 226 of file coff_analy.cc.

References ATOM_COFF_ANALYSER.

int CoffAnalyser::queryConfig int  mode  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 438 of file coff_analy.cc.

References Q_DO_ANALYSIS, Q_ENGAGE_CODE_ANALYSER, and Q_ENGAGE_DATA_ANALYSER.

void CoffAnalyser::store ht_object_stream st  )  [virtual]
 

stores object.

Reimplemented from Analyser.

Definition at line 424 of file coff_analy.cc.

References PUT_OBJECT, Analyser::store(), and validarea.

bool CoffAnalyser::validAddress Address Addr,
tsectype  action
[virtual]
 

Implements Analyser.

Definition at line 466 of file coff_analy.cc.

References coff_rva_is_physical(), coff_rva_to_section(), COFF_SCN_CNT_CODE, COFF_SCN_CNT_UNINITIALIZED_DATA, COFF_SCN_MEM_EXECUTE, COFF_SCN_MEM_READ, COFF_SCN_MEM_WRITE, coff_shared, convertAddressToRVA(), RVA, sccode, scinitialized, scread, screadwrite, scvalid, scwrite, coff_section_headers::sections, and ht_coff_shared_data::sections.

Referenced by addressToFileofs(), and beginAnalysis().


Member Data Documentation

ht_coff_shared_data* CoffAnalyser::coff_shared
 

Definition at line 30 of file coff_analy.h.

Referenced by addressToFileofs(), beginAnalysis(), createAddress(), createAddress32(), createAssembler(), fileofsToAddress(), getSegmentNameByAddress(), init(), initUnasm(), and validAddress().

ht_streamfile* CoffAnalyser::file
 

Definition at line 31 of file coff_analy.h.

Referenced by bufPtr(), getName(), and init().

Area* CoffAnalyser::validarea
 

Definition at line 32 of file coff_analy.h.

Referenced by beginAnalysis(), done(), init(), load(), nextValid(), and store().


The documentation for this class was generated from the following files:
Generated on Fri May 7 21:15:55 2004 by doxygen 1.3.5