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

ht_aviewer Class Reference

#include <htanaly.h>

Inheritance diagram for ht_aviewer:

ht_uformat_viewer ht_format_viewer ht_viewer ht_view Object ht_class_aviewer ht_coff_aviewer ht_elf_aviewer ht_flt_aviewer ht_le_aviewer ht_macho_aviewer ht_ne_aviewer ht_pe_aviewer ht_pef_aviewer ht_xbe_aviewer List of all members.

Public Member Functions

void init (bounds *b, char *desc, int caps, ht_streamfile *file, ht_format_group *format_group, Analyser *Analy)
virtual void done ()
bool convertAddressToViewerPos (Address *a, viewer_pos *p)
bool convertViewerPosToAddress (const viewer_pos &p, Address **a)
void attachInfoline (AnalyInfoline *V)
bool canCreateAddress (Address *addr, bool error_msg)
void dataStringDialog ()
void exportFileDialog ()
virtual char * func (UINT i, bool execute)
void generateOutputDialog ()
bool getCurrentAddress (Address **a)
virtual bool get_current_offset (FILEOFS *ofs)
virtual void get_pindicator_str (char *buf)
virtual bool get_hscrollbar_pos (int *pstart, int *psize)
bool gotoAddress (Address *a, ht_view *source_object)
virtual void handlemsg (htmsg *msg)
virtual bool idle ()
virtual bool offset_to_pos (FILEOFS ofs, viewer_pos *p)
virtual bool pos_to_offset (viewer_pos p, FILEOFS *ofs)
bool pos_to_string (viewer_pos p, char *result, int maxlen)
virtual int ref_sel (LINE_ID *id)
virtual void reloadpalette ()
virtual void setAnalyser (Analyser *a)=0
void showCallChain (Address *addr)
void showComments (Address *addr)
void showInfo (Address *addr)
void showSymbols (Address *addr)
void showXRefs (Address *addr)
void searchForXRefs (Address *addr)
virtual bool qword_to_pos (qword q, viewer_pos *p)
virtual int func_handler (eval_scalar *result, char *name, eval_scalarlist *params)
virtual int symbol_handler (eval_scalar *result, char *name)

Public Attributes

int idle_count
Analyseranaly
int last_active
AnalyInfolineinfoline
ht_analy_subanaly_sub
bool one_load_hack
bool pause

Member Function Documentation

void ht_aviewer::attachInfoline AnalyInfoline V  ) 
 

Definition at line 522 of file htanaly.cc.

References infoline.

Referenced by htclassimage_init(), and htpefimage_init().

bool ht_aviewer::canCreateAddress Address addr,
bool  error_msg
 

Definition at line 868 of file htanaly.cc.

References Location::addr, ADDRESS_STRING_FORMAT_LEADING_ZEROS, analy, Address::compareTo(), errorbox, Analyser::getLocationContextByAddress(), global_analyser_address_string_format, Location::label, and Symbol::name.

Referenced by dataStringDialog(), handlemsg(), and showComments().

bool ht_aviewer::convertAddressToViewerPos Address a,
viewer_pos p
 

Definition at line 572 of file htanaly.cc.

References analy_sub, byte, ht_uformat_viewer::clear_viewer_pos(), LINE_ID::id1, LINE_ID::id2, Address::isValid(), uformat_viewer_pos::line_id, Address::putIntoArray(), uformat_viewer_pos::sub, and viewer_pos::u.

Referenced by gotoAddress(), ht_le_aviewer::offset_to_pos(), offset_to_pos(), qword_to_pos(), ht_analy_sub::search(), and searchForXRefs().

bool ht_aviewer::convertViewerPosToAddress const viewer_pos p,
Address **  a
 

Definition at line 565 of file htanaly.cc.

References analy, byte, Analyser::createAddress(), LINE_ID::id2, uformat_viewer_pos::line_id, and viewer_pos::u.

Referenced by generateOutputDialog(), getCurrentAddress(), ht_le_aviewer::pos_to_offset(), pos_to_offset(), pos_to_string(), searchForXRefs(), showXRefs(), and symbol_handler().

void ht_aviewer::dataStringDialog  ) 
 

