From owner-svn-ports-all@freebsd.org Wed Nov 28 14:23:21 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 285421155ED3; Wed, 28 Nov 2018 14:23:21 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BF5407641C; Wed, 28 Nov 2018 14:23:20 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A04B639DF; Wed, 28 Nov 2018 14:23:20 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wASENKhl016702; Wed, 28 Nov 2018 14:23:20 GMT (envelope-from swills@FreeBSD.org) Received: (from swills@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wASENJwN016696; Wed, 28 Nov 2018 14:23:19 GMT (envelope-from swills@FreeBSD.org) Message-Id: <201811281423.wASENJwN016696@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: swills set sender to swills@FreeBSD.org using -f From: Steve Wills Date: Wed, 28 Nov 2018 14:23:19 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r486093 - in head/x11/radare-cutter: . files X-SVN-Group: ports-head X-SVN-Commit-Author: swills X-SVN-Commit-Paths: in head/x11/radare-cutter: . files X-SVN-Commit-Revision: 486093 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BF5407641C X-Spamd-Result: default: False [1.25 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.55)[0.554,0]; NEURAL_SPAM_SHORT(0.28)[0.275,0]; NEURAL_SPAM_MEDIUM(0.42)[0.424,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Nov 2018 14:23:21 -0000 Author: swills Date: Wed Nov 28 14:23:18 2018 New Revision: 486093 URL: https://svnweb.freebsd.org/changeset/ports/486093 Log: x11/radare-cutter: update to 1.7.2 Added: head/x11/radare-cutter/files/patch-Cutter.cpp (contents, props changed) head/x11/radare-cutter/files/patch-Cutter.h (contents, props changed) head/x11/radare-cutter/files/patch-widgets_Dashboard.cpp (contents, props changed) head/x11/radare-cutter/files/patch-widgets_SidebarWidget.cpp (contents, props changed) Modified: head/x11/radare-cutter/Makefile (contents, props changed) head/x11/radare-cutter/distinfo (contents, props changed) Modified: head/x11/radare-cutter/Makefile ============================================================================== --- head/x11/radare-cutter/Makefile Wed Nov 28 14:18:08 2018 (r486092) +++ head/x11/radare-cutter/Makefile Wed Nov 28 14:23:18 2018 (r486093) @@ -1,9 +1,8 @@ # $FreeBSD$ PORTNAME= radare-cutter -PORTVERSION= 1.7.1 +PORTVERSION= 1.7.2 DISTVERSIONPREFIX= v -PORTREVISION= 1 CATEGORIES= x11 MAINTAINER= swills@FreeBSD.org Modified: head/x11/radare-cutter/distinfo ============================================================================== --- head/x11/radare-cutter/distinfo Wed Nov 28 14:18:08 2018 (r486092) +++ head/x11/radare-cutter/distinfo Wed Nov 28 14:23:18 2018 (r486093) @@ -1,3 +1,3 @@ -TIMESTAMP = 1537225612 -SHA256 (radareorg-cutter-v1.7.1_GH0.tar.gz) = e9b737d75a6d5b6f27c1406ee6b09f4e570db226c3a52f2f6c5f3b8bdd4050f8 -SIZE (radareorg-cutter-v1.7.1_GH0.tar.gz) = 1100528 +TIMESTAMP = 1543350663 +SHA256 (radareorg-cutter-v1.7.2_GH0.tar.gz) = 48ecdb0fdfc9791014bc08b116d6186a63e0145953564ca9c92a7333206e3da1 +SIZE (radareorg-cutter-v1.7.2_GH0.tar.gz) = 1126217 Added: head/x11/radare-cutter/files/patch-Cutter.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11/radare-cutter/files/patch-Cutter.cpp Wed Nov 28 14:23:18 2018 (r486093) @@ -0,0 +1,132 @@ +--- Cutter.cpp.orig 2018-11-27 21:55:04 UTC ++++ Cutter.cpp +@@ -111,7 +111,7 @@ QList CutterCore::sdbListKeys(QString path) + SdbList *l = sdb_foreach_list(root, false); + ls_foreach(l, iter, vsi) { + SdbKv *nsi = (SdbKv *)vsi; +- list << nsi->key; ++ list << reinterpret_cast(nsi->base.key); + } + } + return list; +@@ -323,26 +323,6 @@ void CutterCore::openFile(QString path, RVA mapaddr) + } + } + +-void CutterCore::analyze(int level, QList advanced) +-{ +- CORE_LOCK(); +- /* +- * Levels +- * Level 1: aaa +- * Level 2: aaaa +- */ +- +- if (level == 1) { +- r_core_cmd0(core_, "aaa"); +- } else if (level == 2) { +- r_core_cmd0(core_, "aaaa"); +- } else if (level == 3) { +- for (QString option : advanced) { +- r_core_cmd0(core_, option.toStdString().c_str()); +- } +- } +-} +- + void CutterCore::renameFunction(const QString &oldName, const QString &newName) + { + cmdRaw("afn " + newName + " " + oldName); +@@ -549,11 +529,6 @@ ut64 CutterCore::math(const QString &expr) + return r_num_math(this->core_ ? this->core_->num : NULL, expr.toUtf8().constData()); + } + +-QString CutterCore::itoa(ut64 num, int rdx) +-{ +- return QString::number(num, rdx); +-} +- + void CutterCore::setConfig(const QString &k, const QString &v) + { + CORE_LOCK(); +@@ -716,51 +691,6 @@ QString CutterCore::createFunctionAt(RVA addr, QString + return ret; + } + +-void CutterCore::markString(RVA addr) +-{ +- cmd("Cs @" + RAddressString(addr)); +-} +- +-int CutterCore::get_size() +-{ +- CORE_LOCK(); +- RBinObject *obj = r_bin_get_object(core_->bin); +- //return obj->size; +- return obj != nullptr ? obj->obj_size : 0; +-} +- +-ulong CutterCore::get_baddr() +-{ +- CORE_LOCK(); +- ulong baddr = r_bin_get_baddr(core_->bin); +- return baddr; +-} +- +-QList> CutterCore::get_exec_sections() +-{ +- QList> ret; +- +- QString text = cmd("S*~^S"); +- for (QString line : text.split("\n")) { +- QStringList fields = line.split(" "); +- if (fields.length() == 7) { +- if (fields[6].contains("x")) { +- QList tmp = QList(); +- tmp << fields[2]; +- tmp << fields[3]; +- tmp << fields[5]; +- ret << tmp; +- } +- } +- } +- return ret; +-} +- +-QString CutterCore::getOffsetInfo(QString addr) +-{ +- return cmd("ao @ " + addr); +-} +- + QJsonDocument CutterCore::getRegistersInfo() + { + return cmdj("aeafj"); +@@ -1219,29 +1149,6 @@ QStringList CutterCore::getStats() + stats << cmd("f~?").trimmed(); + + return stats; +-} +- +-QString CutterCore::getSimpleGraph(QString function) +-{ +- // New styles +- QString graph = "graph [bgcolor=invis, splines=polyline];"; +- QString node = +- "node [style=\"filled\" fillcolor=\"#4183D7\" shape=box fontname=\"Courier\" fontsize=\"8\" color=\"#4183D7\" fontcolor=\"white\"];"; +- QString arrow = "edge [arrowhead=\"normal\";]"; +- +- // Old styles +- QString old_graph = "graph [bgcolor=white fontsize=8 fontname=\"Courier\"];"; +- //QString old_node = "node [color=lightgray, style=filled shape=box];"; +- QString old_node = "node [fillcolor=gray style=filled shape=box];"; +- QString old_arrow = "edge [arrowhead=\"vee\"];"; +- +- QString dot = cmd("aga @ " + function).trimmed(); +- dot.replace(old_graph, graph); +- dot.replace(old_node, node); +- dot.replace(old_arrow, arrow); +- dot.replace("fillcolor=blue", "fillcolor=\"#EC644B\", color=\"#EC644B\""); +- +- return dot; + } + + void CutterCore::setGraphEmpty(bool empty) Added: head/x11/radare-cutter/files/patch-Cutter.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11/radare-cutter/files/patch-Cutter.h Wed Nov 28 14:23:18 2018 (r486093) @@ -0,0 +1,99 @@ +--- Cutter.h.orig 2018-10-08 07:20:46 UTC ++++ Cutter.h +@@ -17,14 +17,9 @@ + #include + #include + +-#define HAVE_LATEST_LIBR2 false +- + #define CutterRListForeach(list, it, type, x) \ + if (list) for (it = list->head; it && ((x=(type*)it->data)); it = it->n) + +-#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" + + #define Core() (CutterCore::getInstance()) +@@ -60,8 +55,6 @@ class RCoreLocked (public) + ~RCoreLocked(); + operator RCore *() const; + RCore *operator->() const; +- RVA seek(RVA offset); +- RVA getSeek(); + }; + + inline QString RAddressString(RVA addr) +@@ -398,7 +391,6 @@ class CutterCore: public QObject (public) + QString cmdFunctionAt(QString addr); + QString cmdFunctionAt(RVA addr); + QString createFunctionAt(RVA addr, QString name); +- void markString(RVA addr); + + /* Flags */ + void delFlag(RVA addr); +@@ -434,9 +426,6 @@ class CutterCore: public QObject (public) + void loadScript(const QString &scriptname); + QJsonArray getOpenedFiles(); + +- /* Analysis functions */ +- void analyze(int level, QList advanced); +- + /* Seek functions */ + void seek(QString thing); + void seek(ut64 offset); +@@ -464,7 +453,6 @@ class CutterCore: public QObject (public) + + /* Math functions */ + ut64 math(const QString &expr); +- QString itoa(ut64 num, int rdx = 16); + + /* Config functions */ + void setConfig(const QString &k, const QString &v); +@@ -491,12 +479,8 @@ class CutterCore: public QObject (public) + QList sdbListKeys(QString path); + QString sdbGet(QString path, QString key); + bool sdbSet(QString path, QString key, QString val); +- int get_size(); +- ulong get_baddr(); +- QList> get_exec_sections(); +- QString getOffsetInfo(QString addr); + +- // Debug ++ /* Debug */ + QJsonDocument getRegistersInfo(); + QJsonDocument getRegisterValues(); + QString getRegisterName(QString registerRole); +@@ -531,6 +515,7 @@ class CutterCore: public QObject (public) + int currentlyAttachedToPID = -1; + QString currentlyOpenFile; + ++ /* Pseudocode */ + QString getDecompiledCodePDC(RVA addr); + bool getR2DecAvailable(); + QString getDecompiledCodeR2Dec(RVA addr); +@@ -540,7 +525,6 @@ class CutterCore: public QObject (public) + QJsonDocument getSignatureInfo(); + QJsonDocument getFileVersionInfo(); + QStringList getStats(); +- QString getSimpleGraph(QString function); + void setGraphEmpty(bool empty); + bool isGraphEmpty(); + +@@ -629,7 +613,6 @@ signals: + void refreshCodeViews(); + void stackChanged(); + +- void notesChanged(const QString ¬es); + void projectSaved(const QString &name); + + /*! +@@ -654,8 +637,6 @@ signals: + + void newMessage(const QString &msg); + void newDebugMessage(const QString &msg); +- +-public slots: + + private: + MemoryWidgetType memoryWidgetPriority; Added: head/x11/radare-cutter/files/patch-widgets_Dashboard.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11/radare-cutter/files/patch-widgets_Dashboard.cpp Wed Nov 28 14:23:18 2018 (r486093) @@ -0,0 +1,11 @@ +--- widgets/Dashboard.cpp.orig 2018-10-08 07:20:46 UTC ++++ widgets/Dashboard.cpp +@@ -62,7 +62,7 @@ void Dashboard::updateContents() + this->ui->relroEdit->setText(relro); + } + +- this->ui->baddrEdit->setText("0x" + QString::number(Core()->get_baddr(), 16)); ++ this->ui->baddrEdit->setText(RAddressString(item2["baddr"].toVariant().toULongLong())); + + if (item2["va"].toBool() == true) { + this->ui->vaEdit->setText("True"); Added: head/x11/radare-cutter/files/patch-widgets_SidebarWidget.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11/radare-cutter/files/patch-widgets_SidebarWidget.cpp Wed Nov 28 14:23:18 2018 (r486093) @@ -0,0 +1,17 @@ +--- widgets/SidebarWidget.cpp.orig 2018-10-08 07:20:46 UTC ++++ widgets/SidebarWidget.cpp +@@ -188,10 +188,13 @@ void SidebarWidget::fillOffsetInfo(QString off) + .set("scr.color", COLOR_MODE_DISABLED); + + ui->offsetTreeWidget->clear(); +- QString raw = Core()->getOffsetInfo(off); ++ QString raw = Core()->cmd(QString("ao@") + off).trimmed(); + QList lines = raw.split("\n", QString::SkipEmptyParts); + for (QString line : lines) { + QList eles = line.split(":", QString::SkipEmptyParts); ++ if (eles.length() < 2) { ++ continue; ++ } + QTreeWidgetItem *tempItem = new QTreeWidgetItem(); + tempItem->setText(0, eles.at(0).toUpper()); + tempItem->setText(1, eles.at(1));