95 realmain(
int argc,
char*
const* argv);
118 main(
int argc,
char*
const* argv)
129 catch (
const std::bad_alloc& x) {
130 DIAG_EMsg(
"[std::bad_alloc] " << x.what());
133 catch (
const std::exception& x) {
134 DIAG_EMsg(
"[std::exception] " << x.what());
138 DIAG_EMsg(
"Unknown exception encountered!");
159 std::set<std::string> dir;
187 lm->
dump(std::cout, ty);
205 os <<
"Begin LoadModule Stmt Dump\n";
206 os << pre <<
"Name: `" << lm->
name() <<
"'\n";
207 os << pre <<
"Type: `";
208 switch (lm->
type()) {
210 os <<
"Executable (fully linked except for possible DSOs)'\n";
213 os <<
"Dynamically Shared Library'\n";
218 os << pre <<
"ISA: `" <<
typeid(*BinUtil::LM::isa).name() <<
"'\n";
232 string pre1 = pre +
" ";
241 os << pre <<
"Dump:\n";
243 it != lm->
procs().end(); ++it) {
249 string theFunc = pName, theFile;
269 if (func.empty()) { func = theFunc; }
272 if (file.empty() && !theFile.empty()
273 && func == theFunc) {
278 if (theFunc.empty()) { theFunc = func; }
279 if (theFile.empty()) { theFile = file; }
283 if (it2 != map.end()) {
284 list = (*it2).second;
285 list->push_back(opVMA);
289 list->push_back(opVMA);
295 theFunc.c_str(), &map, theFile.c_str());
298 os <<
"\n" <<
"End LoadModule Stmt Dump\n";
310 os << p <<
"* " << func <<
"\n" 311 << p <<
" [" << file <<
"]\n";
314 for (it = map->begin(); it != map->end(); ++it) {
318 os << p1 <<
" " << line <<
": {" << hex;
321 for (it1 = list->begin(); it1 != list->end(); ++it1) {
325 os <<
" }" << dec << endl;
334 for (it = map->begin(); it != map->end(); ++it) {
static void dumpHeaderInfo(std::ostream &os, BinUtil::LM *lm, const char *pre="")
std::map< SrcFile::ln, VMAList * >::value_type LineToVMAListMapItVal
virtual VMA convertVMAToOpVMA(VMA vma, ushort GCC_ATTR_UNUSED opIndex) const
string canonicalizeProcName(const std::string &name, ProcNameMgr *procNameMgr)
const std::string & name() const
std::list< VMA >::const_iterator VMAListItC
bool isValid(SrcFile::ln line)
virtual void read(const std::set< std::string > &directorySet, ReadFlg readflg)
virtual ushort opIndex() const =0
bool findSrcCodeInfo(VMA vma, ushort opIndex, std::string &func, std::string &file, SrcFile::ln &line) const
virtual std::string message() const
const std::string & name() const
int main(int argc, char *argv[])
static void clearLineToVMAListMap(LineToVMAListMap *map)
std::map< SrcFile::ln, VMAList * >::iterator LineToVMAListMapIt
static void dumpSymbolicInfoForFunc(std::ostream &os, const char *pre, const char *func, LineToVMAListMap *map, const char *file)
virtual void dump(std::ostream &o=std::cerr, int flags=DUMP_Short, const char *pre="") const
std::list< VMA >::iterator VMAListIt
std::map< SrcFile::ln, VMAList * > LineToVMAListMap
static int realmain(int argc, char *const *argv)
static void dumpSymbolicInfoOld(std::ostream &os, BinUtil::LM *lm)
virtual void open(const char *filenm)