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

AnalyserOutput Class Reference

#include <out.h>

Inheritance diagram for AnalyserOutput:

Object AnalyserHTOutput AnalyserTxtOutput List of all members.

Public Member Functions

void init (Analyser *analy)
virtual void done ()
virtual void beginAddr ()
virtual void beginLine ()
virtual void changeConfig ()
virtual int elementLength (const char *s)
virtual void endAddr ()
virtual void endLine ()
virtual char * externalLink (char *s, int type1, int type2, int type3, int type4, void *special)
virtual void footer ()
void generateAddr (Address *Addr, OutAddr *oa)
int generateFile (Address *from, Address *to)
virtual ht_streamgetGenerateStream ()
void generatePage (Address *from, int lines)
OutAddrgetAddr (Address *Addr)
OutLinegetLine (Address *Addr, int line)
bool getLineString (char *buf, int maxlen, Address *Addr, int line)
bool getLineByteLength (int &len, Address *Addr, int line)
int getLineCount (Address *Addr)
int getAddrByteLength (Address *Addr)
virtual void header ()
void invalidateCache ()
virtual char * link (char *s, Address *Addr)
int nextLine (Address *&Addr, int &line, int n, Address *max)
int prevLine (Address *&Addr, int &line, int n, Address *min)
virtual void putElement (int element_type, const char *element)
void reset ()
void write (const char *s)
void write (const char *s, int n)

Public Attributes

Analyseranaly
Addressaddr
int line
Locationcur_addr
OutAddrcur_out_addr
int bytes_line
int bytes_addr
ht_dtreeout_addrs
byte * work_buffer_start
byte * work_buffer
byte * temp_buffer
UINT current_time
int size
int dis_style

Member Function Documentation

void AnalyserOutput::beginAddr  )  [virtual]
 

Reimplemented in AnalyserHTOutput, and AnalyserTxtOutput.

Definition at line 139 of file out.cc.

References bytes_addr, and line.

Referenced by AnalyserTxtOutput::beginAddr(), AnalyserHTOutput::beginAddr(), and generateAddr().

void AnalyserOutput::beginLine  )  [virtual]
 

Reimplemented in AnalyserHTOutput, and AnalyserTxtOutput.

Definition at line 145 of file out.cc.

References bytes_line, work_buffer, and work_buffer_start.

Referenced by AnalyserTxtOutput::beginLine(), AnalyserHTOutput::beginLine(), and generateAddr().

void AnalyserOutput::changeConfig  )  [virtual]
 

Reimplemented in AnalyserHTOutput.

Definition at line 151 of file out.cc.

Referenced by init(), and ht_aviewer::reloadpalette().

void AnalyserOutput::done  )  [virtual]
 

Reimplemented from Object.

Reimplemented in AnalyserHTOutput, and AnalyserTxtOutput.

Definition at line 130 of file out.cc.

References addr, ht_stree::destroy(), out_addrs, temp_buffer, and work_buffer_start.

Referenced by AnalyserTxtOutput::done(), AnalyserHTOutput::done(), ht_analy_sub::done(), and ht_aviewer::generateOutputDialog().

int AnalyserOutput::elementLength const char *  s  )  [virtual]
 

Reimplemented in AnalyserHTOutput, and AnalyserTxtOutput.

Definition at line 155 of file out.cc.

Referenced by write().

void AnalyserOutput::endAddr  )  [virtual]
 

Reimplemented in AnalyserHTOutput, and AnalyserTxtOutput.

Definition at line 160 of file out.cc.

Referenced by AnalyserTxtOutput::endAddr(), AnalyserHTOutput::endAddr(), and generateAddr().

void AnalyserOutput::endLine  )  [virtual]
 

Reimplemented in AnalyserHTOutput, and AnalyserTxtOutput.

Definition at line 164 of file out.cc.

References OutAddr::appendLine(), bytes_addr, bytes_line, cur_out_addr, line, work_buffer, and work_buffer_start.

Referenced by AnalyserTxtOutput::endLine(), AnalyserHTOutput::endLine(), and generateAddr().

char * AnalyserOutput::externalLink char *  s,
int  type1,
int  type2,
int  type3,
int  type4,
void *  special
[virtual]
 

Reimplemented in AnalyserHTOutput, and AnalyserTxtOutput.

Definition at line 618 of file out.cc.

References temp_buffer.

Referenced by generateAddr().

void AnalyserOutput::footer  )  [virtual]
 

Reimplemented in AnalyserTxtOutput.

Definition at line 171 of file out.cc.

Referenced by generateFile().

void AnalyserOutput::generateAddr Address Addr,
OutAddr oa
 

Definition at line 206 of file out.cc.

