mirror of
https://github.com/rizinorg/cutter.git
synced 2025-02-21 14:16:08 +00:00
Update radare2 (#1381)
This commit is contained in:
parent
85f5494c93
commit
c7adeb4dd6
2
radare2
2
radare2
@ -1 +1 @@
|
|||||||
Subproject commit 5a9127d2599c8ff61d8544be7d4c9384402e94a3
|
Subproject commit 82d1e96b7af0f56d7168179946c51fe93f5d4fe4
|
@ -10,6 +10,7 @@
|
|||||||
#include "common/R2Task.h"
|
#include "common/R2Task.h"
|
||||||
#include "common/Json.h"
|
#include "common/Json.h"
|
||||||
#include "core/Cutter.h"
|
#include "core/Cutter.h"
|
||||||
|
#include "r_asm.h"
|
||||||
#include "sdb.h"
|
#include "sdb.h"
|
||||||
|
|
||||||
Q_GLOBAL_STATIC(CutterCore, uniqueInstance)
|
Q_GLOBAL_STATIC(CutterCore, uniqueInstance)
|
||||||
@ -393,7 +394,7 @@ bool CutterCore::loadFile(QString path, ut64 baddr, ut64 mapaddr, int perms, int
|
|||||||
}
|
}
|
||||||
|
|
||||||
ut64 hashLimit = getConfigut64("cfg.hashlimit");
|
ut64 hashLimit = getConfigut64("cfg.hashlimit");
|
||||||
r_bin_file_hash(core_->bin, hashLimit, path.toUtf8().constData());
|
r_bin_file_hash(core_->bin, hashLimit, path.toUtf8().constData(), NULL);
|
||||||
|
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
return true;
|
return true;
|
||||||
@ -784,7 +785,7 @@ QString CutterCore::assemble(const QString &code)
|
|||||||
QString CutterCore::disassemble(const QString &hex)
|
QString CutterCore::disassemble(const QString &hex)
|
||||||
{
|
{
|
||||||
CORE_LOCK();
|
CORE_LOCK();
|
||||||
RAsmCode *ac = r_asm_mdisassemble_hexstr(core_->assembler, hex.toUtf8().constData());
|
RAsmCode *ac = r_asm_mdisassemble_hexstr(core_->assembler, NULL, hex.toUtf8().constData());
|
||||||
QString code = QString(ac != nullptr ? ac->buf_asm : "");
|
QString code = QString(ac != nullptr ? ac->buf_asm : "");
|
||||||
r_asm_code_free(ac);
|
r_asm_code_free(ac);
|
||||||
return code;
|
return code;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
win32 {
|
win32 {
|
||||||
DEFINES += _CRT_NONSTDC_NO_DEPRECATE
|
DEFINES += _CRT_NONSTDC_NO_DEPRECATE
|
||||||
DEFINES += _CRT_SECURE_NO_WARNINGS
|
DEFINES += _CRT_SECURE_NO_WARNINGS
|
||||||
R2_INCLUDEPATH += "$$PWD/../radare2/libr/include/msvc"
|
|
||||||
!contains(QT_ARCH, x86_64) {
|
!contains(QT_ARCH, x86_64) {
|
||||||
LIBS += -L"$$PWD/../r2_dist_x86/radare2/lib"
|
LIBS += -L"$$PWD/../r2_dist_x86/radare2/lib"
|
||||||
R2_INCLUDEPATH += "$$PWD/../r2_dist_x86/include"
|
R2_INCLUDEPATH += "$$PWD/../r2_dist_x86/include"
|
||||||
@ -102,4 +101,4 @@ win32 {
|
|||||||
-lr_util \
|
-lr_util \
|
||||||
-lr_crypto
|
-lr_crypto
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -112,8 +112,6 @@ platform_inc = []
|
|||||||
if host_machine.system() == 'windows'
|
if host_machine.system() == 'windows'
|
||||||
add_project_arguments('-D_CRT_NONSTDC_NO_DEPRECATE', language: 'cpp')
|
add_project_arguments('-D_CRT_NONSTDC_NO_DEPRECATE', language: 'cpp')
|
||||||
add_project_arguments('-D_CRT_SECURE_NO_WARNINGS', language: 'cpp')
|
add_project_arguments('-D_CRT_SECURE_NO_WARNINGS', language: 'cpp')
|
||||||
platform_inc = include_directories('../radare2/libr/include/msvc')
|
|
||||||
# Workaround for https://github.com/mesonbuild/meson/issues/2327
|
|
||||||
qt_host_libs = run_command('qmake', '-query', 'QT_HOST_LIBS').stdout().strip()
|
qt_host_libs = run_command('qmake', '-query', 'QT_HOST_LIBS').stdout().strip()
|
||||||
if get_option('buildtype').startswith('debug')
|
if get_option('buildtype').startswith('debug')
|
||||||
qtmain_libname = 'qtmaind.lib'
|
qtmain_libname = 'qtmaind.lib'
|
||||||
|
@ -105,10 +105,9 @@ void Dashboard::updateContents()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add file hashes and libraries
|
// Add file hashes and libraries
|
||||||
QString md5 = Core()->cmd("e file.md5");
|
QJsonObject hashes = Core()->cmdj("itj").object();
|
||||||
QString sha1 = Core()->cmd("e file.sha1");
|
ui->md5Edit->setText(hashes["md5"].toString());
|
||||||
ui->md5Edit->setText(md5);
|
ui->sha1Edit->setText(hashes["sha1"].toString());
|
||||||
ui->sha1Edit->setText(sha1);
|
|
||||||
|
|
||||||
QStringList libs = Core()->cmdList("il");
|
QStringList libs = Core()->cmdList("il");
|
||||||
if (!libs.isEmpty()) {
|
if (!libs.isEmpty()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user