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

NEAnalyser Class Reference

#include <ne_analy.h>

Inheritance diagram for NEAnalyser:

Analyser Object List of all members.

Public Member Functions

void init (ht_ne_shared_data *ne_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 convertAddressToNEAddress (Address *addr, NEAddress *r)
virtual AddresscreateAddress ()
AddresscreateAddress1616 (word seg, word ofs)
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 AddressfileofsToAddress (FILEOFS fileofs)
virtual char * getSegmentNameByAddress (Address *Addr)
virtual FILEOFS addressToFileofs (Address *Addr)
virtual bool validAddress (Address *Addr, tsectype action)

Public Attributes

ht_ne_shared_datane_shared
ht_streamfilefile
Areavalidarea

Member Function Documentation

FILEOFS NEAnalyser::addressToFileofs Address Addr  )  [virtual]
 

Implements Analyser.

Definition at line 327 of file ne_analy.cc.

References convertAddressToNEAddress(), FILEOFS, INVALID_FILE_OFS, NE_addr_to_ofs(), ne_shared, NEAddress, scinitialized, and validAddress().

Referenced by bufPtr().

void NEAnalyser::beginAnalysis  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 91 of file ne_analy.cc.

References Area::add(), Address::add(), Analyser::addComment(), ne_import_rec::addr, AF_FUNCTION_END, Analyser::assignSymbol(), Analyser::beginAnalysis(), buf, bufPtr(), ne_import_rec::byname, byte, ht_list::count(), create_host_int(), createAddress1616(), NE_HEADER::csip, dst_ibyte, dst_idword, Object::duplicate(), ht_ne_shared_data::entrypoints, ht_tree::enum_next(), export_func_name(), ht_ne_shared_data::fake_segment, file, FILEOFS, Location::flags, NE_HEADER::flags, ht_list::get(), getSegmentNameByAddress(), getstrp(), ht_ne_shared_data::hdr, ht_ne_shared_data::hdr_ofs, import_func_name(), ht_ne_shared_data::imports, NE_HEADER::imptab, label_data, label_func, little_endian, MAX, MIN, ht_ne_shared_data::modnames, ht_ne_shared_data::modnames_count, ne_import_rec::module, ht_ne_entrypoint::name, ne_import_rec::name_ofs, NE_ADDR_OFS, NE_ADDR_SEG, NE_FLAGS_NOTAPROCESS, NE_FLAGS_SELFLOAD, NE_get_seg_addr(), NE_get_seg_ofs(), NE_get_seg_psize(), NE_get_seg_vsize(), NE_MAKE_ADDR, ne_shared, NEAddress, Analyser::newLocation(), NULL, ht_ne_entrypoint::offset, ne_import_rec::ord, ht_ne_entrypoint::ordinal, Analyser::pushAddress(), random_permutation(), scinitialized, scvalid, ht_streamfile::seek(), ht_ne_entrypoint::seg, ne_segment_headers::segment_count, ne_segment_headers::segments, ht_ne_shared_data::segments, DataAnalyser::setIntAddressType(), Analyser::setLocationTreeOptimizeThreshold(), Analyser::setSymbolTreeOptimizeThreshold(), UINT, validAddress(), validarea, and Analyser::validCodeAddress().

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

Implements Analyser.

Definition at line 282 of file ne_analy.cc.

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

Referenced by beginAnalysis().

bool NEAnalyser::convertAddressToNEAddress Address addr,
NEAddress *  r
 

Definition at line 293 of file ne_analy.cc.

References ATOM_ADDRESS_X86_1616, NE_MAKE_ADDR, and Object::object_id().

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

Address * NEAnalyser::createAddress  )  [virtual]
 

Implements Analyser.

Definition at line 303 of file ne_analy.cc.

Address * NEAnalyser::createAddress1616 word  seg,
word  ofs
 

Definition at line 308 of file ne_analy.cc.

Referenced by beginAnalysis(), and fileofsToAddress().

Assembler * NEAnalyser::createAssembler  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 316 of file ne_analy.cc.

References Object::init(), X86_ADDRSIZE16, and X86_OPSIZE16.

void NEAnalyser::done  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 81 of file ne_analy.cc.

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

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

converts |FILEOFS fileaddr| to |Address|

Reimplemented from Analyser.

Definition at line 443 of file ne_analy.cc.

References createAddress1616(), FILEOFS, NE_ADDR_OFS, NE_ADDR_SEG, NE_ofs_to_addr(), ne_shared, and NEAddress.

const char * NEAnalyser::getName  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 363 of file ne_analy.cc.

References file, and ht_stream::get_desc().

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

Reimplemented from Analyser.

Definition at line 345 of file ne_analy.cc.

References convertAddressToNEAddress(), ht_ne_shared_data::fake_segment, NE_addr_to_segment(), ne_shared, NEAddress, and NULL.

Referenced by beginAnalysis().

const char * NEAnalyser::getType  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 371 of file ne_analy.cc.

void NEAnalyser::init ht_ne_shared_data ne_shared,
ht_streamfile file
 

Definition at line 47 of file ne_analy.cc.

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

void NEAnalyser::initCodeAnalyser  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 379 of file ne_analy.cc.

References Analyser::initCodeAnalyser().

void NEAnalyser::initUnasm  )  [virtual]
 

Implements Analyser.

Definition at line 387 of file ne_analy.cc.

References ANALYX86DISASSEMBLER_FLAGS_16BIT, ANALYX86DISASSEMBLER_FLAGS_SEGMENTED, and DPRINTF.

int NEAnalyser::load ht_object_stream f  )  [virtual]
 

loads object from object stream.

Returns:
ht_stream errorcode

Reimplemented from Analyser.

Definition at line 67 of file ne_analy.cc.

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

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

Reimplemented from Analyser.

Definition at line 398 of file ne_analy.cc.

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

Implements Analyser.

Definition at line 411 of file ne_analy.cc.

References Area::findNext(), and validarea.

OBJECT_ID NEAnalyser::object_id  )  const [virtual]
 

Returns:
unique object id.

Reimplemented from Object.

Definition at line 274 of file ne_analy.cc.

References ATOM_NE_ANALYSER.

int NEAnalyser::queryConfig int  mode  )  [virtual]
 

Reimplemented from Analyser.

Definition at line 428 of file ne_analy.cc.

References Q_DO_ANALYSIS, Q_ENGAGE_CODE_ANALYSER, and Q_ENGAGE_DATA_ANALYSER.

void NEAnalyser::store ht_object_stream st  )  [virtual]
 

stores object.

Reimplemented from Analyser.

Definition at line 419 of file ne_analy.cc.

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

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

Implements Analyser.

Definition at line 456 of file ne_analy.cc.

References convertAddressToNEAddress(), NE_addr_is_physical(), NE_addr_to_segment(), NE_DATA, NE_READONLY, ne_shared, NEAddress, sccode, scinitialized, scread, screadwrite, scvalid, scwrite, ne_segment_headers::segments, and ht_ne_shared_data::segments.

Referenced by addressToFileofs(), and beginAnalysis().


Member Data Documentation

ht_streamfile* NEAnalyser::file
 

Definition at line 30 of file ne_analy.h.

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

ht_ne_shared_data* NEAnalyser::ne_shared
 

Definition at line 29 of file ne_analy.h.

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

Area* NEAnalyser::validarea
 

Definition at line 31 of file ne_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:08 2004 by doxygen 1.3.5