Definition at line 881 of file htanaly.cc.

References Analyser::addAddressSymbol(), Analyser::addComment(), Location::addr, analy, Analyser::bufPtr(), byte, canCreateAddress(), Analyser::data, Address::difference(), analy_string::done(), dst_string, Analyser::enumLocations(), getCurrentAddress(), ht_snprintf(), label_data, analy_string::length(), make_valid_name(), MIN, analy_string::name(), analy_string::render_string(), scinitialized, DataAnalyser::setArrayAddressType(), string_test(), UINT, and Analyser::validAddress().

Referenced by handlemsg().

void ht_aviewer::done  )  [virtual]
 

Reimplemented from ht_uformat_viewer.

Definition at line 512 of file htanaly.cc.

References analy, Analyser::done(), ht_uformat_viewer::done(), and unregister_idle_object().

void ht_aviewer::exportFileDialog  ) 
 

Definition at line 933 of file htanaly.cc.

References Analyser::active, analy, button_cancel, button_ok, center_bounds(), ht_view::databuf_get(), ht_dialog::done(), ht_file::done(), export_to_sym(), FAM_WRITE, FOM_CREATE, FS_KILLER, FS_MOVE, FS_TITLE, ht_stream::get_error(), ht_streamfile::get_filename(), HT_NAME_MAX, export_dialog_data::id1, infobox, ht_file::init(), ht_window::insert(), export_dialog_data::lp, ht_dialog::run(), and sys_filename_suffix().

Referenced by handlemsg().

char * ht_aviewer::func UINT  i,
bool  execute
[virtual]
 

Reimplemented from ht_uformat_viewer.

Reimplemented in ht_le_aviewer, and ht_ne_aviewer.

Definition at line 585 of file htanaly.cc.

References cmd_analyser_symbols, ht_uformat_viewer::func(), ht_view::sendmsg(), and UINT.

Referenced by ht_ne_aviewer::func(), ht_le_aviewer::func(), and showXRefs().

int ht_aviewer::func_handler eval_scalar result,
char *  name,
eval_scalarlist params
[virtual]
 

Reimplemented from ht_format_viewer.

Reimplemented in ht_pef_aviewer, ht_pe_aviewer, and ht_xbe_aviewer.

Definition at line 1899 of file htanaly.cc.

References ht_format_viewer::func_handler(), NULL, SCALAR_INT, SCALAR_STR, and std_eval_func_handler().

Referenced by ht_xbe_aviewer::func_handler(), ht_pe_aviewer::func_handler(), and ht_pef_aviewer::func_handler().

void ht_aviewer::generateOutputDialog  ) 
 

Definition at line 736 of file htanaly.cc.

References Analyser::active, analy, bnstr(), button_cancel, button_ok, center_bounds(), convertViewerPosToAddress(), ht_view::databuf_get(), ht_dialog::done(), ht_file::done(), AnalyserOutput::done(), errorbox, FAM_WRITE, FOM_CREATE, FS_KILLER, FS_MOVE, FS_TITLE, AnalyserOutput::generateFile(), ht_uformat_viewer::get_current_pos(), ht_stream::get_error(), ht_streamfile::get_filename(), globalerror, HT_NAME_MAX, output_dialog_data::id1, output_dialog_data::id2, output_dialog_data::id3, infobox, ht_file::init(), ht_window::insert(), output_dialog_data::lp, pos_to_string(), ht_dialog::run(), ht_format_viewer::string_to_pos(), sys_filename_suffix(), and UINT.

Referenced by handlemsg().

bool ht_aviewer::get_current_offset FILEOFS ofs  )  [virtual]
 

Reimplemented from ht_uformat_viewer.

Definition at line 1014 of file htanaly.cc.

References Analyser::addressToFileofs(), analy, FILEOFS, ht_uformat_viewer::get_current_offset(), getCurrentAddress(), and INVALID_FILE_OFS.

Referenced by ht_le_aviewer::get_current_real_offset(), and get_pindicator_str().

bool ht_aviewer::get_hscrollbar_pos int *  pstart,
int *  psize
[virtual]
 

Reimplemented from ht_format_viewer.

