diff --git a/dist/CMakeLists.txt b/dist/CMakeLists.txt index 822942fd..2fe5b671 100644 --- a/dist/CMakeLists.txt +++ b/dist/CMakeLists.txt @@ -7,7 +7,7 @@ unset(RZ_GHIDRA_PREFIX_PATH) if(WIN32) set(CPACK_GENERATOR "ZIP") - set(RIZIN_INSTALL_PLUGDIR "lib/plugins") + set(RIZIN_INSTALL_PLUGDIR "lib/rizin/plugins") if (CUTTER_PACKAGE_DEPENDENCIES) if (CUTTER_ENABLE_PYTHON) diff --git a/dist/bundle_jsdec.ps1 b/dist/bundle_jsdec.ps1 index 762d7b11..d6162346 100644 --- a/dist/bundle_jsdec.ps1 +++ b/dist/bundle_jsdec.ps1 @@ -5,12 +5,13 @@ if (-not (Test-Path -Path 'jsdec' -PathType Container)) { git clone https://github.com/rizinorg/jsdec.git --depth 1 --branch master } cd jsdec -& meson.exe --buildtype=release -Dc_args=-DDUK_USE_DATE_NOW_WINDOWS -Djsc_folder=".." --prefix=$dist p build +& meson.exe --buildtype=release -Dc_args=-DDUK_USE_DATE_NOW_WINDOWS -Djsc_folder=".." --prefix="$dist" p build ninja -C build install $ErrorActionPreference = 'Stop' -$pathdll = "$dist\lib\plugins\core_pdd.dll" +$pathdll = "$dist\lib\rizin\plugins\core_pdd.dll" if(![System.IO.File]::Exists($pathdll)) { type build\meson-logs\meson-log.txt + ls "$dist\lib\rizin\plugins\" throw (New-Object System.IO.FileNotFoundException("File not found: $pathdll", $pathdll)) } -Remove-Item -Recurse -Force $dist\lib\plugins\core_pdd.lib +Remove-Item -Recurse -Force "$dist\lib\rizin\plugins\core_pdd.lib" diff --git a/dist/bundle_rz_libswift.ps1 b/dist/bundle_rz_libswift.ps1 index 9fec607c..9c0b3c32 100644 --- a/dist/bundle_rz_libswift.ps1 +++ b/dist/bundle_rz_libswift.ps1 @@ -7,10 +7,10 @@ if (-not (Test-Path -Path 'libswift' -PathType Container)) { cd libswift & meson.exe --buildtype=release --prefix=$dist build ninja -C build install -$pathdll = "$dist/lib/plugins/swift.dll" +$pathdll = "$dist\lib\rizin\plugins\swift.dll" if(![System.IO.File]::Exists($pathdll)) { type build/meson-logs/meson-log.txt - ls "$dist/lib/plugins/" + ls "$dist\lib\rizin\plugins\" throw (New-Object System.IO.FileNotFoundException("File not found: $pathdll", $pathdll)) } -Remove-Item -Recurse -Force $dist/lib/plugins/swift.lib +Remove-Item -Recurse -Force "$dist\lib\rizin\plugins\swift.lib" diff --git a/dist/bundle_rz_libyara.ps1 b/dist/bundle_rz_libyara.ps1 index c3309b94..984913d6 100644 --- a/dist/bundle_rz_libyara.ps1 +++ b/dist/bundle_rz_libyara.ps1 @@ -8,15 +8,15 @@ if (-not (Test-Path -Path 'rz_libyara' -PathType Container)) { git -C rz_libyara submodule update } cd rz_libyara -& meson.exe --buildtype=release --prefix=$dist build +& meson.exe --buildtype=release --prefix=$dist -Duse_sys_yara=disabled -Denable_openssl=false build ninja -C build install -$pathdll = "$dist/lib/plugins/rz_yara.dll" +$pathdll = "$dist\lib\rizin\plugins\rz_yara.dll" if(![System.IO.File]::Exists($pathdll)) { type build/meson-logs/meson-log.txt - ls "$dist/lib/plugins/" + ls "$dist\lib\rizin\plugins\" throw (New-Object System.IO.FileNotFoundException("File not found: $pathdll", $pathdll)) } -Remove-Item -Recurse -Force $dist/lib/plugins/rz_yara.lib +Remove-Item -Recurse -Force "$dist\lib\rizin\plugins\rz_yara.lib" cd cutter-plugin mkdir build diff --git a/dist/bundle_rz_silhouette.ps1 b/dist/bundle_rz_silhouette.ps1 index 4aeeb2b9..4cf04668 100644 --- a/dist/bundle_rz_silhouette.ps1 +++ b/dist/bundle_rz_silhouette.ps1 @@ -8,10 +8,10 @@ if (-not (Test-Path -Path 'rz-silhouette' -PathType Container)) { cd rz-silhouette & meson.exe --buildtype=release --prefix=$dist build ninja -C build install -$pathdll = "$dist/lib/plugins/rz_silhouette.dll" +$pathdll = "$dist\lib\rizin\plugins\rz_silhouette.dll" if(![System.IO.File]::Exists($pathdll)) { type build/meson-logs/meson-log.txt - ls "$dist/lib/plugins/" + ls "$dist\lib\rizin\plugins\" throw (New-Object System.IO.FileNotFoundException("File not found: $pathdll", $pathdll)) } -Remove-Item -Recurse -Force $dist/lib/plugins/rz_silhouette.lib +Remove-Item -Recurse -Force "$dist\lib\rizin\plugins\rz_silhouette.lib" diff --git a/rizin b/rizin index 9ab709bc..9c6feafd 160000 --- a/rizin +++ b/rizin @@ -1 +1 @@ -Subproject commit 9ab709bc34843f04ffde3b63322c809596123e77 +Subproject commit 9c6feafd4733903fca0cdad50b3bd213ab2b6228 diff --git a/scripts/rz-libyara.sh b/scripts/rz-libyara.sh index f316f2c5..5fdb303c 100755 --- a/scripts/rz-libyara.sh +++ b/scripts/rz-libyara.sh @@ -15,7 +15,7 @@ fi cd rz_libyara -meson --buildtype=release --pkg-config-path="$INSTALL_PREFIX/lib/pkgconfig" --prefix="$INSTALL_PREFIX" build +meson --buildtype=release --pkg-config-path="$INSTALL_PREFIX/lib/pkgconfig" --prefix="$INSTALL_PREFIX" -Duse_sys_yara=disabled build ninja -C build install cd cutter-plugin diff --git a/src/CutterApplication.cpp b/src/CutterApplication.cpp index 6f0612b4..0c758500 100644 --- a/src/CutterApplication.cpp +++ b/src/CutterApplication.cpp @@ -33,9 +33,9 @@ // has RZ_GITTAP defined and uses it in rz_core_version(). // After that, RZ_GITTAP is not defined anymore and RZ_VERSION is used. #ifdef RZ_GITTAP -#define CUTTER_COMPILE_TIME_RZ_VERSION "" RZ_GITTAP +# define CUTTER_COMPILE_TIME_RZ_VERSION "" RZ_GITTAP #else -#define CUTTER_COMPILE_TIME_RZ_VERSION "" RZ_VERSION +# define CUTTER_COMPILE_TIME_RZ_VERSION "" RZ_VERSION #endif CutterApplication::CutterApplication(int &argc, char **argv) : QApplication(argc, argv) @@ -162,7 +162,8 @@ CutterApplication::CutterApplication(int &argc, char **argv) : QApplication(argc appdir.cdUp(); // appdir auto sleighHome = appdir; - sleighHome.cd("lib/rizin/plugins/rz_ghidra_sleigh/"); // appdir/lib/rizin/plugins/rz_ghidra_sleigh/ + // appdir/lib/rizin/plugins/rz_ghidra_sleigh/ + sleighHome.cd("lib/rizin/plugins/rz_ghidra_sleigh/"); Core()->setConfig("ghidra.sleighhome", sleighHome.absolutePath()); } #endif @@ -174,8 +175,8 @@ CutterApplication::CutterApplication(int &argc, char **argv) : QApplication(argc rzprefix.cd("Resources"); // Contents/Resources/ auto sleighHome = rzprefix; - sleighHome.cd( - "lib/rizin/plugins/rz_ghidra_sleigh"); // Contents/Resources/lib/rizin/plugins/rz_ghidra_sleigh + // Contents/Resources/lib/rizin/plugins/rz_ghidra_sleigh + sleighHome.cd("lib/rizin/plugins/rz_ghidra_sleigh"); Core()->setConfig("ghidra.sleighhome", sleighHome.absolutePath()); } #endif @@ -183,7 +184,7 @@ CutterApplication::CutterApplication(int &argc, char **argv) : QApplication(argc #if defined(Q_OS_WIN) && defined(CUTTER_ENABLE_PACKAGING) { auto sleighHome = QDir(QCoreApplication::applicationDirPath()); - sleighHome.cd("lib/plugins/rz_ghidra_sleigh"); + sleighHome.cd("lib/rizin/plugins/rz_ghidra_sleigh"); Core()->setConfig("ghidra.sleighhome", sleighHome.absolutePath()); } #endif diff --git a/src/core/Cutter.cpp b/src/core/Cutter.cpp index ebbd2142..db144cb4 100644 --- a/src/core/Cutter.cpp +++ b/src/core/Cutter.cpp @@ -3084,8 +3084,6 @@ QList CutterCore::getAllImports() RzBinImport *import; RzListIter *iter; bool va = core->io->va || core->bin->is_debugger; - int bin_demangle = getConfigi("bin.demangle"); - int keep_lib = getConfigi("bin.demangle.libs"); CutterRzListForeach (imports, iter, RzBinImport, import) { if (RZ_STR_ISEMPTY(import->name)) { continue; @@ -3099,13 +3097,6 @@ QList CutterCore::getAllImports() if (RZ_STR_ISNOTEMPTY(import->classname)) { name = QString("%1.%2").arg(import->classname, import->name); } - if (bin_demangle) { - char *dname = rz_bin_demangle(bf, NULL, name.toUtf8().constData(), - importDescription.plt, keep_lib); - if (dname) { - name = fromOwnedCharPtr(dname); - } - } if (core->bin->prefix) { name = QString("%1.%2").arg(core->bin->prefix, name); } @@ -3135,7 +3126,6 @@ QList CutterCore::getAllExports() return {}; } - QString lang = getConfigi("bin.demangle") ? getConfig("bin.lang") : ""; bool va = core->io->va || core->bin->is_debugger; QList ret; @@ -3145,7 +3135,7 @@ QList CutterCore::getAllExports() } RzBinSymNames sn = {}; - rz_core_sym_name_init(core, &sn, symbol, lang.isEmpty() ? NULL : lang.toUtf8().constData()); + rz_core_sym_name_init(&sn, symbol); ExportDescription exportDescription; exportDescription.vaddr = rva(bf->o, symbol->paddr, symbol->vaddr, va); @@ -3543,19 +3533,18 @@ QList CutterCore::getAllClassesFromBin() RzListIter *iter, *iter2, *iter3; RzBinClass *c; RzBinSymbol *sym; - RzBinField *f; + RzBinClassField *f; CutterRzListForeach (cs, iter, RzBinClass, c) { BinClassDescription classDescription; classDescription.name = c->name; classDescription.addr = c->addr; - classDescription.index = c->index; CutterRzListForeach (c->methods, iter2, RzBinSymbol, sym) { BinClassMethodDescription methodDescription; methodDescription.name = sym->name; methodDescription.addr = sym->vaddr; classDescription.methods << methodDescription; } - CutterRzListForeach (c->fields, iter3, RzBinField, f) { + CutterRzListForeach (c->fields, iter3, RzBinClassField, f) { BinClassFieldDescription fieldDescription; fieldDescription.name = f->name; fieldDescription.addr = f->vaddr; @@ -3591,7 +3580,6 @@ QList CutterCore::getAllClassesFromFlags() } desc->name = match.captured(1); desc->addr = item.offset; - desc->index = RVA_INVALID; continue; } @@ -3605,7 +3593,6 @@ QList CutterCore::getAllClassesFromFlags() BinClassDescription cls; cls.name = tr("Unknown (%1)").arg(className); cls.addr = RVA_INVALID; - cls.index = 0; ret << cls; classDesc = &ret.last(); classesCache[className] = classDesc; diff --git a/src/core/CutterDescriptions.h b/src/core/CutterDescriptions.h index aed9b508..20a476fc 100644 --- a/src/core/CutterDescriptions.h +++ b/src/core/CutterDescriptions.h @@ -239,7 +239,6 @@ struct BinClassDescription QString name; RVA addr = RVA_INVALID; RVA vtableAddr = RVA_INVALID; - ut64 index = 0; QList baseClasses; QList methods; QList fields; diff --git a/src/translations b/src/translations index e8fc5ca1..5ac7217b 160000 --- a/src/translations +++ b/src/translations @@ -1 +1 @@ -Subproject commit e8fc5ca1acd70fd82a2ac9ac02b0261e57703250 +Subproject commit 5ac7217b12623c7bfd0378380f923cf694ccee22 diff --git a/src/widgets/ComboQuickFilterView.cpp b/src/widgets/ComboQuickFilterView.cpp index a7bcef60..04580584 100644 --- a/src/widgets/ComboQuickFilterView.cpp +++ b/src/widgets/ComboQuickFilterView.cpp @@ -13,7 +13,7 @@ ComboQuickFilterView::ComboQuickFilterView(QWidget *parent) [this]() { emit filterTextChanged(ui->lineEdit->text()); }); connect(ui->lineEdit, &QLineEdit::textChanged, this, - [this](const QString &text) { debounceTimer->start(150); }); + [this]() { debounceTimer->start(150); }); } ComboQuickFilterView::~ComboQuickFilterView() diff --git a/src/widgets/QuickFilterView.cpp b/src/widgets/QuickFilterView.cpp index 1f04c5b9..bf130333 100644 --- a/src/widgets/QuickFilterView.cpp +++ b/src/widgets/QuickFilterView.cpp @@ -16,7 +16,7 @@ QuickFilterView::QuickFilterView(QWidget *parent, bool defaultOn) [this]() { emit filterTextChanged(ui->filterLineEdit->text()); }); connect(ui->filterLineEdit, &QLineEdit::textChanged, this, - [this](const QString &text) { debounceTimer->start(150); }); + [this]() { debounceTimer->start(150); }); if (!defaultOn) { closeFilter();