X-Git-Url: https://git.siccegge.de//index.cgi?p=frida%2Ffrida.git;a=blobdiff_plain;f=src%2Fmain.cxx;h=b24bb5b9ee1c77f4633b2d76ed729c5b2f1d57cd;hp=ebb85e87924d457a80c388a32a62f35a56b26fb6;hb=71337c035ff7d6c0cecc926065e93dacd33097bf;hpb=ade1d271328d2153876eb208d10a4525c962951b diff --git a/src/main.cxx b/src/main.cxx index ebb85e8..b24bb5b 100644 --- a/src/main.cxx +++ b/src/main.cxx @@ -1,6 +1,5 @@ -#include "include_llvm.hxx" +#include "disassembler/llvm/include_llvm.hxx" -#include #include #include @@ -17,17 +16,15 @@ #include "log4cxx/basicconfigurator.h" #include "gui/Mainwindow.hxx" - -using std::cout; -using std::cin; -using std::cerr; +#include "core/InformationManager.hxx" +#include "disassembler/llvm/LLVMDisassembler.hxx" int main(int argc, char** argv) { QApplication app(argc, argv); - log4cxx::BasicConfigurator::configure(); - log4cxx::LoggerPtr _logger(log4cxx::Logger::getLogger("main")); + log4cxx::BasicConfigurator::configure(); + log4cxx::LoggerPtr _logger(log4cxx::Logger::getLogger("main")); #ifdef ARGPARSE QCommandLineParser parser; @@ -39,17 +36,18 @@ int main(int argc, char** argv) parser.addVersionOption(); parser.addPositionalArgument("filename", QCoreApplication::translate("main", "File to disassemble.")); - parser.process(app); #endif - LOG4CXX_DEBUG(_logger, "Initializing LLVM"); - llvm::InitializeAllTargetInfos(); - llvm::InitializeAllTargetMCs(); - llvm::InitializeAllAsmParsers(); - llvm::InitializeAllDisassemblers(); + InformationManager iman; + + LOG4CXX_DEBUG(_logger, "Initializing LLVM"); + llvm::InitializeAllTargetInfos(); + llvm::InitializeAllTargetMCs(); + llvm::InitializeAllAsmParsers(); + llvm::InitializeAllDisassemblers(); - LOG4CXX_DEBUG(_logger, "Initializing Qt"); + LOG4CXX_DEBUG(_logger, "Initializing Qt"); std::string filename = ""; #ifdef ARGPARSE @@ -58,7 +56,8 @@ int main(int argc, char** argv) } #endif - Mainwindow m(filename); + Mainwindow m(&iman); m.show(); + iman.reset(filename); return app.exec(); }