References Location::addr, addr, addr_sym_func, addr_sym_func_context, ADDRESS_STRING_FORMAT_COMPACT, analy, ANALY_COLLAPSE_XREFS, ANALY_SHOW_COMMENTS, ANALY_SHOW_LABELS, ANALY_SHOW_XREFS, ANALY_TRANSLATE_SYMBOLS, taddr_type::array_subtype, assert, beginAddr(), beginLine(), buf, Analyser::bufPtr(), byte, bytes_line, Address::byteSize(), OutAddr::clear(), Location::comments, ht_clist::count(), ht_tree::count(), cur_addr, cur_out_addr, Disassembler::decode(), Address::difference(), dis_style, Analyser::disasm, dst_ibyte, dst_idword, dst_iqword, dst_iword, dst_string, dt_array, dt_code, dt_int, dt_unknown, dt_unknown_data, dword, ELEMENT_TYPE_COMMENT, ELEMENT_TYPE_HIGHLIGHT_DATA_CODE, ELEMENT_TYPE_LABEL, ELEMENT_TYPE_PRE_COMMENT, endAddr(), endLine(), ht_tree::enum_next(), Analyser::enumLocations(), escape_special(), externalLink(), Analyser::getLocationByAddress(), CommentList::getName(), Disassembler::getSize(), ht_snprintf(), taddr_type::int_subtype, Address::isValid(), Location::label, LABELINDENT, taddr_type::length, link(), Analyser::mapAddr(), Analyser::max_opcode_length, MAX_XREF_COLS, MAX_XREF_LINES, MIN, Analyser::mode, Symbol::name, Analyser::nextValid(), NULL, OPCODE, putElement(), Address::putIntoArray(), qword, scinitialized, scvalid, Disassembler::selectNext(), Disassembler::str(), Address::stringify(), taddr_type::type, Location::type, UINT, Analyser::validAddress(), Analyser::validCodeAddress(), word, write(), xref_type_short(), and Location::xrefs.

Referenced by getAddr().

int AnalyserOutput::generateFile Address from,
Address to
 

Definition at line 487 of file out.cc.

References Analyser::active, Address::add(), analy, Address::compareTo(), footer(), getGenerateStream(), getLineByteLength(), getLineString(), header(), Address::isValid(), len, line, OUTPUT_GENERATE_ERR_ANALYSER_NOT_FINISHED, OUTPUT_GENERATE_ERR_INVAL, OUTPUT_GENERATE_ERR_OK, OUTPUT_GENERATE_ERR_STREAM, UINT, and ht_stream::write().

Referenced by ht_aviewer::generateOutputDialog().

void AnalyserOutput::generatePage Address from,
int  lines
 

Definition at line 518 of file out.cc.

OutAddr * AnalyserOutput::getAddr Address Addr  ) 
 

Definition at line 523 of file out.cc.

References addr, assert, Address::compareTo(), ht_dtree::count(), cur_out_addr, current_time, DPRINTF, DUP_ADDR, generateAddr(), ht_stree::get(), ht_dtree::insert(), Address::isValid(), out_addrs, reset(), Address::stringify(), OutAddr::time, and OutAddr::updateTime().

Referenced by getAddrByteLength(), getLine(), and getLineCount().

int AnalyserOutput::getAddrByteLength Address Addr  ) 
 

Definition at line 602 of file out.cc.

References OutAddr::bytes, and getAddr().

Referenced by prevLine().

ht_stream * AnalyserOutput::getGenerateStream  )  [virtual]
 

Reimplemented in AnalyserTxtOutput.

Definition at line 482 of file out.cc.

References NULL.

Referenced by generateFile().

OutLine * AnalyserOutput::getLine Address Addr,
int  line
 

Definition at line 565 of file out.cc.

References getAddr(), and OutAddr::getLine().

Referenced by getLineByteLength(), and getLineString().

bool AnalyserOutput::getLineByteLength int &  len,
Address Addr,
int  line
 

Definition at line 586 of file out.cc.

References OutLine::bytes, getLine(), and len.

Referenced by generateFile(), nextLine(), and prevLine().

int AnalyserOutput::getLineCount Address Addr  ) 
 

Definition at line 597 of file out.cc.

References ht_clist::count(), getAddr(), and OutAddr::lines.

Referenced by prevLine().

bool AnalyserOutput::getLineString char *  buf,
int  maxlen,
Address Addr,
int  line
 

Definition at line 570 of file out.cc.

References buf, getLine(), len, MIN, OutLine::text, and OutLine::textlen.

Referenced by generateFile(), and ht_analy_sub::getline().

void AnalyserOutput::header  )  [virtual]
 

Reimplemented in AnalyserTxtOutput.

Definition at line 607 of file out.cc.

Referenced by generateFile().

void AnalyserOutput::init Analyser analy  ) 
 

Reimplemented in AnalyserHTOutput.

Definition at line 111 of file out.cc.