Definition at line 1027 of file htanaly.cc.

References analy_sub.

void ht_aviewer::get_pindicator_str char *  buf  )  [virtual]
 

Reimplemented from ht_format_viewer.

Definition at line 1039 of file htanaly.cc.

References ADDRESS_STRING_FORMAT_COMPACT, analy, buf, FILEOFS, get_current_offset(), getCurrentAddress(), global_analyser_address_string_format, ht_snprintf(), and Analyser::isDirty().

bool ht_aviewer::getCurrentAddress Address **  a  ) 
 

Definition at line 1007 of file htanaly.cc.

References convertViewerPosToAddress(), and ht_uformat_viewer::get_current_pos().

Referenced by dataStringDialog(), get_current_offset(), get_pindicator_str(), handlemsg(), and symbol_handler().

bool ht_aviewer::gotoAddress Address a,
ht_view source_object
 

Definition at line 1056 of file htanaly.cc.

References analy, convertAddressToViewerPos(), ht_uformat_viewer::goto_pos(), scvalid, and Analyser::validAddress().

Referenced by handlemsg(), ref_sel(), ht_xbe_import_viewer::select_entry(), ht_pe_import_viewer::select_entry(), ht_pe_export_viewer::select_entry(), ht_pe_dimport_viewer::select_entry(), showCallChain(), showSymbols(), and showXRefs().

void ht_aviewer::handlemsg htmsg *  msg  )  [virtual]
 

Reimplemented from ht_uformat_viewer.

Definition at line 1069 of file htanaly.cc.

References Location::addr, ADDRESS_STRING_FORMAT_LEADING_ZEROS, analy, ANALY_EDIT_BYTES, analy_sub, Analyser::assignSymbol(), Analyser::beginAnalysis(), buf, Analyser::bufPtr(), button_yes, byte, Address::byteSize(), canCreateAddress(), clearmsg(), cmd_analyser_call_assembler, cmd_analyser_call_chain, cmd_analyser_comments, cmd_analyser_continue, cmd_analyser_data_string, cmd_analyser_del_addr_bindings, cmd_analyser_export_file, cmd_analyser_follow, cmd_analyser_follow_ex, cmd_analyser_generate_output, cmd_analyser_info, cmd_analyser_name_addr, cmd_analyser_pause_resume, cmd_analyser_previous_label, cmd_analyser_save, cmd_analyser_srt, cmd_analyser_symbols, cmd_analyser_this_function, cmd_analyser_xrefs, cmd_edit_mode, cmd_view_mode, confirmbox, Analyser::continueAnalysisAt(), Analyser::createAddress(), Analyser::createAssembler(), dataStringDialog(), Analyser::deleteLocation(), Analyser::deleteSymbol(), dialog_assemble(), ht_view::dirtyview(), Analyser::disasm, Analyser::done(), Object::done(), dword, ht_uformat_viewer::edit(), errorbox, exportFileDialog(), FILEOFS, generateOutputDialog(), ht_uformat_viewer::get_current_pos(), ht_format_viewer::get_current_real_offset(), getCurrentAddress(), Analyser::getDisasmStr(), Analyser::getDisasmStrFormatted(), Address::getFromArray(), Analyser::getFunctionByAddress(), Analyser::getPreviousSymbolByAddress(), Analyser::getSymbolByAddress(), Analyser::getSymbolByName(), global_analyser_address_string_format, gotoAddress(), ht_uformat_viewer::handlemsg(), HISTATOM_NAME_ADDR, ht_snprintf(), ht_strdup(), infobox, infoline, ht_static_context_menu::init(), inputbox(), ht_static_context_menu::insert_entry(), ht_static_context_menu::insert_separator(), ht_static_context_menu::insert_submenu(), INVALID_FILE_OFS, AnalyserOutput::invalidateCache(), K_Alt_Q, K_Control_A, K_Control_D, K_Control_F, K_Control_L, K_Control_O, K_Control_T, K_Delete, label_unknown, Symbol::location, make_valid_name(), Analyser::makeDirty(), Analyser::mapAddr(), msg_contextmenuquery, msg_draw, msg_file_changed, msg_get_analyser, msg_keypressed, msg_postinit, msg_retval, msg_set_analyser, Symbol::name, NULL, one_load_hack, ht_analy_sub::output, pause, scvalid, ht_view::sendmsg(), Assembler::set_imm_eval_proc(), setAnalyser(), Analyser::setDisplayMode(), showCallChain(), showComments(), showInfo(), showSymbols(), showXRefs(), smalloc(), tag_class_sel, test_srt(), Symbol::type, UINT, AnalyInfoline::update(), valid_name(), and Analyser::validAddress().

