unbreak after r2 update
This commit is contained in:
parent
fcccd72241
commit
df777a51a1
@ -1,11 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.4 2020/07/03 21:12:38 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.5 2020/07/21 07:41:59 jasper Exp $
|
||||
|
||||
COMMENT = RE platform powered by radare2
|
||||
|
||||
GH_ACCOUNT = radareorg
|
||||
GH_PROJECT = cutter
|
||||
GH_TAGNAME = v1.10.3
|
||||
REVISION = 0
|
||||
REVISION = 1
|
||||
|
||||
CATEGORIES = devel
|
||||
|
||||
@ -28,7 +28,7 @@ MODULES = devel/cmake \
|
||||
MODPY_VERSION = ${MODPY_DEFAULT_VERSION_3}
|
||||
|
||||
BUILD_DEPENDS = ${RUN_DEPENDS}
|
||||
RUN_DEPENDS = devel/radare2/main>=4.4.0
|
||||
RUN_DEPENDS = devel/radare2/main>=4.5.0
|
||||
LIB_DEPENDS = archivers/libzip \
|
||||
devel/capstone/main \
|
||||
devel/kf5/syntax-highlighting \
|
||||
|
74
devel/cutter/patches/patch-src_core_Cutter_cpp
Normal file
74
devel/cutter/patches/patch-src_core_Cutter_cpp
Normal file
@ -0,0 +1,74 @@
|
||||
$OpenBSD: patch-src_core_Cutter_cpp,v 1.1 2020/07/21 07:41:59 jasper Exp $
|
||||
|
||||
sync with r2 api:
|
||||
- https://github.com/radareorg/cutter/commit/207879027838dc480a39de90b13ea15218ace22e
|
||||
- https://github.com/radareorg/cutter/commit/18a21048dde2393a89dfdee409fa5cb7d75f763a
|
||||
|
||||
Index: src/core/Cutter.cpp
|
||||
--- src/core/Cutter.cpp.orig
|
||||
+++ src/core/Cutter.cpp
|
||||
@@ -793,7 +793,7 @@ void CutterCore::delComment(RVA addr)
|
||||
QString CutterCore::getCommentAt(RVA addr)
|
||||
{
|
||||
CORE_LOCK();
|
||||
- return fromOwnedCharPtr(r_meta_get_string(core->anal, R_META_TYPE_COMMENT, addr));
|
||||
+ return r_meta_get_string(core->anal, R_META_TYPE_COMMENT, addr);
|
||||
}
|
||||
|
||||
void CutterCore::setImmediateBase(const QString &r2BaseName, RVA offset)
|
||||
@@ -1054,7 +1054,7 @@ void CutterCore::setEndianness(bool big)
|
||||
QByteArray CutterCore::assemble(const QString &code)
|
||||
{
|
||||
CORE_LOCK();
|
||||
- RAsmCode *ac = r_asm_massemble(core->assembler, code.toUtf8().constData());
|
||||
+ RAsmCode *ac = r_asm_massemble(core->rasm, code.toUtf8().constData());
|
||||
QByteArray res;
|
||||
if (ac && ac->bytes) {
|
||||
res = QByteArray(reinterpret_cast<const char *>(ac->bytes), ac->len);
|
||||
@@ -1066,7 +1066,7 @@ QByteArray CutterCore::assemble(const QString &code)
|
||||
QString CutterCore::disassemble(const QByteArray &data)
|
||||
{
|
||||
CORE_LOCK();
|
||||
- RAsmCode *ac = r_asm_mdisassemble(core->assembler, reinterpret_cast<const ut8 *>(data.constData()), data.length());
|
||||
+ RAsmCode *ac = r_asm_mdisassemble(core->rasm, reinterpret_cast<const ut8 *>(data.constData()), data.length());
|
||||
QString code;
|
||||
if (ac && ac->assembly) {
|
||||
code = QString::fromUtf8(ac->assembly);
|
||||
@@ -1345,7 +1345,7 @@ QJsonObject CutterCore::getAddrRefs(RVA addr, int dept
|
||||
}
|
||||
|
||||
CORE_LOCK();
|
||||
- int bits = core->assembler->bits;
|
||||
+ int bits = core->rasm->bits;
|
||||
QByteArray buf = QByteArray();
|
||||
ut64 type = r_core_anal_address(core, addr);
|
||||
|
||||
@@ -1409,8 +1409,8 @@ QJsonObject CutterCore::getAddrRefs(RVA addr, int dept
|
||||
perms += "x";
|
||||
// Instruction disassembly
|
||||
r_io_read_at(core->io, addr, (unsigned char*)buf.data(), buf.size());
|
||||
- r_asm_set_pc(core->assembler, addr);
|
||||
- r_asm_disassemble(core->assembler, &op, (unsigned char*)buf.data(), buf.size());
|
||||
+ r_asm_set_pc(core->rasm, addr);
|
||||
+ r_asm_disassemble(core->rasm, &op, (unsigned char*)buf.data(), buf.size());
|
||||
json["asm"] = r_asm_op_get_asm(&op);
|
||||
}
|
||||
|
||||
@@ -2365,7 +2365,7 @@ QStringList CutterCore::getAsmPluginNames()
|
||||
QStringList ret;
|
||||
|
||||
RAsmPlugin *ap;
|
||||
- CutterRListForeach(core->assembler->plugins, it, RAsmPlugin, ap) {
|
||||
+ CutterRListForeach(core->rasm->plugins, it, RAsmPlugin, ap) {
|
||||
ret << ap->name;
|
||||
}
|
||||
|
||||
@@ -2476,7 +2476,7 @@ QList<RAsmPluginDescription> CutterCore::getRAsmPlugin
|
||||
QList<RAsmPluginDescription> ret;
|
||||
|
||||
RAsmPlugin *ap;
|
||||
- CutterRListForeach(core->assembler->plugins, it, RAsmPlugin, ap) {
|
||||
+ CutterRListForeach(core->rasm->plugins, it, RAsmPlugin, ap) {
|
||||
RAsmPluginDescription plugin;
|
||||
|
||||
plugin.name = ap->name;
|
Loading…
Reference in New Issue
Block a user