diff --git a/README.md b/README.md index a732fd73..956e3382 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,17 @@ -# Iaitō [![Build Status](https://travis-ci.org/hteso/iaito.svg?branch=master)](https://travis-ci.org/hteso/iaito) +# Cutter [![Build Status](https://travis-ci.org/radareorg/cutter.svg?branch=master)](https://travis-ci.org/radareorg/cutter) -> The GUI that ~~radare2~~ humans deserve - -A Qt and C++ GUI for radare2 reverse engineering framework +A Qt and C++ GUI for radare2 reverse engineering framework (originally Iaito) ## Screenshot -![Screenshot](https://raw.githubusercontent.com/hteso/iaito/master/Screenshots/Screenshot.png) +![Screenshot](https://raw.githubusercontent.com/radareorg/cutter/master/Screenshots/Screenshot.png) ## Disclaimer -Iaitō is not aimed at existing radare2 users, it is focused on those whose are not yet radare2 users because of the learning curve, they don't like CLI applications or the difficulty/instability of radare2. +Cutter is not aimed at existing radare2 users, it is focused on those whose are not yet radare2 users because of the learning curve, they don't like CLI applications or the difficulty/instability of radare2. **IMPORTANT:** the current status is **highly unstable**, it is an alpha version aimed for developers. Users please wait for the first stable release with installers. -## The code sucks - -Yes, the code sucks. Hopefully we will be able to remove this statement from the README one day, but I had never coded Qt nor C++ until I started Iaitō, so obviously the code is ugly and not well designed. - ## Requirements - **Radare2**: Make sure that, when cloning the project, you use `git clone --recurse-submodules` or run `git submodule update --init` to clone the correct radare2 version. Then execute the following command in the radare2 folder: @@ -25,22 +19,22 @@ Yes, the code sucks. Hopefully we will be able to remove this statement from the sys/install.sh ``` -- QtCreator and Qt: Right now Iaitō uses Qt 5.9.1, you will need the latest QtCreator and Qt added during the installation: +- QtCreator and Qt: Right now *cutter* uses Qt 5.9.1, you will need the latest QtCreator and Qt added during the installation: - Download: https://www.qt.io/ide/ - Add Qt 5.9.1: http://doc.qt.io/qtcreator/creator-project-qmake.html ## Platforms -Iaitō is developed and tested in OS X, Linux and [Windows](https://github.com/hteso/iaito/wiki/Compiling-on-Windows). The first release for users will include installers for all three platforms. +Cutter is developed on OS X, Linux and Windows. The first release for users will include installers for all three platforms. ## Documentation Proper documentation and website will be created before the first release. -Roadmap information for developers can be found [here](https://github.com/hteso/iaito/wiki/Roadmap). +Roadmap information for developers can be found [here](https://github.com/radareorg/cutter/wiki/Roadmap). ## Help -Right now the best place to obtain help from Iaitō developers and community is joining this telegram group: +Right now the best place to obtain help from *cutter* developers and community is joining this telegram group: - https://t.me/iaito diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d1f4f5a2..0980a42d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.1) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") include(DisallowInSource) -project(Iaito VERSION 1.0.0) +project(cutter VERSION 1.0.0) set(CMAKE_CXX_STANDARD 11) @@ -17,7 +17,7 @@ find_package(Qt5 REQUIRED COMPONENTS Core Widgets Gui WebEngine WebEngineWidgets if(WIN32) # use radare2 libraries from submodule on windows - set(IAITO_WIN32_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../iaito_win32") + set(IAITO_WIN32_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../cutter_win32") list(APPEND CMAKE_PREFIX_PATH "${IAITO_WIN32_DIR}") if(CMAKE_SIZEOF_VOID_P EQUAL 8) # 64 bit @@ -41,30 +41,30 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" endif() -# Parse iaito.pro to get filenames +# Parse cutter.pro to get filenames include(QMakeProParse) -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/iaito.pro" - "${CMAKE_CURRENT_BINARY_DIR}/iaito.pro" - COPYONLY) # trigger reconfigure if iaito.pro changes -parse_qmake_pro("${CMAKE_CURRENT_BINARY_DIR}/iaito.pro" IAITO_PRO) +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cutter.pro" + "${CMAKE_CURRENT_BINARY_DIR}/cutter.pro" + COPYONLY) # trigger reconfigure if cutter.pro changes +parse_qmake_pro("${CMAKE_CURRENT_BINARY_DIR}/cutter.pro" IAITO_PRO) set(SOURCE_FILES ${IAITO_PRO_SOURCES}) set(HEADER_FILES ${IAITO_PRO_HEADERS}) set(UI_FILES ${IAITO_PRO_FORMS}) set(QRC_FILES ${IAITO_PRO_RESOURCES}) -message(STATUS "sources from iaito.pro: ${SOURCE_FILES}") -message(STATUS "headers from iaito.pro: ${HEADER_FILES}") -message(STATUS "forms from iaito.pro: ${UI_FILES}") -message(STATUS "resources from iaito.pro: ${QRC_FILES}") +message(STATUS "sources from cutter.pro: ${SOURCE_FILES}") +message(STATUS "headers from cutter.pro: ${HEADER_FILES}") +message(STATUS "forms from cutter.pro: ${UI_FILES}") +message(STATUS "resources from cutter.pro: ${QRC_FILES}") set(IAITO_VERSION_SUFFIX "-dev") set(IAITO_VERSION_FULL "${PROJECT_VERSION}${IAITO_VERSION_SUFFIX}") -message(STATUS "Building Iaito version ${IAITO_VERSION_FULL}") +message(STATUS "Building Cutter version ${IAITO_VERSION_FULL}") add_definitions("-DAPP_VERSION=\"${IAITO_VERSION_FULL}\"") -add_executable(iaito ${UI_FILES} ${QRC_FILES} ${SOURCE_FILES} ${HEADER_FILES}) -qt5_use_modules(iaito Core Widgets Gui WebEngine WebEngineWidgets) -target_link_libraries(iaito ${RADARE2_LIBRARIES}) +add_executable(cutter ${UI_FILES} ${QRC_FILES} ${SOURCE_FILES} ${HEADER_FILES}) +qt5_use_modules(cutter Core Widgets Gui WebEngine WebEngineWidgets) +target_link_libraries(cutter ${RADARE2_LIBRARIES}) diff --git a/src/analthread.cpp b/src/analthread.cpp index 1d4c391c..e8acf09f 100644 --- a/src/analthread.cpp +++ b/src/analthread.cpp @@ -1,6 +1,6 @@ -#include "analthread.h" -#include "iaitorcore.h" #include +#include "cutter.h" +#include "analthread.h" AnalThread::AnalThread(QWidget *parent) : QThread(parent), @@ -18,7 +18,7 @@ AnalThread::~AnalThread() } } -void AnalThread::start(IaitoRCore *core, int level, QList advanced) +void AnalThread::start(CutterCore *core, int level, QList advanced) { this->core = core; this->level = level; diff --git a/src/analthread.h b/src/analthread.h index afb9e3d6..14c9855f 100644 --- a/src/analthread.h +++ b/src/analthread.h @@ -3,7 +3,7 @@ #include -class IaitoRCore; +class CutterCore; class AnalThread : public QThread { @@ -12,7 +12,7 @@ public: explicit AnalThread(QWidget *parent = 0); ~AnalThread(); - void start(IaitoRCore *core, int level, QList advanced); + void start(CutterCore *core, int level, QList advanced); protected: void run(); @@ -20,7 +20,7 @@ protected: using QThread::start; private: - IaitoRCore *core; + CutterCore *core; int level; QList advanced; }; diff --git a/src/cutter b/src/cutter new file mode 100755 index 00000000..cf2aee83 Binary files /dev/null and b/src/cutter differ diff --git a/src/qrcore.cpp b/src/cutter.cpp similarity index 88% rename from src/qrcore.cpp rename to src/cutter.cpp index fc216435..5bbc28c8 100644 --- a/src/qrcore.cpp +++ b/src/cutter.cpp @@ -1,8 +1,8 @@ -#include "iaitorcore.h" -#include "sdb.h" - #include #include +#include "cutter.h" +#include "sdb.h" + #define DB this->db @@ -33,14 +33,14 @@ RCore *RCoreLocked::operator->() const return core; } -RCoreLocked IaitoRCore::core() const +RCoreLocked CutterCore::core() const { return RCoreLocked(this->core_); } #define CORE_LOCK() RCoreLocked core_lock__(this->core_) -IaitoRCore::IaitoRCore(QObject *parent) : +CutterCore::CutterCore(QObject *parent) : QObject(parent) { r_cons_new(); // initialize console @@ -67,7 +67,7 @@ IaitoRCore::IaitoRCore(QObject *parent) : } -int IaitoRCore::getCycloComplex(ut64 addr) +int CutterCore::getCycloComplex(ut64 addr) { CORE_LOCK(); QString ret = ""; @@ -84,7 +84,7 @@ int IaitoRCore::getCycloComplex(ut64 addr) } } -int IaitoRCore::getFcnSize(ut64 addr) +int CutterCore::getFcnSize(ut64 addr) { CORE_LOCK(); QString ret = ""; @@ -103,7 +103,7 @@ int IaitoRCore::getFcnSize(ut64 addr) } } -QList IaitoRCore::sdbList(QString path) +QList CutterCore::sdbList(QString path) { CORE_LOCK(); QList list = QList(); @@ -121,7 +121,7 @@ QList IaitoRCore::sdbList(QString path) return list; } -QList IaitoRCore::sdbListKeys(QString path) +QList CutterCore::sdbListKeys(QString path) { CORE_LOCK(); QList list = QList(); @@ -140,7 +140,7 @@ QList IaitoRCore::sdbListKeys(QString path) return list; } -QString IaitoRCore::sdbGet(QString path, QString key) +QString CutterCore::sdbGet(QString path, QString key) { CORE_LOCK(); Sdb *db = sdb_ns_path(core_->sdb, path.toUtf8().constData(), 0); @@ -153,7 +153,7 @@ QString IaitoRCore::sdbGet(QString path, QString key) return QString(""); } -bool IaitoRCore::sdbSet(QString path, QString key, QString val) +bool CutterCore::sdbSet(QString path, QString key, QString val) { CORE_LOCK(); Sdb *db = sdb_ns_path(core_->sdb, path.toUtf8().constData(), 1); @@ -161,19 +161,19 @@ bool IaitoRCore::sdbSet(QString path, QString key, QString val) return sdb_set(db, key.toUtf8().constData(), val.toUtf8().constData(), 0); } -IaitoRCore::~IaitoRCore() +CutterCore::~CutterCore() { r_core_free(this->core_); r_cons_free(); } -QString IaitoRCore::sanitizeStringForCommand(QString s) +QString CutterCore::sanitizeStringForCommand(QString s) { static const QRegExp regexp(";|@"); return s.replace(regexp, "_"); } -QString IaitoRCore::cmd(const QString &str) +QString CutterCore::cmd(const QString &str) { CORE_LOCK(); @@ -186,7 +186,7 @@ QString IaitoRCore::cmd(const QString &str) return o; } -QJsonDocument IaitoRCore::cmdj(const QString &str) +QJsonDocument CutterCore::cmdj(const QString &str) { CORE_LOCK(); QByteArray cmd = str.toUtf8(); @@ -208,10 +208,10 @@ QJsonDocument IaitoRCore::cmdj(const QString &str) return doc; } -bool IaitoRCore::loadFile(QString path, uint64_t loadaddr, uint64_t mapaddr, bool rw, int va, int idx, bool loadbin) +bool CutterCore::loadFile(QString path, uint64_t loadaddr, uint64_t mapaddr, bool rw, int va, int idx, bool loadbin) { - IAITONOTUSED(loadaddr); - IAITONOTUSED(idx); + CUTTERNOTUSED(loadaddr); + CUTTERNOTUSED(idx); CORE_LOCK(); RCoreFile *f; @@ -292,7 +292,7 @@ bool IaitoRCore::loadFile(QString path, uint64_t loadaddr, uint64_t mapaddr, boo return true; } -void IaitoRCore::analyze(int level, QList advanced) +void CutterCore::analyze(int level, QList advanced) { CORE_LOCK(); /* @@ -317,13 +317,13 @@ void IaitoRCore::analyze(int level, QList advanced) } } -void IaitoRCore::renameFunction(QString prev_name, QString new_name) +void CutterCore::renameFunction(QString prev_name, QString new_name) { cmd("afn " + new_name + " " + prev_name); emit functionRenamed(prev_name, new_name); } -void IaitoRCore::setComment(RVA addr, QString cmt) +void CutterCore::setComment(RVA addr, QString cmt) { //r_meta_add (core->anal, 'C', addr, 1, cmt.toUtf8()); cmd("CC " + cmt + " @ " + QString::number(addr)); @@ -331,14 +331,14 @@ void IaitoRCore::setComment(RVA addr, QString cmt) } -void IaitoRCore::delComment(ut64 addr) +void CutterCore::delComment(ut64 addr) { CORE_LOCK(); r_meta_del(core_->anal, 'C', addr, 1, NULL); //cmd (QString("CC-@")+addr); } -QMap>> IaitoRCore::getNestedComments() +QMap>> CutterCore::getNestedComments() { QMap>> ret; QString comments = cmd("CC~CCu"); @@ -358,7 +358,7 @@ QMap>> IaitoRCore::getNestedComments() return ret; } -void IaitoRCore::seek(QString addr) +void CutterCore::seek(QString addr) { if (addr.length() > 0) seek(this->math(addr.toUtf8().constData())); @@ -366,13 +366,13 @@ void IaitoRCore::seek(QString addr) -void IaitoRCore::seek(ut64 offset) +void CutterCore::seek(ut64 offset) { CORE_LOCK(); r_core_seek(this->core_, offset, true); } -bool IaitoRCore::tryFile(QString path, bool rw) +bool CutterCore::tryFile(QString path, bool rw) { CORE_LOCK(); RCoreFile *cf; @@ -401,7 +401,7 @@ bool IaitoRCore::tryFile(QString path, bool rw) -QList IaitoRCore::getList(const QString &type, const QString &subtype) +QList CutterCore::getList(const QString &type, const QString &subtype) { CORE_LOCK(); QList ret = QList(); @@ -437,13 +437,13 @@ QList IaitoRCore::getList(const QString &type, const QString &subtype) return ret; } -ut64 IaitoRCore::math(const QString &expr) +ut64 CutterCore::math(const QString &expr) { CORE_LOCK(); return r_num_math(this->core_ ? this->core_->num : NULL, expr.toUtf8().constData()); } -int IaitoRCore::fcnCyclomaticComplexity(ut64 addr) +int CutterCore::fcnCyclomaticComplexity(ut64 addr) { CORE_LOCK(); RAnalFunction *fcn = r_anal_get_fcn_at(core_->anal, addr, addr); @@ -452,7 +452,7 @@ int IaitoRCore::fcnCyclomaticComplexity(ut64 addr) return 0; } -int IaitoRCore::fcnBasicBlockCount(ut64 addr) +int CutterCore::fcnBasicBlockCount(ut64 addr) { CORE_LOCK(); //RAnalFunction *fcn = r_anal_get_fcn_at (core_->anal, addr, addr); @@ -464,7 +464,7 @@ int IaitoRCore::fcnBasicBlockCount(ut64 addr) return 0; } -int IaitoRCore::fcnEndBbs(RVA addr) +int CutterCore::fcnEndBbs(RVA addr) { CORE_LOCK(); RAnalFunction *fcn = r_anal_get_fcn_in(core_->anal, addr, 0); @@ -481,12 +481,12 @@ int IaitoRCore::fcnEndBbs(RVA addr) return 0; } -QString IaitoRCore::itoa(ut64 num, int rdx) +QString CutterCore::itoa(ut64 num, int rdx) { return QString::number(num, rdx); } -QString IaitoRCore::config(const QString &k, const QString &v) +QString CutterCore::config(const QString &k, const QString &v) { CORE_LOCK(); QByteArray key = k.toUtf8(); @@ -498,7 +498,7 @@ QString IaitoRCore::config(const QString &k, const QString &v) return QString(r_config_get(core_->config, key.constData())); } -int IaitoRCore::config(const QString &k, int v) +int CutterCore::config(const QString &k, int v) { CORE_LOCK(); QByteArray key = k.toUtf8(); @@ -510,23 +510,23 @@ int IaitoRCore::config(const QString &k, int v) return r_config_get_i(core_->config, key.constData()); } -int IaitoRCore::getConfigi(const QString &k) +int CutterCore::getConfigi(const QString &k) { CORE_LOCK(); QByteArray key = k.toUtf8(); return r_config_get_i(core_->config, key.constData()); } -QString IaitoRCore::getConfig(const QString &k) +QString CutterCore::getConfig(const QString &k) { CORE_LOCK(); QByteArray key = k.toUtf8(); return QString(r_config_get(core_->config, key.constData())); } -void IaitoRCore::setOptions(QString key) +void CutterCore::setOptions(QString key) { - IAITONOTUSED(key); + CUTTERNOTUSED(key); // va // lowercase @@ -537,7 +537,7 @@ void IaitoRCore::setOptions(QString key) // anal plugin } -void IaitoRCore::setCPU(QString arch, QString cpu, int bits, bool temporary) +void CutterCore::setCPU(QString arch, QString cpu, int bits, bool temporary) { config("asm.arch", arch); config("asm.cpu", cpu); @@ -550,7 +550,7 @@ void IaitoRCore::setCPU(QString arch, QString cpu, int bits, bool temporary) } } -void IaitoRCore::setDefaultCPU() +void CutterCore::setDefaultCPU() { if (!default_arch.isEmpty()) config("asm.arch", default_arch); @@ -560,7 +560,7 @@ void IaitoRCore::setDefaultCPU() config("asm.bits", QString::number(default_bits)); } -QString IaitoRCore::assemble(const QString &code) +QString CutterCore::assemble(const QString &code) { CORE_LOCK(); RAsmCode *ac = r_asm_massemble(core_->assembler, code.toUtf8().constData()); @@ -569,7 +569,7 @@ QString IaitoRCore::assemble(const QString &code) return hex; } -QString IaitoRCore::disassemble(const QString &hex) +QString CutterCore::disassemble(const QString &hex) { CORE_LOCK(); RAsmCode *ac = r_asm_mdisassemble_hexstr(core_->assembler, hex.toUtf8().constData()); @@ -578,19 +578,19 @@ QString IaitoRCore::disassemble(const QString &hex) return code; } -QString IaitoRCore::disassembleSingleInstruction(RVA addr) +QString CutterCore::disassembleSingleInstruction(RVA addr) { return cmd("pi 1@" + QString::number(addr)).simplified(); } -RAnalFunction *IaitoRCore::functionAt(ut64 addr) +RAnalFunction *CutterCore::functionAt(ut64 addr) { CORE_LOCK(); //return r_anal_fcn_find (core_->anal, addr, addr); return r_anal_get_fcn_in(core_->anal, addr, 0); } -QString IaitoRCore::cmdFunctionAt(QString addr) +QString CutterCore::cmdFunctionAt(QString addr) { QString ret; //afi~name:1[1] @ 0x08048e44 @@ -599,12 +599,12 @@ QString IaitoRCore::cmdFunctionAt(QString addr) return ret.trimmed(); } -QString IaitoRCore::cmdFunctionAt(RVA addr) +QString CutterCore::cmdFunctionAt(RVA addr) { return cmdFunctionAt(QString::number(addr)); } -int IaitoRCore::get_size() +int CutterCore::get_size() { CORE_LOCK(); RBinObject *obj = r_bin_get_object(core_->bin); @@ -612,14 +612,14 @@ int IaitoRCore::get_size() return obj != nullptr ? obj->obj_size : 0; } -ulong IaitoRCore::get_baddr() +ulong CutterCore::get_baddr() { CORE_LOCK(); ulong baddr = r_bin_get_baddr(core_->bin); return baddr; } -QList> IaitoRCore::get_exec_sections() +QList> CutterCore::get_exec_sections() { QList> ret; @@ -642,29 +642,29 @@ QList> IaitoRCore::get_exec_sections() return ret; } -QString IaitoRCore::getOffsetInfo(QString addr) +QString CutterCore::getOffsetInfo(QString addr) { return cmd("ao @ " + addr); } -QString IaitoRCore::getOffsetJump(QString addr) +QString CutterCore::getOffsetJump(QString addr) { QString ret = cmd("ao @" + addr + "~jump[1]"); return ret; } -QString IaitoRCore::getDecompiledCode(QString addr) +QString CutterCore::getDecompiledCode(QString addr) { return cmd("pdc @ " + addr); } -QString IaitoRCore::getFileInfo() +QString CutterCore::getFileInfo() { QString info = cmd("ij"); return info; } -QStringList IaitoRCore::getStats() +QStringList CutterCore::getStats() { QStringList stats; cmd("fs functions"); @@ -687,7 +687,7 @@ QStringList IaitoRCore::getStats() return stats; } -QString IaitoRCore::getSimpleGraph(QString function) +QString CutterCore::getSimpleGraph(QString function) { // New styles QString graph = "graph [bgcolor=invis, splines=polyline];"; @@ -709,7 +709,7 @@ QString IaitoRCore::getSimpleGraph(QString function) return dot; } -void IaitoRCore::getOpcodes() +void CutterCore::getOpcodes() { QString opcodes = cmd("?O"); this->opcodes = opcodes.split("\n"); @@ -720,7 +720,7 @@ void IaitoRCore::getOpcodes() this->regs.removeLast(); } -void IaitoRCore::setSettings() +void CutterCore::setSettings() { config("scr.color", "false"); config("scr.interactive", "false"); @@ -787,7 +787,7 @@ void IaitoRCore::setSettings() -QList IaitoRCore::getSeekHistory() +QList CutterCore::getSeekHistory() { CORE_LOCK(); QList ret; @@ -801,7 +801,7 @@ QList IaitoRCore::getSeekHistory() -QStringList IaitoRCore::getAsmPluginNames() +QStringList CutterCore::getAsmPluginNames() { CORE_LOCK(); RListIter *it; @@ -816,7 +816,7 @@ QStringList IaitoRCore::getAsmPluginNames() return ret; } -QStringList IaitoRCore::getAnalPluginNames() +QStringList CutterCore::getAnalPluginNames() { CORE_LOCK(); RListIter *it; @@ -832,7 +832,7 @@ QStringList IaitoRCore::getAnalPluginNames() } -QStringList IaitoRCore::getProjectNames() +QStringList CutterCore::getProjectNames() { CORE_LOCK(); QStringList ret; @@ -846,7 +846,7 @@ QStringList IaitoRCore::getProjectNames() -QList IaitoRCore::getAllFunctions() +QList CutterCore::getAllFunctions() { CORE_LOCK(); QList ret; @@ -870,7 +870,7 @@ QList IaitoRCore::getAllFunctions() } -QList IaitoRCore::getAllImports() +QList CutterCore::getAllImports() { CORE_LOCK(); QList ret; @@ -897,7 +897,7 @@ QList IaitoRCore::getAllImports() -QList IaitoRCore::getAllExports() +QList CutterCore::getAllExports() { CORE_LOCK(); QList ret; @@ -924,7 +924,7 @@ QList IaitoRCore::getAllExports() } -QList IaitoRCore::getAllSymbols() +QList CutterCore::getAllSymbols() { CORE_LOCK(); RListIter *it; @@ -963,7 +963,7 @@ QList IaitoRCore::getAllSymbols() } -QList IaitoRCore::getAllComments(const QString &filterType) +QList CutterCore::getAllComments(const QString &filterType) { CORE_LOCK(); QList ret; @@ -986,7 +986,7 @@ QList IaitoRCore::getAllComments(const QString &filterType) return ret; } -QList IaitoRCore::getAllRelocs() +QList CutterCore::getAllRelocs() { CORE_LOCK(); RListIter *it; @@ -1015,7 +1015,7 @@ QList IaitoRCore::getAllRelocs() return ret; } -QList IaitoRCore::getAllStrings() +QList CutterCore::getAllStrings() { CORE_LOCK(); RListIter *it; @@ -1037,7 +1037,7 @@ QList IaitoRCore::getAllStrings() } -QList IaitoRCore::getAllFlagspaces() +QList CutterCore::getAllFlagspaces() { CORE_LOCK(); QList ret; @@ -1056,7 +1056,7 @@ QList IaitoRCore::getAllFlagspaces() } -QList IaitoRCore::getAllFlags(QString flagspace) +QList CutterCore::getAllFlags(QString flagspace) { CORE_LOCK(); QList ret; @@ -1082,7 +1082,7 @@ QList IaitoRCore::getAllFlags(QString flagspace) } -QList IaitoRCore::getAllSections() +QList CutterCore::getAllSections() { CORE_LOCK(); QList ret; @@ -1110,7 +1110,7 @@ QList IaitoRCore::getAllSections() } -QList IaitoRCore::getAllEntrypoint() +QList CutterCore::getAllEntrypoint() { CORE_LOCK(); QList ret; @@ -1133,7 +1133,7 @@ QList IaitoRCore::getAllEntrypoint() return ret; } -QList IaitoRCore::getXRefs(RVA addr, bool to, bool whole_function, const QString &filterType) +QList CutterCore::getXRefs(RVA addr, bool to, bool whole_function, const QString &filterType) { QList ret = QList(); @@ -1170,7 +1170,7 @@ QList IaitoRCore::getXRefs(RVA addr, bool to, bool whole_functi return ret; } -void IaitoRCore::addFlag(RVA offset, QString name, RVA size) +void CutterCore::addFlag(RVA offset, QString name, RVA size) { name = sanitizeStringForCommand(name); cmd(QString("f %1 %2 @ %3").arg(name).arg(size).arg(offset)); diff --git a/src/iaitorcore.h b/src/cutter.h similarity index 95% rename from src/iaitorcore.h rename to src/cutter.h index 06e51995..b4de9449 100644 --- a/src/iaitorcore.h +++ b/src/cutter.h @@ -1,5 +1,5 @@ -#ifndef IAITORCORE_H -#define IAITORCORE_H +#ifndef CUTTER_H +#define CUTTER_H #include #include @@ -28,6 +28,8 @@ #define __alert(x) QMessageBox::question (this, "Alert", QString(x), QMessageBox::Ok) #define __question(x) (QMessageBox::Yes==QMessageBox::question (this, "Alert", QString(x), QMessageBox::Yes| QMessageBox::No)) +#define APPNAME "Cutter" + class RCoreLocked { RCore *core; @@ -42,7 +44,7 @@ public: RCore *operator->() const; }; -#define IAITONOTUSED(x) do { (void)(x); } while ( 0 ); +#define CUTTERNOTUSED(x) do { (void)(x); } while ( 0 ); typedef ut64 RVA; @@ -165,17 +167,17 @@ Q_DECLARE_METATYPE(FlagDescription) Q_DECLARE_METATYPE(XrefDescription) Q_DECLARE_METATYPE(EntrypointDescription) -class IaitoRCore : public QObject +class CutterCore: public QObject { Q_OBJECT public: QString projectPath; - explicit IaitoRCore(QObject *parent = 0); - ~IaitoRCore(); + explicit CutterCore(QObject *parent = 0); + ~CutterCore(); - RVA getOffset() const { return core_->offset; } + RVA getOffset() const { return core_->offset; } static QString sanitizeStringForCommand(QString s); int getCycloComplex(ut64 addr); int getFcnSize(ut64 addr); @@ -276,4 +278,4 @@ private: RCore *core_; }; -#endif // IAITORCORE_H +#endif // CUTTER_H diff --git a/src/iaito.pro b/src/cutter.pro similarity index 97% rename from src/iaito.pro rename to src/cutter.pro index 940df23b..a1808908 100644 --- a/src/iaito.pro +++ b/src/cutter.pro @@ -1,6 +1,6 @@ TEMPLATE = app -TARGET = iaito +TARGET = cutter # The application version win32 { @@ -39,7 +39,7 @@ SOURCES += \ newfiledialog.cpp \ optionsdialog.cpp \ highlighter.cpp \ - qrcore.cpp \ + cutter.cpp \ createnewdialog.cpp \ hexascii_highlighter.cpp \ widgets/pieview.cpp \ @@ -58,7 +58,6 @@ SOURCES += \ widgets/flagswidget.cpp \ widgets/memorywidget.cpp \ widgets/exportswidget.cpp \ - qrdisasm.cpp \ widgets/sdbdock.cpp \ analthread.cpp \ dialogs/commentsdialog.cpp \ @@ -112,8 +111,7 @@ HEADERS += \ radarewebserver.h \ settings.h \ widgets/entrypointwidget.h \ - iaitorcore.h \ - iaitordisasm.h \ + cutter.h \ dialogs/flagdialog.h FORMS += \ mainwindow.ui \ @@ -145,7 +143,7 @@ FORMS += \ RESOURCES += \ resources.qrc -DISTFILES += iaito.astylerc +DISTFILES += cutter.astylerc include(lib_radare2.pri) diff --git a/src/dialogs/aboutdialog.cpp b/src/dialogs/aboutdialog.cpp index 339dc6cb..33fb37ec 100644 --- a/src/dialogs/aboutdialog.cpp +++ b/src/dialogs/aboutdialog.cpp @@ -8,7 +8,7 @@ AboutDialog::AboutDialog(QWidget *parent) : { ui->setupUi(this); setWindowFlags(windowFlags() & (~Qt::WindowContextHelpButtonHint)); - ui->label->setText(tr("

