XMLProgParser Class Reference

#include <include/xmlprogparser.h>

List of all members.

Detailed Description

Definition at line 46 of file xmlprogparser.h.

Public Member Functions

void handleElementEnd (const char *el)
void handleElementStart (const char *el, const char **attr)
Progparse (const char *filename)
void persistToXML (Prog *prog)
 XMLProgParser ()

Protected Member Functions

void addId (const char **attr, void *x)
void * findId (const char *id)
const char * getAttr (const char **attr, const char *name)
int operFromString (const char *s)
void parseChildren (Cluster *c)
void parseFile (const char *filename)
void persistToXML (std::ostream &out, Statement *stmt)
void persistToXML (std::ostream &out, RTL *rtl)
void persistToXML (std::ostream &out, BasicBlock *bb)
void persistToXML (std::ostream &out, Cfg *cfg)
void persistToXML (std::ostream &out, Exp *e)
void persistToXML (std::ostream &out, Type *ty)
void persistToXML (std::ostream &out, Signature *sig)
void persistToXML (std::ostream &out, UserProc *proc)
void persistToXML (std::ostream &out, LibProc *proc)
void persistToXML (std::ostream &out, Proc *proc)
void persistToXML (std::ostream &out, Cluster *c)
void persistToXML (std::ostream &out, Global *g)

Protected Attributes

std::map< int, void * > idToX
int phase
std::list< Context * > stack

Static Protected Attributes

static _tag tags []

Constructor & Destructor Documentation

XMLProgParser::XMLProgParser  )  [inline]

Definition at line 49 of file xmlprogparser.h.

Member Function Documentation

void XMLProgParser::addId const char **  attr,
void *  x

Definition at line 212 of file xmlprogparser.cpp.

References getAttr(), and idToX.

void * XMLProgParser::findId const char *  id  )  [protected]

Definition at line 221 of file xmlprogparser.cpp.

References idToX, and NULL.

const char * XMLProgParser::getAttr const char **  attr,
const char *  name

Definition at line 175 of file xmlprogparser.cpp.

References NULL.

Referenced by addId().

void XMLProgParser::handleElementEnd const char *  el  ) 

Definition at line 196 of file xmlprogparser.cpp.

References e_unknown, _tag::end_proc, stack, and tags.

void XMLProgParser::handleElementStart const char *  el,
const char **  attr

Definition at line 183 of file xmlprogparser.cpp.

References stack, _tag::start_proc, _tag::tag, and tags.

int XMLProgParser::operFromString const char *  s  )  [protected]

Definition at line 2197 of file xmlprogparser.cpp.

References opNumOf.

Prog * XMLProgParser::parse const char *  filename  ) 

Definition at line 2118 of file xmlprogparser.cpp.

References Prog::getRootCluster(), NULL, parseChildren(), parseFile(), phase, and stack.

Referenced by Boomerang::decompile(), and Boomerang::parseCmd().

void XMLProgParser::parseChildren Cluster c  )  [protected]

Definition at line 2185 of file xmlprogparser.cpp.

References Cluster::children, Cluster::makeDirs(), and parseFile().

Referenced by parse().

void XMLProgParser::parseFile const char *  filename  )  [protected]

Definition at line 2142 of file xmlprogparser.cpp.

References end(), NULL, start(), and text().

Referenced by parse(), and parseChildren().

void XMLProgParser::persistToXML std::ostream &  out,
Statement stmt

Definition at line 2686 of file xmlprogparser.cpp.

References StatementList::begin(), BoolAssign::bFloat, StatementList::end(), BoolAssign::jtCond, ReturnStatement::modifieds, Statement::number, Statement::parent, BoolAssign::pCond, persistToXML(), Statement::proc, ReturnStatement::retAddr, ReturnStatement::returns, and BoolAssign::size.

void XMLProgParser::persistToXML std::ostream &  out,
RTL rtl

Definition at line 2675 of file xmlprogparser.cpp.

References RTL::nativeAddr, persistToXML(), and RTL::stmtList.

void XMLProgParser::persistToXML std::ostream &  out,
BasicBlock bb

Definition at line 2604 of file xmlprogparser.cpp.