bool ht_aviewer::idle  )  [virtual]
 

Standard Object idle function. Overwrite and register with htidle.cc:register_idle()

Returns:
true if working, false if really idle

Reimplemented from Object.

Definition at line 1476 of file htanaly.cc.

References Analyser::active, analy, analy_sub, app, Analyser::continueAnalysis(), ht_view::dirtyview(), Analyser::getName(), idle_count, AnalyserOutput::invalidateCache(), last_active, LOG, msg_draw, Analyser::ops_parsed, ht_analy_sub::output, pause, and ht_view::sendmsg().

void ht_aviewer::init bounds *  b,
char *  desc,
int  caps,
ht_streamfile file,
ht_format_group format_group,
Analyser Analy
 

Definition at line 495 of file htanaly.cc.

References analy, ANALY_COLLAPSE_XREFS, ANALY_EDIT_BYTES, ANALY_SHOW_ADDRESS, ANALY_SHOW_COMMENTS, ANALY_SHOW_LABELS, ANALY_SHOW_XREFS, analy_sub, ANALY_TRANSLATE_SYMBOLS, file, idle_count, infoline, Object::init(), last_active, NULL, one_load_hack, pause, register_idle_object(), SEARCHMODE_BIN, SEARCHMODE_EVALSTR, SEARCHMODE_EXPR, and Analyser::setDisplayMode().

bool ht_aviewer::offset_to_pos FILEOFS  ofs,
viewer_pos p
[virtual]
 

Reimplemented from ht_format_viewer.

Reimplemented in ht_le_aviewer.

Definition at line 1502 of file htanaly.cc.

References analy, convertAddressToViewerPos(), FILEOFS, and Analyser::fileofsToAddress().

Referenced by symbol_handler().

bool ht_aviewer::pos_to_offset viewer_pos  p,
FILEOFS ofs
[virtual]
 

Reimplemented from ht_format_viewer.

Reimplemented in ht_le_aviewer.

Definition at line 527 of file htanaly.cc.

References Analyser::addressToFileofs(), analy, convertViewerPosToAddress(), FILEOFS, and INVALID_FILE_OFS.

Referenced by ht_analy_sub::search().

bool ht_aviewer::pos_to_string viewer_pos  p,
char *  result,
int  maxlen
 

Definition at line 542 of file htanaly.cc.

References Location::addr, ADDRESS_STRING_FORMAT_ADD_H, ADDRESS_STRING_FORMAT_LEADING_ZEROS, analy, convertViewerPosToAddress(), Address::difference(), Analyser::getFunctionByAddress(), Analyser::getLocationByAddress(), global_analyser_address_string_format, ht_snprintf(), Location::label, and Symbol::name.

Referenced by generateOutputDialog().

bool ht_aviewer::qword_to_pos qword  q,
viewer_pos p
[virtual]
 

Reimplemented from ht_format_viewer.

Definition at line 1958 of file htanaly.cc.

References ADDRESS_STRING_FORMAT_LEADING_ZEROS, analy, byte, Address::byteSize(), convertAddressToViewerPos(), Analyser::createAddress(), dword, Address::getFromArray(), global_analyser_address_string_format, GLOBAL_ERROR_SIZE, globalerror, ht_snprintf(), QWORD_GET_INT, scvalid, and Analyser::validAddress().

int ht_aviewer::ref_sel LINE_ID id  )  [virtual]
 

Reimplemented from ht_uformat_viewer.

Definition at line 1511 of file htanaly.cc.

References analy, byte, Analyser::createAddress(), Address::getFromArray(), gotoAddress(), LINE_ID::id1, LINE_ID::id2, LINE_ID::id3, LINE_ID::id4, and showXRefs().

