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

PEFAnalyser Class Reference

#include <pef_analy.h>

Inheritance diagram for PEFAnalyser:

Analyser Object List of all members.

Public Member Functions

void init (ht_pef_shared_data *pef_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 convertAddressToPEFAddress (Address *addr, PEFAddress *r)
virtual AddresscreateAddress ()
AddresscreateAddress32 (dword addr)
AddresscreateAddress64 (qword addr)
virtual AssemblercreateAssembler ()
virtual const char * getName ()
virtual const char * getType ()
virtual void initCodeAnalyser ()
void initInsertSymbols (int shidx)
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_pef_shared_datapef_shared
ht_streamfilefile
Areavalidarea

Member Function Documentation

FILEOFS PEFAnalyser::addressToFileofs Address Addr  )  [virtual]
 

Implements Analyser.

Definition at line 421 of file pef_analy.cc.

References convertAddressToPEFAddress(), dword, FILEOFS, INVALID_FILE_OFS, pef_addr_to_ofs(), pef_shared, scinitialized, ht_pef_shared_data::sheaders, and validAddress().

Referenced by bufPtr().

void PEFAnalyser::beginAnalysis  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 60 of file pef_analy.cc.

References Area::add(), Address::add(), Analyser::addComment(), AF_FUNCTION_END, Analyser::beginAnalysis(), pef_section_headers::count, createAddress32(), Object::duplicate(), Location::flags, getSegmentNameByAddress(), ht_snprintf(), Analyser::newLocation(), pef_shared, scvalid, Analyser::setLocationTreeOptimizeThreshold(), Analyser::setSymbolTreeOptimizeThreshold(), pef_section_headers::sheaders, ht_pef_shared_data::sheaders, UINT, validAddress(), and validarea.

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

Implements Analyser.

Definition at line 374 of file pef_analy.cc.

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

bool PEFAnalyser::convertAddressToPEFAddress Address addr,
PEFAddress r
 

Definition at line 385 of file pef_analy.cc.

References PEFAddress::a32, ATOM_ADDRESS_FLAT_32, and Object::object_id().

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

Address * PEFAnalyser::createAddress  )  [virtual]
 

Implements Analyser.

Definition at line 395 of file pef_analy.cc.

Address * PEFAnalyser::createAddress32 dword  addr  ) 
 

Definition at line 400 of file pef_analy.cc.

Referenced by beginAnalysis(), fileofsToAddress(), and htpefimage_init().

Address * PEFAnalyser::createAddress64 qword  addr  ) 
 

Definition at line 405 of file pef_analy.cc.

Assembler * PEFAnalyser::createAssembler  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 413 of file pef_analy.cc.

References NULL.

void PEFAnalyser::done  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 359 of file pef_analy.cc.

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

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

converts |FILEOFS fileaddr| to |Address|

Reimplemented from Analyser.

Definition at line 548 of file pef_analy.cc.

References PEFAddress::a32, createAddress32(), FILEOFS, pef_ofs_to_addr(), pef_shared, and ht_pef_shared_data::sheaders.

const char * PEFAnalyser::getName  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 458 of file pef_analy.cc.

References file, and ht_stream::get_desc().

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

Reimplemented from Analyser.

Definition at line 437 of file pef_analy.cc.

References convertAddressToPEFAddress(), ht_snprintf(), NULL, pef_addr_to_section(), pef_shared, pef_section_headers::sheaders, ht_pef_shared_data::sheaders, and uint32.

Referenced by beginAnalysis().

const char * PEFAnalyser::getType  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 466 of file pef_analy.cc.

void PEFAnalyser::init ht_pef_shared_data pef_shared,
ht_streamfile File
 

Definition at line 49 of file pef_analy.cc.

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

Referenced by htpefimage_init().

void PEFAnalyser::initCodeAnalyser  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 474 of file pef_analy.cc.

References Analyser::initCodeAnalyser().

void PEFAnalyser::initInsertSymbols int  shidx  ) 
 

Definition at line 134 of file pef_analy.cc.

void PEFAnalyser::initUnasm  )  [virtual]
 

Implements Analyser.

Definition at line 482 of file pef_analy.cc.

References ht_pef_shared_data::arch, DPRINTF, pef_shared, PEFARCH_M68K, PEFARCH_PowerPC, and warnbox.

int PEFAnalyser::load ht_object_stream f  )  [virtual]
 

loads object from object stream.

Returns:
ht_stream errorcode

Reimplemented from Analyser.

Definition at line 350 of file pef_analy.cc.

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

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

Reimplemented from Analyser.

Definition at line 503 of file pef_analy.cc.

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

Implements Analyser.

Definition at line 516 of file pef_analy.cc.

References Area::findNext(), and validarea.

OBJECT_ID PEFAnalyser::object_id  )  const [virtual]
 

Returns:
unique object id.

Reimplemented from Object.

Definition at line 366 of file pef_analy.cc.

References ATOM_PEF_ANALYSER.

int PEFAnalyser::queryConfig int  mode  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 533 of file pef_analy.cc.

References Q_DO_ANALYSIS, Q_ENGAGE_CODE_ANALYSER, and Q_ENGAGE_DATA_ANALYSER.

void PEFAnalyser::store ht_object_stream f  )  [virtual]
 

stores object.

Reimplemented from Analyser.

Definition at line 524 of file pef_analy.cc.

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

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

Implements Analyser.

Definition at line 561 of file pef_analy.cc.

References convertAddressToPEFAddress(), pef_addr_to_section(), pef_shared, sccode, scinitialized, scread, screadwrite, scvalid, scwrite, pef_section_headers::sheaders, and ht_pef_shared_data::sheaders.

Referenced by addressToFileofs(), and beginAnalysis().


Member Data Documentation

ht_streamfile* PEFAnalyser::file
 

Definition at line 33 of file pef_analy.h.

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

ht_pef_shared_data* PEFAnalyser::pef_shared
 

Definition at line 32 of file pef_analy.h.

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

Area* PEFAnalyser::validarea
 

Definition at line 34 of file pef_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:16:09 2004 by doxygen 1.3.5