GuileInterpreter::GuileInterpreter()
: logger(log4cxx::Logger::getLogger("bindings.Guile")) {
- QString socketpath = Settings::get()->getRuntimeDirectory()->canonicalPath()
- + "/frida." + QString::number(QCoreApplication::applicationPid(), 16) + ".geiser.sock";
-
scm_init_guile();
-
- SCM scm_socketpath = scm_from_locale_string(socketpath.toStdString().c_str());
scm_c_use_module("system repl server");
- SCM socket = scm_call_2(scm_c_public_ref("system repl server", "make-unix-domain-server-socket"),
- scm_from_locale_keyword("path"), scm_socketpath);
- scm_call_1(scm_c_public_ref("system repl server", "spawn-server"), socket);
+
+ guile::Geiser* geiser = new guile::Geiser(this);
+ geiser->start();
+
scm_c_load_extension("libguile-frida-binding",
"scm_init_frida_module");
LOG4CXX_DEBUG(logger, "Finished file \"" << filename << "\"");
return 0;
}
+
+namespace guile {
+ void Geiser::run() {
+ scm_init_guile();
+
+ QString socketpath = Settings::get()->getRuntimeDirectory()->canonicalPath()
+ + "/frida." + QString::number(QCoreApplication::applicationPid(), 16) + ".geiser.sock";
+
+ SCM scm_socketpath = scm_from_locale_string(socketpath.toStdString().c_str());
+ SCM socket = scm_call_2(scm_c_public_ref("system repl server", "make-unix-domain-server-socket"),
+ scm_from_locale_keyword("path"), scm_socketpath);
+ scm_call_1(scm_c_public_ref("system repl server", "run-server"), socket);
+ }
+}
#include <libguile.h>
#include <log4cxx/logger.h>
+#include "qt.hxx"
#include "Interpreter.hxx"
class GuileInterpreter : public QObject, public Interpreter {
log4cxx::LoggerPtr logger;
};
+namespace guile {
+ class Geiser : public QThread {
+ Q_OBJECT
+ public:
+ Geiser(QObject* parent) : QThread(parent) {}
+ private:
+ void run() Q_DECL_OVERRIDE;
+ };
+}
+
+
#endif /* INCLUDE__Guile_hxx_ */
#include <QCommandLineParser>
#endif
#include <QTextEdit>
+#include <QMetaType>
+#include <QVector>
#include "log4cxx/logger.h"
#include "log4cxx/basicconfigurator.h"
QApplication::setApplicationName("frida");
QApplication::setApplicationVersion("0.0");
QApplication::addLibraryPath(CONFIG_LIBDIR "/frida/plugins/Interpreter");
+ qRegisterMetaType<QVector<int> >("QVector<int>");
#ifdef ARGPARSE
parser.addHelpOption();
parser.addVersionOption();