void ht_aviewer::reloadpalette  )  [virtual]
 

Reimplemented from ht_uformat_viewer.

Definition at line 1537 of file htanaly.cc.

References analy_sub, AnalyserOutput::changeConfig(), ht_analy_sub::output, and ht_uformat_viewer::reloadpalette().

void ht_aviewer::searchForXRefs Address addr  ) 
 

Definition at line 1543 of file htanaly.cc.

References ADDRESS_STRING_FORMAT_COMPACT, Analyser::addXRef(), analy, analy_sub, convertAddressToViewerPos(), convertViewerPosToAddress(), Analyser::getDisplayMode(), global_analyser_address_string_format, ht_analy_sub::highestaddress, ht_snprintf(), AnalyserOutput::invalidateCache(), ht_analy_sub::lowestaddress, Analyser::makeDirty(), ht_uformat_viewer::next_logical_pos(), ht_analy_sub::output, ht_visual_search_result::pos, SC_VISUAL, Analyser::setDisplayMode(), SF_REGEX_CASEINSENSITIVE, ht_uformat_viewer::vsearch(), and xrefoffset.

Referenced by showXRefs().

virtual void ht_aviewer::setAnalyser Analyser a  )  [pure virtual]
 

Implemented in ht_class_aviewer, ht_coff_aviewer, ht_elf_aviewer, ht_flt_aviewer, ht_le_aviewer, ht_macho_aviewer, ht_ne_aviewer, ht_pef_aviewer, ht_pe_aviewer, and ht_xbe_aviewer.

Referenced by handlemsg().

void ht_aviewer::showCallChain Address addr  ) 
 

Definition at line 1573 of file htanaly.cc.

References Location::addr, ADDRESS_STRING_FORMAT_LEADING_ZEROS, CallChain::adjust(), align_left, analy, button_cancel, button_ok, center_bounds(), ht_view::databuf_get(), ht_dialog::done(), FS_KILLER, FS_MOVE, FS_TITLE, CallChain::get_root(), Analyser::getFunctionByAddress(), global_analyser_address_string_format, gotoAddress(), ht_snprintf(), ht_statictext::init(), ht_dialog::init(), ht_window::insert(), Location::label, Symbol::name, NULL, and ht_dialog::run().

Referenced by handlemsg().

void ht_aviewer::showComments Address addr  ) 
 

Definition at line 1617 of file htanaly.cc.

References Analyser::addComment(), analy, analy_sub, buf, button_cancel, button_ok, canCreateAddress(), center_bounds(), ht_clist::count(), ht_ltextfile::done(), ht_dialog::done(), Analyser::freeComments(), FS_KILLER, FS_MOVE, FS_TITLE, Analyser::getComments(), ht_ltextfile::getline(), Analyser::getLocationByAddress(), CommentList::getName(), ht_text_editor::init(), ht_dialog::init(), ht_ltextfile::init(), ht_mem_file::init(), ht_window::insert(), AnalyserOutput::invalidateCache(), len, ht_ltextfile::linecount(), Analyser::makeDirty(), NULL, ht_analy_sub::output, ht_dialog::run(), TEXTEDITOPT_UNDO, UINT, and ht_mem_file::write().

Referenced by handlemsg().

void ht_aviewer::showInfo Address addr  ) 
 

Definition at line 1700 of file htanaly.cc.

References app, center_bounds(), ht_dialog::done(), FS_KILLER, FS_MOVE, FS_TITLE, ht_view::getbounds(), AnalyserInformation::init(), ht_dialog::init(), ht_window::insert(), and ht_dialog::run().

Referenced by handlemsg().

void ht_aviewer::showSymbols Address addr  ) 
 

Definition at line 1722 of file htanaly.cc.

References analy, ht_listbox::attachTitle(), button_ok, center_bounds(), ht_view::databuf_get(), ht_dialog::done(), FS_KILLER, FS_MOVE, FS_RESIZE, FS_TITLE, Analyser::getPreviousSymbolByAddress(), gotoAddress(), ht_listbox::gotoItemByEntry(), SymbolBox::init(), ht_listbox_title::init(), ht_dialog::init(), ht_window::insert(), Location::label, Symbol::name, SymbolBox::quickfind(), register_idle_object(), ht_dialog::run(), ht_listbox_title::setText(), and unregister_idle_object().