References addr, analy, byte, bytes_addr, bytes_line, changeConfig(), compare_keys_addresses_delinear(), cur_addr, cur_out_addr, current_time, dis_style, DIS_STYLE_HEX_ASMSTYLE, DIS_STYLE_HEX_NOZEROPAD, DIS_STYLE_HIGHLIGHT, ht_dtree::init(), malloc(), NULL, out_addrs, size, temp_buffer, work_buffer, work_buffer_start, WORKBUF_LEN, and X86DIS_STYLE_OPTIMIZE_ADDR.

void AnalyserOutput::invalidateCache  ) 
 

Definition at line 624 of file out.cc.

References current_time, DPRINTF, and reset().

Referenced by ht_le_aviewer::func(), ht_aviewer::handlemsg(), ht_aviewer::idle(), ht_aviewer::searchForXRefs(), ht_analy_sub::setAnalyser(), ht_aviewer::showComments(), and ht_aviewer::showXRefs().

char * AnalyserOutput::link char *  s,
Address Addr
[virtual]
 

Reimplemented in AnalyserHTOutput, and AnalyserTxtOutput.

Definition at line 612 of file out.cc.

References temp_buffer.

Referenced by generateAddr().

int AnalyserOutput::nextLine Address *&  Addr,
int &  line,
int  n,
Address max
 

Definition at line 634 of file out.cc.

References Address::add(), Address::compareTo(), getLineByteLength(), and len.

Referenced by ht_analy_sub::next_line_id().

int AnalyserOutput::prevLine Address *&  Addr,
int &  line,
int  n,
Address min
 

Definition at line 652 of file out.cc.

References Address::add(), Location::addr, analy, assert, Address::compareTo(), Analyser::disasm, DPRINTF2, DUP_ADDR, Analyser::enumLocationsReverse(), getAddrByteLength(), getLineByteLength(), getLineCount(), Disassembler::getOpcodeMetrics(), len, and min.

Referenced by ht_analy_sub::prev_line_id().

void AnalyserOutput::putElement int  element_type,
const char *  element
[virtual]
 

Reimplemented in AnalyserHTOutput, and AnalyserTxtOutput.

Definition at line 830 of file out.cc.

References write().

Referenced by generateAddr().

void AnalyserOutput::reset  ) 
 

Definition at line 835 of file out.cc.

References addr, cur_out_addr, ht_stree::empty(), NULL, and out_addrs.

Referenced by getAddr(), and invalidateCache().

void AnalyserOutput::write const char *  s,
int  n
 

Definition at line 851 of file out.cc.

References MIN, work_buffer, work_buffer_start, and WORKBUF_LEN.

void AnalyserOutput::write const char *  s  ) 
 

Definition at line 843 of file out.cc.

References elementLength(), len, MIN, work_buffer, work_buffer_start, and WORKBUF_LEN.

Referenced by AnalyserTxtOutput::beginLine(), AnalyserHTOutput::beginLine(), AnalyserTxtOutput::endLine(), generateAddr(), AnalyserTxtOutput::putElement(), AnalyserHTOutput::putElement(), and putElement().


Member Data Documentation

Address* AnalyserOutput::addr
 

Definition at line 82 of file out.h.

Referenced by done(), generateAddr(), getAddr(), init(), and reset().

Analyser* AnalyserOutput::analy
 

Definition at line 81 of file out.h.

Referenced by generateAddr(), generateFile(), init(), prevLine(), and ht_analy_sub::setAnalyser().

int AnalyserOutput::bytes_addr
 

Definition at line 87 of file out.h.

Referenced by beginAddr(), endLine(), and init().

int AnalyserOutput::bytes_line
 

Definition at line 86 of file out.h.

Referenced by beginLine(), endLine(), generateAddr(), and init().

Location* AnalyserOutput::cur_addr
 

Definition at line 84 of file out.h.

Referenced by generateAddr(), and init().

OutAddr* AnalyserOutput::cur_out_addr
 

Definition at line 85 of file out.h.

Referenced by endLine(), generateAddr(), getAddr(), init(), and reset().

UINT AnalyserOutput::current_time
 

Definition at line 96 of file out.h.

Referenced by getAddr(), init(), and invalidateCache().

int AnalyserOutput::dis_style
 

Definition at line 99 of file out.h.

Referenced by generateAddr(), and init().

int AnalyserOutput::line
 

Definition at line 83 of file out.h.

Referenced by beginAddr(), endLine(), and generateFile().

ht_dtree* AnalyserOutput::out_addrs
 

Definition at line 89 of file out.h.

Referenced by done(), getAddr(), init(), and reset().

int AnalyserOutput::size
 

Definition at line 97 of file out.h.

Referenced by init().

byte* AnalyserOutput::temp_buffer
 

Definition at line 94 of file out.h.

Referenced by done(), externalLink(), init(), and link().

byte* AnalyserOutput::work_buffer
 

Definition at line 92 of file out.h.

Referenced by beginLine(), endLine(), init(), and write().

byte* AnalyserOutput::work_buffer_start
 

Definition at line 91 of file out.h.

Referenced by beginLine(), done(), endLine(), init(), and write().


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