14dc0cb2d82bdd2a9820cfdeaf6ba71cb8a03f78
[frida/frida.git] / src / main.cxx
1 #include "include_llvm.hxx"
2
3 #include <iostream>
4 #include <climits>
5
6 #include <QApplication>
7 #include <QCommandLineParser>
8 #include <QTextEdit>
9
10 #include "log4cxx/logger.h"
11 #include "log4cxx/basicconfigurator.h"
12
13 #include "Binary.hxx"
14 #include "gui/Mainwindow.hxx"
15
16 using std::cout;
17 using std::cin;
18 using std::cerr;
19
20 int main(int argc, char** argv)
21 {
22 log4cxx::BasicConfigurator::configure();
23 log4cxx::LoggerPtr _logger(log4cxx::Logger::getLogger("main"));
24
25 LOG4CXX_DEBUG(_logger, "Initializing LLVM");
26 llvm::InitializeAllTargetInfos();
27 llvm::InitializeAllTargetMCs();
28 llvm::InitializeAllAsmParsers();
29 llvm::InitializeAllDisassemblers();
30
31 LOG4CXX_DEBUG(_logger, "Initializing Qt");
32 QApplication app(argc, argv);
33 QCommandLineParser parser;
34
35 QApplication::setApplicationName("frida");
36 parser.addHelpOption();
37 parser.process(app);
38
39 Mainwindow m;
40 m.show();
41
42 return app.exec();
43 }