References LocationSet::begin(), BasicBlock::caseHead, BasicBlock::condFollow, BasicBlock::cType, LocationSet::end(), BasicBlock::hllLabel, BasicBlock::immPDom, BasicBlock::indentLevel, BasicBlock::inEdgesVisited, BasicBlock::labelStr, BasicBlock::latchNode, BasicBlock::liveIn, BasicBlock::loopFollow, BasicBlock::loopHead, BasicBlock::loopStamps, BasicBlock::lType, BasicBlock::m_bIncomplete, BasicBlock::m_bJumpReqd, BasicBlock::m_caseHead, BasicBlock::m_condFollow, BasicBlock::m_DFTfirst, BasicBlock::m_DFTlast, BasicBlock::m_DFTrevfirst, BasicBlock::m_DFTrevlast, BasicBlock::m_iLabelNum, BasicBlock::m_InEdges, BasicBlock::m_iTraversed, BasicBlock::m_labelneeded, BasicBlock::m_labelStr, BasicBlock::m_latchNode, BasicBlock::m_loopCondType, BasicBlock::m_loopFollow, BasicBlock::m_loopHead, BasicBlock::m_nodeType, BasicBlock::m_OutEdges, BasicBlock::m_structType, BasicBlock::numForwardInEdges, BasicBlock::ord, persistToXML(), BasicBlock::revLoopStamps, BasicBlock::revOrd, BasicBlock::sType, BasicBlock::traversed, and BasicBlock::usType.

void XMLProgParser::persistToXML std::ostream &  out,
Cfg cfg

Definition at line 2578 of file xmlprogparser.cpp.

References Cfg::entryBB, Cfg::exitBB, Cfg::lastLabel, Cfg::m_bWellFormed, Cfg::m_listBB, Cfg::Ordering, persistToXML(), and Cfg::revOrdering.

void XMLProgParser::persistToXML std::ostream &  out,
Exp e

Definition at line 2453 of file xmlprogparser.cpp.

References Const::a, Const::conscript, Const::d, RefExp::def, Const::i, Exp::op, operStrings, opFltConst, opFuncConst, opIntConst, opStrConst, Const::p, persistToXML(), Location::proc, FlagDef::rtl, Unary::subExp1, Binary::subExp2, Ternary::subExp3, TypedExp::type, Const::u, and TypeVal::val.

void XMLProgParser::persistToXML std::ostream &  out,
Type ty

Definition at line 2377 of file xmlprogparser.cpp.

References ArrayType::base_type, ArrayType::length, NamedType::name, CompoundType::names, persistToXML(), PointerType::points_to, FuncType::signature, IntegerType::signedness, FloatType::size, IntegerType::size, and CompoundType::types.

void XMLProgParser::persistToXML std::ostream &  out,
Signature sig

Definition at line 2330 of file xmlprogparser.cpp.

References CONV_NONE, Signature::conventionName(), Signature::ellipsis, Signature::getConvention(), Signature::getPlatform(), Signature::name, Signature::params, persistToXML(), PLAT_GENERIC, Signature::platformName(), and Signature::preferedName.

void XMLProgParser::persistToXML std::ostream &  out,
UserProc proc

Definition at line 2267 of file xmlprogparser.cpp.

References Proc::address, Proc::callerSet, Proc::cluster, Proc::m_firstCaller, Proc::m_firstCallerAddr, persistToXML(), Proc::provenTrue, Proc::signature, UserProc::status, and UserProc::theReturnStatement.

void XMLProgParser::persistToXML std::ostream &  out,
LibProc proc

Definition at line 2243 of file xmlprogparser.cpp.

References Proc::address, Proc::callerSet, Proc::cluster, Proc::m_firstCaller, Proc::m_firstCallerAddr, persistToXML(), Proc::provenTrue, and Proc::signature.

void XMLProgParser::persistToXML std::ostream &  out,
Proc proc

Definition at line 2322 of file xmlprogparser.cpp.

References Proc::isLib(), and persistToXML().

void XMLProgParser::persistToXML std::ostream &  out,
Cluster c

Definition at line 2206 of file xmlprogparser.cpp.

References Cluster::children, Cluster::name, and persistToXML().

void XMLProgParser::persistToXML std::ostream &  out,
Global g

Definition at line 2216 of file xmlprogparser.cpp.

References Global::nam, persistToXML(), Global::type, and Global::uaddr.

void XMLProgParser::persistToXML Prog prog  ) 

Definition at line 2225 of file xmlprogparser.cpp.

References Proc::getCluster(), Prog::getName(), Prog::getPath(), Cluster::getStream(), Prog::globals, Prog::m_iNumberedProc, Prog::m_procs, Prog::m_rootCluster, and Cluster::openStreams().

Referenced by Boomerang::decompile(), Boomerang::parseCmd(), and persistToXML().

Member Data Documentation

std::map<int, void*> XMLProgParser::idToX [protected]

Definition at line 151 of file xmlprogparser.h.

Referenced by addId(), and findId().

int XMLProgParser::phase [protected]

Definition at line 152 of file xmlprogparser.h.

Referenced by parse().

std::list<Context*> XMLProgParser::stack [protected]

Definition at line 150 of file xmlprogparser.h.

Referenced by handleElementEnd(), handleElementStart(), and parse().

_tag XMLProgParser::tags [static, protected]

Definition at line 145 of file xmlprogparser.h.

Referenced by handleElementEnd(), and handleElementStart().

The documentation for this class was generated from the following files:
Generated on Tue Sep 19 21:18:48 2006 for Boomerang by  doxygen 1.4.6