Referenced by handlemsg().

void ht_aviewer::showXRefs Address addr  ) 
 

Definition at line 1772 of file htanaly.cc.

References Location::addr, ADDRESS_STRING_FORMAT_LEADING_ZEROS, Analyser::addXRef(), analy, analy_sub, app, ht_listbox::attachTitle(), button_ok, button_yes, center_bounds(), confirmbox, convertViewerPosToAddress(), ht_view::databuf_get(), Analyser::deleteXRef(), Address::difference(), ht_dialog::done(), ht_tree::enum_next(), errorbox, FS_KILLER, FS_MOVE, FS_RESIZE, FS_TITLE, func(), ht_view::getbounds(), Analyser::getFunctionByAddress(), ht_text_listbox::getID(), Analyser::getSymbolNameByLocation(), Analyser::getXRefs(), global_analyser_address_string_format, globalerror, GMH_LEFT, GMV_BOTTOM, gotoAddress(), ht_view::growmode, HISTATOM_GOTO, ht_snprintf(), ht_listbox_title::init(), ht_dialog::init(), inputbox(), ht_window::insert(), ht_text_listbox::insert_str(), AnalyserOutput::invalidateCache(), Analyser::makeDirty(), MK_GM, NULL, ht_analy_sub::output, ht_dialog::run(), searchForXRefs(), ht_listbox_title::setText(), ht_format_viewer::string_to_pos(), UINT, ht_text_listbox::update(), xref_type(), and xrefoffset.

Referenced by handlemsg(), and ref_sel().

int ht_aviewer::symbol_handler eval_scalar result,
char *  name
[virtual]
 

Reimplemented from ht_format_viewer.

Definition at line 1911 of file htanaly.cc.

References Location::addr, analy, bnstr(), byte, convertViewerPosToAddress(), getCurrentAddress(), Analyser::getSymbolByName(), Symbol::location, offset_to_pos(), Address::putIntoArray(), qword, QWORD_GET_LO, scalar_create_int_q(), set_eval_error(), and ht_format_viewer::symbol_handler().


Member Data Documentation

Analyser* ht_aviewer::analy
 

Definition at line 186 of file htanaly.h.

Referenced by canCreateAddress(), convertViewerPosToAddress(), dataStringDialog(), done(), exportFileDialog(), generateOutputDialog(), get_current_offset(), get_pindicator_str(), AnalyInfoline::gettext(), gotoAddress(), handlemsg(), idle(), AnalyserInformation::idle(), init(), offset_to_pos(), pos_to_offset(), pos_to_string(), qword_to_pos(), ref_sel(), searchForXRefs(), ht_xbe_import_viewer::select_entry(), ht_pe_import_viewer::select_entry(), ht_pe_export_viewer::select_entry(), ht_pe_dimport_viewer::select_entry(), showCallChain(), showComments(), showSymbols(), showXRefs(), symbol_handler(), and AnalyInfoline::valid().

ht_analy_sub* ht_aviewer::analy_sub
 

Definition at line 189 of file htanaly.h.

Referenced by convertAddressToViewerPos(), get_hscrollbar_pos(), handlemsg(), htclassimage_init(), htpefimage_init(), idle(), init(), reloadpalette(), searchForXRefs(), showComments(), and showXRefs().

int ht_aviewer::idle_count
 

Definition at line 185 of file htanaly.h.

Referenced by idle(), and init().

AnalyInfoline* ht_aviewer::infoline
 

Definition at line 188 of file htanaly.h.

Referenced by attachInfoline(), handlemsg(), and init().

int ht_aviewer::last_active
 

Definition at line 187 of file htanaly.h.

Referenced by idle(), and init().

bool ht_aviewer::one_load_hack
 

Definition at line 190 of file htanaly.h.

Referenced by handlemsg(), and init().

bool ht_aviewer::pause
 

Definition at line 191 of file htanaly.h.

Referenced by handlemsg(), idle(), and init().


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