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

XBEAnalyser Class Reference

#include <xbe_analy.h>

Inheritance diagram for XBEAnalyser:

Analyser Object List of all members.

Public Member Functions

void init (ht_xbe_shared_data *XBE_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)
AddresscreateAddress64 (qword high_addr)
virtual AssemblercreateAssembler ()
virtual const char * getName ()
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 bool validAddress (Address *Addr, tsectype action)
virtual AddressfileofsToAddress (FILEOFS fileofs)
virtual FILEOFS addressToFileofs (Address *Addr)
virtual char * getSegmentNameByAddress (Address *Addr)

Public Attributes

ht_xbe_shared_dataxbe_shared
ht_streamfilefile
Areavalidarea

Member Function Documentation

FILEOFS XBEAnalyser::addressToFileofs Address Addr  )  [virtual]
 

Implements Analyser.

Definition at line 273 of file xbe_analy.cc.

References convertAddressToRVA(), FILEOFS, INVALID_FILE_OFS, RVA, scinitialized, ht_xbe_shared_data::sections, validAddress(), xbe_rva_to_ofs(), and xbe_shared.

Referenced by bufPtr().

void XBEAnalyser::beginAnalysis  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 83 of file xbe_analy.cc.

References Area::add(), Address::add(), Analyser::addComment(), ht_xbe_import_function::address, AF_FUNCTION_END, Analyser::assignSymbol(), Analyser::beginAnalysis(), ht_xbe_import_function::byname, ht_clist::count(), createAddress32(), dst_idword, Object::duplicate(), Location::flags, ht_xbe_import::funcs, ht_clist::get(), getSegmentNameByAddress(), ht_xbe_shared_data::header, ht_snprintf(), import_func_name(), ht_xbe_shared_data::imports, label_data, label_func, MAX, MIN, ht_xbe_import_function::name, Analyser::newLocation(), NULL, xbe_section_headers::number_of_sections, ht_xbe_import_function::ordinal, Analyser::pushAddress(), random_permutation(), scinitialized, xbe_section_headers::sections, ht_xbe_shared_data::sections, DataAnalyser::setIntAddressType(), Analyser::setLocationTreeOptimizeThreshold(), Analyser::setSymbolTreeOptimizeThreshold(), UINT, validAddress(), validarea, and xbe_shared.

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

Implements Analyser.

Definition at line 211 of file xbe_analy.cc.

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

bool XBEAnalyser::convertAddressToRVA Address addr,
RVA r
 

Definition at line 222 of file xbe_analy.cc.

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

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

Address * XBEAnalyser::createAddress  )  [virtual]
 

Implements Analyser.

Definition at line 254 of file xbe_analy.cc.

Address * XBEAnalyser::createAddress32 dword  addr  ) 
 

Definition at line 240 of file xbe_analy.cc.

Referenced by beginAnalysis(), fileofsToAddress(), and ht_xbe_import_viewer::select_entry().

Address * XBEAnalyser::createAddress64 qword  high_addr  ) 
 

Definition at line 249 of file xbe_analy.cc.

References NULL.

Assembler * XBEAnalyser::createAssembler  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 263 of file xbe_analy.cc.

References Object::init(), X86_ADDRSIZE32, and X86_OPSIZE32.

void XBEAnalyser::done  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 73 of file xbe_analy.cc.

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

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

converts |FILEOFS fileaddr| to |Address|

Reimplemented from Analyser.

Definition at line 456 of file xbe_analy.cc.

References createAddress32(), FILEOFS, ht_xbe_shared_data::header, RVA, ht_xbe_shared_data::sections, xbe_ofs_to_rva(), and xbe_shared.

const char * XBEAnalyser::getName  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 322 of file xbe_analy.cc.

References file, and ht_stream::get_desc().

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

Reimplemented from Analyser.

Definition at line 294 of file xbe_analy.cc.

References convertAddressToRVA(), NULL, RVA, ht_xbe_shared_data::sections, xbe_rva_is_valid(), xbe_rva_to_section(), and xbe_shared.

Referenced by beginAnalysis().

const char * XBEAnalyser::getType  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 330 of file xbe_analy.cc.

void XBEAnalyser::init ht_xbe_shared_data XBE_shared,
ht_streamfile File
 

Definition at line 49 of file xbe_analy.cc.

References file, Analyser::init(), Area::init(), validarea, and xbe_shared.

void XBEAnalyser::initCodeAnalyser  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 338 of file xbe_analy.cc.

References Analyser::initCodeAnalyser().

void XBEAnalyser::initUnasm  )  [virtual]
 

Implements Analyser.

Definition at line 394 of file xbe_analy.cc.

References DPRINTF.

int XBEAnalyser::load ht_object_stream f  )  [virtual]
 

loads object from object stream.

Returns:
ht_stream errorcode

Reimplemented from Analyser.

Definition at line 64 of file xbe_analy.cc.

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

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

Reimplemented from Analyser.

Definition at line 406 of file xbe_analy.cc.

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

Implements Analyser.

Definition at line 419 of file xbe_analy.cc.

References Area::findNext(), and validarea.

OBJECT_ID XBEAnalyser::object_id  )  const [virtual]
 

Returns:
unique object id.

Reimplemented from Object.

Definition at line 203 of file xbe_analy.cc.

References ATOM_XBE_ANALYSER.

int XBEAnalyser::queryConfig int  mode  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 441 of file xbe_analy.cc.

References Q_DO_ANALYSIS, Q_ENGAGE_CODE_ANALYSER, and Q_ENGAGE_DATA_ANALYSER.

void XBEAnalyser::store ht_object_stream st  )  [virtual]
 

stores object.

Reimplemented from Analyser.

Definition at line 427 of file xbe_analy.cc.

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

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

Implements Analyser.

Definition at line 469 of file xbe_analy.cc.

References convertAddressToRVA(), RVA, sccode, scinitialized, scread, screadwrite, scvalid, scwrite, xbe_section_headers::sections, ht_xbe_shared_data::sections, xbe_rva_is_physical(), xbe_rva_to_section(), XBE_SECTION_FLAGS_EXECUTABLE, XBE_SECTION_FLAGS_WRITABLE, and xbe_shared.

Referenced by addressToFileofs(), and beginAnalysis().


Member Data Documentation

ht_streamfile* XBEAnalyser::file
 

Definition at line 31 of file xbe_analy.h.

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

Area* XBEAnalyser::validarea
 

Definition at line 32 of file xbe_analy.h.

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

ht_xbe_shared_data* XBEAnalyser::xbe_shared
 

Definition at line 30 of file xbe_analy.h.

Referenced by addressToFileofs(), beginAnalysis(), convertAddressToRVA(), fileofsToAddress(), getSegmentNameByAddress(), init(), and validAddress().


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