Renamed Iaito to Cutter

This commit is contained in:
xarkes 2017-09-25 14:55:41 +02:00
parent e9f9add9b0
commit 821602eabd
39 changed files with 191 additions and 321 deletions

View File

@ -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

View File

@ -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})

View File

@ -1,6 +1,6 @@
#include "analthread.h"
#include "iaitorcore.h"
#include <QDebug>
#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<QString> advanced)
void AnalThread::start(CutterCore *core, int level, QList<QString> advanced)
{
this->core = core;
this->level = level;

View File

@ -3,7 +3,7 @@
#include <QThread>
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<QString> advanced);
void start(CutterCore *core, int level, QList<QString> advanced);
protected:
void run();
@ -20,7 +20,7 @@ protected:
using QThread::start;
private:
IaitoRCore *core;
CutterCore *core;
int level;
QList<QString> advanced;
};

BIN
src/cutter Executable file

Binary file not shown.

View File

@ -1,8 +1,8 @@
#include "iaitorcore.h"
#include "sdb.h"
#include <QJsonArray>
#include <QJsonObject>
#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<QString> IaitoRCore::sdbList(QString path)
QList<QString> CutterCore::sdbList(QString path)
{
CORE_LOCK();
QList<QString> list = QList<QString>();
@ -121,7 +121,7 @@ QList<QString> IaitoRCore::sdbList(QString path)
return list;
}
QList<QString> IaitoRCore::sdbListKeys(QString path)
QList<QString> CutterCore::sdbListKeys(QString path)
{
CORE_LOCK();
QList<QString> list = QList<QString>();
@ -140,7 +140,7 @@ QList<QString> 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<QString> advanced)
void CutterCore::analyze(int level, QList<QString> advanced)
{
CORE_LOCK();
/*
@ -317,13 +317,13 @@ void IaitoRCore::analyze(int level, QList<QString> 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<QString, QList<QList<QString>>> IaitoRCore::getNestedComments()
QMap<QString, QList<QList<QString>>> CutterCore::getNestedComments()
{
QMap<QString, QList<QList<QString>>> ret;
QString comments = cmd("CC~CCu");
@ -358,7 +358,7 @@ QMap<QString, QList<QList<QString>>> 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<QString> IaitoRCore::getList(const QString &type, const QString &subtype)
QList<QString> CutterCore::getList(const QString &type, const QString &subtype)
{
CORE_LOCK();
QList<QString> ret = QList<QString>();
@ -437,13 +437,13 @@ QList<QString> 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<QList<QString>> IaitoRCore::get_exec_sections()
QList<QList<QString>> CutterCore::get_exec_sections()
{
QList<QList<QString>> ret;
@ -642,29 +642,29 @@ QList<QList<QString>> 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<RVA> IaitoRCore::getSeekHistory()
QList<RVA> CutterCore::getSeekHistory()
{
CORE_LOCK();
QList<RVA> ret;
@ -801,7 +801,7 @@ QList<RVA> 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<FunctionDescription> IaitoRCore::getAllFunctions()
QList<FunctionDescription> CutterCore::getAllFunctions()
{
CORE_LOCK();
QList<FunctionDescription> ret;
@ -870,7 +870,7 @@ QList<FunctionDescription> IaitoRCore::getAllFunctions()
}
QList<ImportDescription> IaitoRCore::getAllImports()
QList<ImportDescription> CutterCore::getAllImports()
{
CORE_LOCK();
QList<ImportDescription> ret;
@ -897,7 +897,7 @@ QList<ImportDescription> IaitoRCore::getAllImports()
QList<ExportDescription> IaitoRCore::getAllExports()
QList<ExportDescription> CutterCore::getAllExports()
{
CORE_LOCK();
QList<ExportDescription> ret;
@ -924,7 +924,7 @@ QList<ExportDescription> IaitoRCore::getAllExports()
}
QList<SymbolDescription> IaitoRCore::getAllSymbols()
QList<SymbolDescription> CutterCore::getAllSymbols()
{
CORE_LOCK();
RListIter *it;
@ -963,7 +963,7 @@ QList<SymbolDescription> IaitoRCore::getAllSymbols()
}
QList<CommentDescription> IaitoRCore::getAllComments(const QString &filterType)
QList<CommentDescription> CutterCore::getAllComments(const QString &filterType)
{
CORE_LOCK();
QList<CommentDescription> ret;
@ -986,7 +986,7 @@ QList<CommentDescription> IaitoRCore::getAllComments(const QString &filterType)
return ret;
}
QList<RelocDescription> IaitoRCore::getAllRelocs()
QList<RelocDescription> CutterCore::getAllRelocs()
{
CORE_LOCK();
RListIter *it;
@ -1015,7 +1015,7 @@ QList<RelocDescription> IaitoRCore::getAllRelocs()
return ret;
}
QList<StringDescription> IaitoRCore::getAllStrings()
QList<StringDescription> CutterCore::getAllStrings()
{
CORE_LOCK();
RListIter *it;
@ -1037,7 +1037,7 @@ QList<StringDescription> IaitoRCore::getAllStrings()
}
QList<FlagspaceDescription> IaitoRCore::getAllFlagspaces()
QList<FlagspaceDescription> CutterCore::getAllFlagspaces()
{
CORE_LOCK();
QList<FlagspaceDescription> ret;
@ -1056,7 +1056,7 @@ QList<FlagspaceDescription> IaitoRCore::getAllFlagspaces()
}
QList<FlagDescription> IaitoRCore::getAllFlags(QString flagspace)
QList<FlagDescription> CutterCore::getAllFlags(QString flagspace)
{
CORE_LOCK();
QList<FlagDescription> ret;
@ -1082,7 +1082,7 @@ QList<FlagDescription> IaitoRCore::getAllFlags(QString flagspace)
}
QList<SectionDescription> IaitoRCore::getAllSections()
QList<SectionDescription> CutterCore::getAllSections()
{
CORE_LOCK();
QList<SectionDescription> ret;
@ -1110,7 +1110,7 @@ QList<SectionDescription> IaitoRCore::getAllSections()
}
QList<EntrypointDescription> IaitoRCore::getAllEntrypoint()
QList<EntrypointDescription> CutterCore::getAllEntrypoint()
{
CORE_LOCK();
QList<EntrypointDescription> ret;
@ -1133,7 +1133,7 @@ QList<EntrypointDescription> IaitoRCore::getAllEntrypoint()
return ret;
}
QList<XrefDescription> IaitoRCore::getXRefs(RVA addr, bool to, bool whole_function, const QString &filterType)
QList<XrefDescription> CutterCore::getXRefs(RVA addr, bool to, bool whole_function, const QString &filterType)
{
QList<XrefDescription> ret = QList<XrefDescription>();
@ -1170,7 +1170,7 @@ QList<XrefDescription> 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));

View File

@ -1,5 +1,5 @@
#ifndef IAITORCORE_H
#define IAITORCORE_H
#ifndef CUTTER_H
#define CUTTER_H
#include <QMap>
#include <QDebug>
@ -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

View File

@ -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)

View File

@ -8,7 +8,7 @@ AboutDialog::AboutDialog(QWidget *parent) :
{
ui->setupUi(this);
setWindowFlags(windowFlags() & (~Qt::WindowContextHelpButtonHint));
ui->label->setText(tr("<h1>Iaito</h1>"
ui->label->setText(tr("<h1>Cutter</h1>"
"Version 1.0 alpha<br />"
"Using r2-" R2_GITTAP
"<h2>License</h2>"

View File

@ -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();
}
}

View File

@ -2,7 +2,7 @@
#define FLAGDIALOG_H
#include <QDialog>
#include <iaitorcore.h>
#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;
};

View File

@ -80,7 +80,7 @@ void XrefsDialog::fillRefs(QList<XrefDescription> refs, QList<XrefDescription> x
void XrefsDialog::on_fromTreeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column)
{
IAITONOTUSED(column);
CUTTERNOTUSED(column);
XrefDescription xref = item->data(0, Qt::UserRole).value<XrefDescription>();
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<XrefDescription>();
RAnalFunction *fcn = this->main->core->functionAt(xref.from);

View File

@ -1,11 +1,10 @@
#ifndef XREFSDIALOG_H
#define XREFSDIALOG_H
#include "highlighter.h"
#include "iaitorcore.h"
#include <QDialog>
#include <QTreeWidgetItem>
#include "highlighter.h"
#include "cutter.h"
class MainWindow;

View File

@ -1,76 +0,0 @@
#ifndef IAITORDISASM_H
#define IAITORDISASM_H
#include <iaitorcore.h>
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

View File

@ -1,18 +1,17 @@
#include "mainwindow.h"
#include "newfiledialog.h"
#include "optionsdialog.h"
#include <QApplication>
#include <QCommandLineParser>
#include <QTextCodec>
#include <QMessageBox>
#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;
}

View File

@ -34,7 +34,6 @@
#include <QToolTip>
#include <QTreeWidgetItem>
#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)

View File

@ -1,13 +1,12 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "radarewebserver.h"
#include "iaitorcore.h" // only needed for ut64
#include <QMainWindow>
#include <QList>
#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;

View File

@ -17,7 +17,7 @@
</sizepolicy>
</property>
<property name="windowTitle">
<string notr="true">Iaito</string>
<string notr="true">Cutter</string>
</property>
<property name="windowIcon">
<iconset resource="resources.qrc">

View File

@ -12,7 +12,7 @@ const int NewFileDialog::MaxRecentFiles;
static QColor getColorFor(QString str, int pos)
{
IAITONOTUSED(str);
CUTTERNOTUSED(str);
QList<QColor> Colors;
Colors << QColor(29, 188, 156); // Turquoise

View File

@ -3,8 +3,7 @@
#include <QDialog>
#include <QStringList>
#include "iaitorcore.h"
#include "cutter.h"
#include "analthread.h"
class MainWindow;

View File

@ -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;
}

View File

@ -1,11 +1,10 @@
#include "radarewebserver.h"
#include "iaitorcore.h"
#include <QCoreApplication>
#include <QProcessEnvironment>
#include <cassert>
#include "cutter.h"
#include "radarewebserver.h"
RadareWebServer::RadareWebServer(IaitoRCore *core) :
RadareWebServer::RadareWebServer(CutterCore *core) :
core(core),
started(false)
{

View File

@ -4,13 +4,13 @@
#include <QThread>
#include <QMutex>
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;
};

View File

@ -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();

View File

@ -1,13 +1,11 @@
#include "commentswidget.h"
#include "ui_commentswidget.h"
#include "mainwindow.h"
#include "helpers.h"
#include <QTreeWidget>
#include <QMenu>
#include <QResizeEvent>
#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<CommentDescription>();

View File

@ -1,15 +1,13 @@
#include "consolewidget.h"
#include "ui_consolewidget.h"
#include "helpers.h"
#include "iaitorcore.h"
#include <QScrollBar>
#include <QMenu>
#include <QCompleter>
#include <QAction>
#include <QShortcut>
#include <QStringListModel>
#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),

View File

@ -3,7 +3,7 @@
#include <QWidget>
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<QAction *> actions;
bool debugOutputEnabled;
int maxHistoryEntries;

View File

@ -1,11 +1,8 @@
#include "exportswidget.h"
#include "ui_exportswidget.h"
#include "mainwindow.h"
#include "helpers.h"
ExportsModel::ExportsModel(QList<ExportDescription> *exports, QObject *parent)
: QAbstractListModel(parent),
exports(exports)

View File

@ -3,8 +3,7 @@
#include <QAbstractListModel>
#include <QSortFilterProxyModel>
#include "iaitorcore.h"
#include "cutter.h"
#include "dockwidget.h"
class MainWindow;

View File

@ -1,14 +1,10 @@
#include "flagswidget.h"
#include "ui_flagswidget.h"
#include "mainwindow.h"
#include "helpers.h"
#include <QDockWidget>
#include <QTreeWidget>
#include <QComboBox>
#include "flagswidget.h"
#include "ui_flagswidget.h"
#include "mainwindow.h"
#include "helpers.h"
FlagsModel::FlagsModel(QList<FlagDescription> *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();
}

View File

@ -1,11 +1,10 @@
#ifndef FLAGSWIDGET_H
#define FLAGSWIDGET_H
#include "iaitorcore.h"
#include "dockwidget.h"
#include <QAbstractItemModel>
#include <QSortFilterProxyModel>
#include "cutter.h"
#include "dockwidget.h"
class MainWindow;
class QTreeWidgetItem;

View File

@ -1,11 +1,10 @@
#ifndef FUNCTIONSWIDGET_H
#define FUNCTIONSWIDGET_H
#include "dockwidget.h"
#include "iaitorcore.h"
#include <QSortFilterProxyModel>
#include <QTreeView>
#include "cutter.h"
#include "dockwidget.h"
class MainWindow;
class QTreeWidgetItem;

View File

@ -1,11 +1,6 @@
#ifndef MEMORYWIDGET_H
#define MEMORYWIDGET_H
#include "iaitorcore.h"
#include "highlighter.h"
#include "hexascii_highlighter.h"
#include "hexhighlighter.h"
#include <QDebug>
#include <QTextEdit>
#include <QDockWidget>
@ -15,7 +10,10 @@
#include <QUrl>
#include <QPlainTextEdit>
#include <QMouseEvent>
#include "cutter.h"
#include "highlighter.h"
#include "hexascii_highlighter.h"
#include "hexhighlighter.h"
#include "dashboard.h"
class MainWindow;

View File

@ -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();

View File

@ -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.

View File

@ -1,12 +1,9 @@
#include <QTreeWidget>
#include "relocswidget.h"
#include "ui_relocswidget.h"
#include "mainwindow.h"
#include "helpers.h"
#include <QTreeWidget>
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<RelocDescription>();

View File

@ -11,7 +11,7 @@ SectionsWidget::SectionsWidget(MainWindow *main, QWidget *parent) :
QSplitter(main),
main(main)
{
IAITONOTUSED(parent);
CUTTERNOTUSED(parent);
setupViews();
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);

View File

@ -1,13 +1,11 @@
#include <QTreeWidget>
#include <QAbstractItemView>
#include "stringswidget.h"
#include "ui_stringswidget.h"
//#include "dialogs/xrefsdialog.h"
#include "mainwindow.h"
#include "helpers.h"
#include <QTreeWidget>
#include <QAbstractItemView>
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

View File

@ -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<SymbolDescription>();