diff --git a/rizin b/rizin index 254c5119..e7f2c2a4 160000 --- a/rizin +++ b/rizin @@ -1 +1 @@ -Subproject commit 254c5119e3563d05d02665cabbcba003c921cee8 +Subproject commit e7f2c2a4305ff75bc3d4682a29c58bd12e73ee2a diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1d798902..7d2176f4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -147,6 +147,7 @@ set(SOURCES dialogs/GlibcHeapBinsDialog.cpp widgets/HeapBinsGraphView.cpp dialogs/ArenaInfoDialog.cpp + widgets/WindowsHeapWidget.cpp ) set(HEADER_FILES core/Cutter.h @@ -306,6 +307,7 @@ set(HEADER_FILES dialogs/GlibcHeapBinsDialog.h widgets/HeapBinsGraphView.h dialogs/ArenaInfoDialog.h + widgets/WindowsHeapWidget.h ) set(UI_FILES dialogs/AboutDialog.ui @@ -377,6 +379,7 @@ set(UI_FILES widgets/GlibcHeapWidget.ui dialogs/GlibcHeapBinsDialog.ui dialogs/ArenaInfoDialog.ui + widgets/WindowsHeapWidget.ui ) set(QRC_FILES resources.qrc diff --git a/src/core/Cutter.cpp b/src/core/Cutter.cpp index 12d50fce..dfc2d7dc 100644 --- a/src/core/Cutter.cpp +++ b/src/core/Cutter.cpp @@ -3616,22 +3616,12 @@ QString CutterCore::addTypes(const char *str) { CORE_LOCK(); char *error_msg = nullptr; - char *parsed = rz_type_parse_c_string(core->analysis->typedb, str, &error_msg); + int result = rz_type_parse_string(core->analysis->typedb, str, &error_msg); + // TODO fix adding and parsing types QString error; - if (!parsed) { - if (error_msg) { - error = error_msg; - rz_mem_free(error_msg); - } - return error; - } - - rz_type_db_save_parsed_type(core->analysis->typedb, parsed); - rz_mem_free(parsed); - - if (error_msg) { - error = error_msg; + if (result && error_msg) { + error = QString(error_msg); rz_mem_free(error_msg); } diff --git a/src/widgets/WindowsHeapWidget.cpp b/src/widgets/WindowsHeapWidget.cpp new file mode 100644 index 00000000..50f30b63 --- /dev/null +++ b/src/widgets/WindowsHeapWidget.cpp @@ -0,0 +1,14 @@ +#include "WindowsHeapWidget.h" +#include "ui_WindowsHeapWidget.h" + +WindowsHeapWidget::WindowsHeapWidget(QWidget *parent) : + QWidget(parent), + ui(new Ui::WindowsHeapWidget) +{ + ui->setupUi(this); +} + +WindowsHeapWidget::~WindowsHeapWidget() +{ + delete ui; +} diff --git a/src/widgets/WindowsHeapWidget.h b/src/widgets/WindowsHeapWidget.h new file mode 100644 index 00000000..aa6a6370 --- /dev/null +++ b/src/widgets/WindowsHeapWidget.h @@ -0,0 +1,22 @@ +#ifndef WINDOWSHEAPWIDGET_H +#define WINDOWSHEAPWIDGET_H + +#include + +namespace Ui { +class WindowsHeapWidget; +} + +class WindowsHeapWidget : public QWidget +{ + Q_OBJECT + +public: + explicit WindowsHeapWidget(QWidget *parent = nullptr); + ~WindowsHeapWidget(); + +private: + Ui::WindowsHeapWidget *ui; +}; + +#endif // WINDOWSHEAPWIDGET_H diff --git a/src/widgets/WindowsHeapWidget.ui b/src/widgets/WindowsHeapWidget.ui new file mode 100644 index 00000000..d00caa18 --- /dev/null +++ b/src/widgets/WindowsHeapWidget.ui @@ -0,0 +1,21 @@ + + + + + WindowsHeapWidget + + + + 0 + 0 + 400 + 300 + + + + Form + + + + +