Iaito

" + ui->label->setText(tr("

Cutter

" "Version 1.0 alpha
" "Using r2-" R2_GITTAP "

License

" diff --git a/src/dialogs/flagdialog.cpp b/src/dialogs/flagdialog.cpp index 4febaeef..9e341e08 100644 --- a/src/dialogs/flagdialog.cpp +++ b/src/dialogs/flagdialog.cpp @@ -1,8 +1,7 @@ - #include "ui_flagdialog.h" #include "flagdialog.h" -FlagDialog::FlagDialog(IaitoRCore *core, RVA offset, QWidget *parent) : +FlagDialog::FlagDialog(CutterCore *core, RVA offset, QWidget *parent) : QDialog(parent), ui(new Ui::FlagDialog) { @@ -32,4 +31,4 @@ void FlagDialog::on_buttonBox_accepted() void FlagDialog::on_buttonBox_rejected() { close(); -} \ No newline at end of file +} diff --git a/src/dialogs/flagdialog.h b/src/dialogs/flagdialog.h index fc929ecc..cc68fa40 100644 --- a/src/dialogs/flagdialog.h +++ b/src/dialogs/flagdialog.h @@ -2,7 +2,7 @@ #define FLAGDIALOG_H #include -#include +#include "cutter.h" namespace Ui { @@ -14,7 +14,7 @@ class FlagDialog : public QDialog Q_OBJECT public: - explicit FlagDialog(IaitoRCore *core, RVA offset, QWidget *parent = 0); + explicit FlagDialog(CutterCore *core, RVA offset, QWidget *parent = 0); ~FlagDialog(); private slots: @@ -24,7 +24,7 @@ private slots: private: Ui::FlagDialog *ui; - IaitoRCore *core; + CutterCore *core; RVA offset; }; diff --git a/src/dialogs/xrefsdialog.cpp b/src/dialogs/xrefsdialog.cpp index 11f2c3ec..318ab4bd 100644 --- a/src/dialogs/xrefsdialog.cpp +++ b/src/dialogs/xrefsdialog.cpp @@ -80,7 +80,7 @@ void XrefsDialog::fillRefs(QList refs, QList x void XrefsDialog::on_fromTreeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column) { - IAITONOTUSED(column); + CUTTERNOTUSED(column); XrefDescription xref = item->data(0, Qt::UserRole).value(); RAnalFunction *fcn = this->main->core->functionAt(xref.to); @@ -91,7 +91,7 @@ void XrefsDialog::on_fromTreeWidget_itemDoubleClicked(QTreeWidgetItem *item, int void XrefsDialog::on_toTreeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column) { - IAITONOTUSED(column); + CUTTERNOTUSED(column); XrefDescription xref = item->data(0, Qt::UserRole).value(); RAnalFunction *fcn = this->main->core->functionAt(xref.from); diff --git a/src/dialogs/xrefsdialog.h b/src/dialogs/xrefsdialog.h index 3859d703..9a931539 100644 --- a/src/dialogs/xrefsdialog.h +++ b/src/dialogs/xrefsdialog.h @@ -1,11 +1,10 @@ #ifndef XREFSDIALOG_H #define XREFSDIALOG_H -#include "highlighter.h" -#include "iaitorcore.h" - #include #include +#include "highlighter.h" +#include "cutter.h" class MainWindow; diff --git a/src/iaitordisasm.h b/src/iaitordisasm.h deleted file mode 100644 index 5b5bdde8..00000000 --- a/src/iaitordisasm.h +++ /dev/null @@ -1,76 +0,0 @@ -#ifndef IAITORDISASM_H -#define IAITORDISASM_H - -#include - -enum IaitoRDisasmDataType -{ - STRING = 'z', - STRUCT = 's', - DATA = 'd', - -}; - -enum IaitoRDisasmOption -{ - DWARF = 1 << 1, - REFS = 1 << 2, - ESIL = 1 << 3, - HEXPAIRS = 1 << 4, - COMMENT = 1 << 5, -}; - -class IaitoRDisasmRow -{ -private: - IaitoRCore *core; -public: - ut64 vaddr; - ut64 paddr; - int size; - QString hex; - - // Context - // list of flags - // closer function - RFlagItem *flag; - RAnalFunction *fcn; - - // Contents - - // if instruction - int optype; // jmp, cjmp, ... // aka RAnalOp - QString mnemonic; - QString arg[3]; // each argument splitted here - QString disasm; - QString esil; - - // if data - IaitoRDisasmDataType datatype; - QString dataopt; // struct name, aliased name, string, etc - // data type - // string/struct/hex/word - - // Comment - QString comment; - QString description; - // References - // refs - // xrefs -}; - - -class IaitoRDisasm -{ - IaitoRCore *core; - Sdb *db; -public: - explicit IaitoRDisasm(IaitoRCore *core); - bool disassembleAt(ut64 addr, IaitoRDisasmOption opt, IaitoRDisasmRow &dr); - // high level api for the disasm thing to manage comments, xrefs, etc - //next(); - //prev(); - -}; - -#endif // IAITORDISASM_H diff --git a/src/main.cpp b/src/main.cpp index 4d7e473b..c5bdb166 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,18 +1,17 @@ - -#include "mainwindow.h" -#include "newfiledialog.h" -#include "optionsdialog.h" - #include #include #include #include +#include "mainwindow.h" +#include "newfiledialog.h" +#include "optionsdialog.h" + int main(int argc, char *argv[]) { QApplication a(argc, argv); - a.setOrganizationName("iaito"); - a.setApplicationName("iaito"); + a.setOrganizationName("cutter"); + a.setApplicationName("cutter"); a.setApplicationVersion(APP_VERSION); // Set QString codec to UTF-8 @@ -48,7 +47,7 @@ int main(int argc, char *argv[]) msg.setWindowIcon(QIcon(":/img/logo-small.png")); msg.setStandardButtons(QMessageBox::Yes | QMessageBox::No); msg.setWindowTitle(QObject::tr("Version mismatch!")); - msg.setText(QString(QObject::tr("The version used to compile iaito (%1) does not match the binary version of radare2 (%2). This could result in unexpected behaviour. Are you sure you want to continue?")).arg(localVersion, r2version)); + msg.setText(QString(QObject::tr("The version used to compile cutter (%1) does not match the binary version of radare2 (%2). This could result in unexpected behaviour. Are you sure you want to continue?")).arg(localVersion, r2version)); if (msg.exec() == QMessageBox::No) return 1; } diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 1e8a7dfd..8607afd9 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -34,7 +34,6 @@ #include #include - #include "highlighter.h" #include "hexascii_highlighter.h" #include "newfiledialog.h" @@ -83,7 +82,7 @@ static void registerCustomFonts() MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), - core(new IaitoRCore()), + core(new CutterCore()), memoryDock(nullptr), notepadDock(nullptr), asmDock(nullptr), @@ -495,12 +494,12 @@ void MainWindow::setFilename(const QString &fn) { // Add file name to window title this->filename = fn; - this->setWindowTitle("Iaito - " + fn); + this->setWindowTitle(APPNAME" - " + fn); } void MainWindow::closeEvent(QCloseEvent *event) { - QMessageBox::StandardButton ret = QMessageBox::question(this, "Iaito", + QMessageBox::StandardButton ret = QMessageBox::question(this, APPNAME, tr("Do you really want to exit?\nSave your project before closing!"), (QMessageBox::StandardButtons)(QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel)); //qDebug() << ret; @@ -1046,7 +1045,7 @@ void MainWindow::on_actionTabs_on_Top_triggered() void MainWindow::on_actionReset_settings_triggered() { QMessageBox::StandardButton ret = - (QMessageBox::StandardButton)QMessageBox::question(this, "Iaito", + (QMessageBox::StandardButton)QMessageBox::question(this, APPNAME, tr("Do you really want to clear all settings?"), QMessageBox::Ok | QMessageBox::Cancel); if (ret == QMessageBox::Ok) diff --git a/src/mainwindow.h b/src/mainwindow.h index cb0047d4..f63a8a40 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -1,13 +1,12 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H -#include "radarewebserver.h" -#include "iaitorcore.h" // only needed for ut64 - #include #include +#include "radarewebserver.h" +#include "cutter.h" // only needed for ut64 -class IaitoRCore; +class CutterCore; class DockWidget; class Omnibar; class MemoryWidget; @@ -45,7 +44,7 @@ class MainWindow : public QMainWindow Q_OBJECT public: - IaitoRCore *core; + CutterCore *core; MemoryWidget *memoryDock; Notepad *notepadDock; diff --git a/src/mainwindow.ui b/src/mainwindow.ui index 4131d371..b70b8455 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -17,7 +17,7 @@ - Iaito + Cutter diff --git a/src/newfiledialog.cpp b/src/newfiledialog.cpp index 7d3766ee..4a0b1156 100644 --- a/src/newfiledialog.cpp +++ b/src/newfiledialog.cpp @@ -12,7 +12,7 @@ const int NewFileDialog::MaxRecentFiles; static QColor getColorFor(QString str, int pos) { - IAITONOTUSED(str); + CUTTERNOTUSED(str); QList Colors; Colors << QColor(29, 188, 156); // Turquoise diff --git a/src/optionsdialog.h b/src/optionsdialog.h index 2fc6e7c8..2605c1ba 100644 --- a/src/optionsdialog.h +++ b/src/optionsdialog.h @@ -3,8 +3,7 @@ #include #include - -#include "iaitorcore.h" +#include "cutter.h" #include "analthread.h" class MainWindow; diff --git a/src/qrdisasm.cpp b/src/qrdisasm.cpp deleted file mode 100644 index 8941df4d..00000000 --- a/src/qrdisasm.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include "iaitordisasm.h" - -// This class is not used, created by pancake a long time ago. -// Kept here just because - -IaitoRDisasm::IaitoRDisasm(IaitoRCore *core) : - core(core), - db(nullptr) -{ -} - -bool IaitoRDisasm::disassembleAt(ut64 addr, IaitoRDisasmOption opt, IaitoRDisasmRow &dr) -{ - IAITONOTUSED(addr); - IAITONOTUSED(opt); - IAITONOTUSED(dr); - - printf("FUCK\n"); - return false; -} diff --git a/src/radarewebserver.cpp b/src/radarewebserver.cpp index c4e76fad..598735b1 100644 --- a/src/radarewebserver.cpp +++ b/src/radarewebserver.cpp @@ -1,11 +1,10 @@ -#include "radarewebserver.h" -#include "iaitorcore.h" #include #include #include +#include "cutter.h" +#include "radarewebserver.h" - -RadareWebServer::RadareWebServer(IaitoRCore *core) : +RadareWebServer::RadareWebServer(CutterCore *core) : core(core), started(false) { diff --git a/src/radarewebserver.h b/src/radarewebserver.h index 88540d7a..a10e0b43 100644 --- a/src/radarewebserver.h +++ b/src/radarewebserver.h @@ -4,13 +4,13 @@ #include #include -class IaitoRCore; +class CutterCore; class RadareWebServer { public: - explicit RadareWebServer(IaitoRCore *core); + explicit RadareWebServer(CutterCore *core); ~RadareWebServer(); void start(); @@ -19,7 +19,7 @@ public: bool isStarted() const; private: - IaitoRCore *core; + CutterCore *core; bool started; }; diff --git a/src/widgets/codegraphic.cpp b/src/widgets/codegraphic.cpp index fc62a204..6fd20ce2 100644 --- a/src/widgets/codegraphic.cpp +++ b/src/widgets/codegraphic.cpp @@ -14,7 +14,7 @@ GraphicsBar::GraphicsBar(MainWindow *main, QWidget *parent) : QToolBar(main) { - IAITONOTUSED(parent); + CUTTERNOTUSED(parent); setObjectName("codeGraphics"); setWindowTitle(tr("Code bar")); @@ -44,7 +44,7 @@ GraphicsBar::GraphicsBar(MainWindow *main, QWidget *parent) : void GraphicsBar::paintEvent(QPaintEvent *event) { - IAITONOTUSED(event); + CUTTERNOTUSED(event); QPainter painter(this); this->fillData(); diff --git a/src/widgets/commentswidget.cpp b/src/widgets/commentswidget.cpp index f73f978a..40d63a81 100644 --- a/src/widgets/commentswidget.cpp +++ b/src/widgets/commentswidget.cpp @@ -1,13 +1,11 @@ -#include "commentswidget.h" -#include "ui_commentswidget.h" - -#include "mainwindow.h" -#include "helpers.h" - #include #include #include +#include "commentswidget.h" +#include "ui_commentswidget.h" +#include "mainwindow.h" +#include "helpers.h" CommentsWidget::CommentsWidget(MainWindow *main, QWidget *parent) : DockWidget(parent), @@ -51,7 +49,7 @@ void CommentsWidget::refresh() void CommentsWidget::on_commentsTreeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column) { - IAITONOTUSED(column); + CUTTERNOTUSED(column); // Get offset and name of item double clicked CommentDescription comment = item->data(0, Qt::UserRole).value(); diff --git a/src/widgets/consolewidget.cpp b/src/widgets/consolewidget.cpp index b072abcc..61cfad4a 100644 --- a/src/widgets/consolewidget.cpp +++ b/src/widgets/consolewidget.cpp @@ -1,15 +1,13 @@ -#include "consolewidget.h" -#include "ui_consolewidget.h" - -#include "helpers.h" -#include "iaitorcore.h" - #include #include #include #include #include #include +#include "cutter.h" +#include "consolewidget.h" +#include "ui_consolewidget.h" +#include "helpers.h" // TODO: Find a way to get to this without copying it here @@ -92,7 +90,7 @@ static bool isForbidden(const QString &input) -ConsoleWidget::ConsoleWidget(IaitoRCore *core, QWidget *parent) : +ConsoleWidget::ConsoleWidget(CutterCore *core, QWidget *parent) : QWidget(parent), ui(new Ui::ConsoleWidget), core(core), diff --git a/src/widgets/consolewidget.h b/src/widgets/consolewidget.h index 0153866a..5ca22e8d 100644 --- a/src/widgets/consolewidget.h +++ b/src/widgets/consolewidget.h @@ -3,7 +3,7 @@ #include -class IaitoRCore; +class CutterCore; class QAction; @@ -18,7 +18,7 @@ class ConsoleWidget : public QWidget Q_OBJECT public: - explicit ConsoleWidget(IaitoRCore *core, QWidget *parent = 0); + explicit ConsoleWidget(CutterCore *core, QWidget *parent = 0); ~ConsoleWidget(); void addOutput(const QString &msg); @@ -51,7 +51,7 @@ private: void invalidateHistoryPosition(); Ui::ConsoleWidget *ui; - IaitoRCore *core; + CutterCore *core; QList actions; bool debugOutputEnabled; int maxHistoryEntries; diff --git a/src/widgets/exportswidget.cpp b/src/widgets/exportswidget.cpp index 2ae43763..2a0780d6 100644 --- a/src/widgets/exportswidget.cpp +++ b/src/widgets/exportswidget.cpp @@ -1,11 +1,8 @@ #include "exportswidget.h" #include "ui_exportswidget.h" - #include "mainwindow.h" #include "helpers.h" - - ExportsModel::ExportsModel(QList *exports, QObject *parent) : QAbstractListModel(parent), exports(exports) diff --git a/src/widgets/exportswidget.h b/src/widgets/exportswidget.h index 293bd275..412dd6bc 100644 --- a/src/widgets/exportswidget.h +++ b/src/widgets/exportswidget.h @@ -3,8 +3,7 @@ #include #include - -#include "iaitorcore.h" +#include "cutter.h" #include "dockwidget.h" class MainWindow; diff --git a/src/widgets/flagswidget.cpp b/src/widgets/flagswidget.cpp index d845c665..ac2ed285 100644 --- a/src/widgets/flagswidget.cpp +++ b/src/widgets/flagswidget.cpp @@ -1,14 +1,10 @@ -#include "flagswidget.h" -#include "ui_flagswidget.h" - -#include "mainwindow.h" -#include "helpers.h" - #include #include #include - - +#include "flagswidget.h" +#include "ui_flagswidget.h" +#include "mainwindow.h" +#include "helpers.h" FlagsModel::FlagsModel(QList *flags, QObject *parent) : QAbstractListModel(parent), @@ -169,7 +165,7 @@ void FlagsWidget::on_flagsTreeView_doubleClicked(const QModelIndex &index) void FlagsWidget::on_flagspaceCombo_currentTextChanged(const QString &arg1) { - IAITONOTUSED(arg1); + CUTTERNOTUSED(arg1); refreshFlags(); } diff --git a/src/widgets/flagswidget.h b/src/widgets/flagswidget.h index 956a1eab..f869143f 100644 --- a/src/widgets/flagswidget.h +++ b/src/widgets/flagswidget.h @@ -1,11 +1,10 @@ #ifndef FLAGSWIDGET_H #define FLAGSWIDGET_H -#include "iaitorcore.h" -#include "dockwidget.h" #include #include - +#include "cutter.h" +#include "dockwidget.h" class MainWindow; class QTreeWidgetItem; diff --git a/src/widgets/functionswidget.h b/src/widgets/functionswidget.h index 78d8a225..c293b2ea 100644 --- a/src/widgets/functionswidget.h +++ b/src/widgets/functionswidget.h @@ -1,11 +1,10 @@ #ifndef FUNCTIONSWIDGET_H #define FUNCTIONSWIDGET_H -#include "dockwidget.h" -#include "iaitorcore.h" - #include #include +#include "cutter.h" +#include "dockwidget.h" class MainWindow; class QTreeWidgetItem; diff --git a/src/widgets/memorywidget.h b/src/widgets/memorywidget.h index 24b0929b..95efc9ea 100644 --- a/src/widgets/memorywidget.h +++ b/src/widgets/memorywidget.h @@ -1,11 +1,6 @@ #ifndef MEMORYWIDGET_H #define MEMORYWIDGET_H -#include "iaitorcore.h" -#include "highlighter.h" -#include "hexascii_highlighter.h" -#include "hexhighlighter.h" - #include #include #include @@ -15,7 +10,10 @@ #include #include #include - +#include "cutter.h" +#include "highlighter.h" +#include "hexascii_highlighter.h" +#include "hexhighlighter.h" #include "dashboard.h" class MainWindow; diff --git a/src/widgets/notepad.cpp b/src/widgets/notepad.cpp index c8619d29..d78ee24b 100644 --- a/src/widgets/notepad.cpp +++ b/src/widgets/notepad.cpp @@ -225,7 +225,7 @@ void Notepad::on_searchEdit_returnPressed() void Notepad::on_searchEdit_textEdited(const QString &arg1) { - IAITONOTUSED(arg1); + CUTTERNOTUSED(arg1); QString searchString = ui->searchEdit->text(); QTextDocument *document = ui->notepadTextEdit->document(); @@ -264,7 +264,7 @@ void Notepad::on_searchEdit_textEdited(const QString &arg1) void Notepad::on_searchEdit_textChanged(const QString &arg1) { - IAITONOTUSED(arg1); + CUTTERNOTUSED(arg1); QString searchString = ui->searchEdit->text(); QTextDocument *document = ui->notepadTextEdit->document(); diff --git a/src/widgets/pieview.cpp b/src/widgets/pieview.cpp index 3f064618..7bb10bc8 100644 --- a/src/widgets/pieview.cpp +++ b/src/widgets/pieview.cpp @@ -46,7 +46,7 @@ #define M_PI 3.1415927 #endif -#include "iaitorcore.h" +#include "cutter.h" #include "pieview.h" PieView::PieView(QWidget *parent) @@ -486,7 +486,7 @@ void PieView::scrollTo(const QModelIndex &index, ScrollHint) void PieView::setSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command) { - IAITONOTUSED(command); + CUTTERNOTUSED(command); // Use content widget coordinates because we will use the itemRegion() // function to check for intersections. diff --git a/src/widgets/relocswidget.cpp b/src/widgets/relocswidget.cpp index 6cf450d8..8dbb6b86 100644 --- a/src/widgets/relocswidget.cpp +++ b/src/widgets/relocswidget.cpp @@ -1,12 +1,9 @@ +#include #include "relocswidget.h" #include "ui_relocswidget.h" - #include "mainwindow.h" #include "helpers.h" -#include - - RelocsWidget::RelocsWidget(MainWindow *main, QWidget *parent) : DockWidget(parent), ui(new Ui::RelocsWidget), @@ -39,7 +36,7 @@ void RelocsWidget::refresh() void RelocsWidget::on_relocsTreeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column) { - IAITONOTUSED(column); + CUTTERNOTUSED(column); // Get offset and name of item double clicked RelocDescription reloc = item->data(0, Qt::UserRole).value(); diff --git a/src/widgets/sectionswidget.cpp b/src/widgets/sectionswidget.cpp index cd19aed0..4b10db69 100644 --- a/src/widgets/sectionswidget.cpp +++ b/src/widgets/sectionswidget.cpp @@ -11,7 +11,7 @@ SectionsWidget::SectionsWidget(MainWindow *main, QWidget *parent) : QSplitter(main), main(main) { - IAITONOTUSED(parent); + CUTTERNOTUSED(parent); setupViews(); setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); diff --git a/src/widgets/stringswidget.cpp b/src/widgets/stringswidget.cpp index edcfdde7..d84bc618 100644 --- a/src/widgets/stringswidget.cpp +++ b/src/widgets/stringswidget.cpp @@ -1,13 +1,11 @@ +#include +#include #include "stringswidget.h" #include "ui_stringswidget.h" -//#include "dialogs/xrefsdialog.h" #include "mainwindow.h" #include "helpers.h" -#include -#include - StringsWidget::StringsWidget(MainWindow *main, QWidget *parent) : DockWidget(parent), @@ -38,7 +36,7 @@ void StringsWidget::refresh() void StringsWidget::on_stringsTreeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column) { - IAITONOTUSED(column); + CUTTERNOTUSED(column); // Get offset and name of item double clicked // TODO: use this info to change disasm contents diff --git a/src/widgets/symbolswidget.cpp b/src/widgets/symbolswidget.cpp index 8a5c738a..b78e287b 100644 --- a/src/widgets/symbolswidget.cpp +++ b/src/widgets/symbolswidget.cpp @@ -36,7 +36,7 @@ void SymbolsWidget::refresh() void SymbolsWidget::on_symbolsTreeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column) { - IAITONOTUSED(column); + CUTTERNOTUSED(column); // Get offset and name of item double clicked SymbolDescription symbol = item->data(0, Qt::UserRole).value();