GUI: remove snowman
This commit is contained in:
parent
bb2a369ce8
commit
17d8f8ea45
|
@ -42,7 +42,6 @@ public:
|
|||
//Public variables
|
||||
void* winId = nullptr;
|
||||
ReferenceManager* referenceManager = nullptr;
|
||||
QWidget* snowmanView = nullptr;
|
||||
bool mIsRunning = false;
|
||||
duint mLastCip = 0;
|
||||
SymbolView* symbolView = nullptr;
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#include "XrefBrowseDialog.h"
|
||||
#include "SourceViewerManager.h"
|
||||
#include "MiscUtil.h"
|
||||
#include "SnowmanView.h"
|
||||
#include "MemoryPage.h"
|
||||
#include "BreakpointMenu.h"
|
||||
#include "BrowseDialog.h"
|
||||
|
@ -321,14 +320,6 @@ void CPUDisassembly::setupRightClickContextMenu()
|
|||
return DbgFunctions()->GetSourceFromAddr(rvaToVa(getInitialSelection()), 0, 0);
|
||||
});
|
||||
|
||||
MenuBuilder* decompileMenu = new MenuBuilder(this);
|
||||
decompileMenu->addAction(makeShortcutAction(DIcon("decompile_selection.png"), tr("Selection"), SLOT(decompileSelectionSlot()), "ActionDecompileSelection"));
|
||||
decompileMenu->addAction(makeShortcutAction(DIcon("decompile_function.png"), tr("Function"), SLOT(decompileFunctionSlot()), "ActionDecompileFunction"), [this](QMenu*)
|
||||
{
|
||||
return DbgFunctionGet(rvaToVa(getInitialSelection()), 0, 0);
|
||||
});
|
||||
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("snowman.png"), tr("Decompile")), decompileMenu);
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("graph.png"), tr("Graph"), SLOT(graphSlot()), "ActionGraph"));
|
||||
|
||||
mMenuBuilder->addMenu(makeMenu(DIcon("help.png"), tr("Help on Symbolic Name")), [this](QMenu * menu)
|
||||
|
@ -1744,29 +1735,6 @@ void CPUDisassembly::openSourceSlot()
|
|||
emit displaySourceManagerWidget();
|
||||
}
|
||||
|
||||
void CPUDisassembly::decompileSelectionSlot()
|
||||
{
|
||||
dsint addr = rvaToVa(getSelectionStart());
|
||||
dsint size = getSelectionSize();
|
||||
emit displaySnowmanWidget();
|
||||
DecompileAt(Bridge::getBridge()->snowmanView, addr, addr + size);
|
||||
}
|
||||
|
||||
void CPUDisassembly::decompileFunctionSlot()
|
||||
{
|
||||
dsint addr = rvaToVa(getInitialSelection());
|
||||
duint start;
|
||||
duint end;
|
||||
if(DbgFunctionGet(addr, &start, &end))
|
||||
{
|
||||
BASIC_INSTRUCTION_INFO info;
|
||||
DbgDisasmFastAt(end, &info);
|
||||
end += info.size - 1;
|
||||
emit displaySnowmanWidget();
|
||||
DecompileAt(Bridge::getBridge()->snowmanView, start, end);
|
||||
}
|
||||
}
|
||||
|
||||
void CPUDisassembly::displayWarningSlot(QString title, QString text)
|
||||
{
|
||||
SimpleWarningBox(this, title, text);
|
||||
|
|
|
@ -32,7 +32,6 @@ signals:
|
|||
void displayReferencesWidget();
|
||||
void displaySourceManagerWidget();
|
||||
void showPatches();
|
||||
void displaySnowmanWidget();
|
||||
void displayLogWidget();
|
||||
void displayGraphWidget();
|
||||
void displaySymbolsWidget();
|
||||
|
@ -90,8 +89,6 @@ public slots:
|
|||
void labelCopySlot();
|
||||
void findCommandSlot();
|
||||
void openSourceSlot();
|
||||
void decompileSelectionSlot();
|
||||
void decompileFunctionSlot();
|
||||
void mnemonicHelpSlot();
|
||||
void mnemonicBriefSlot();
|
||||
void ActionTraceRecordBitSlot();
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "GotoDialog.h"
|
||||
#include "XrefBrowseDialog.h"
|
||||
#include "LineEditDialog.h"
|
||||
#include "SnowmanView.h"
|
||||
#include <vector>
|
||||
#include <QPainter>
|
||||
#include <QScrollBar>
|
||||
|
@ -2229,7 +2228,6 @@ void DisassemblerGraphView::setupContextMenu()
|
|||
});
|
||||
|
||||
mMenuBuilder->addSeparator();
|
||||
mMenuBuilder->addAction(makeShortcutAction(DIcon("snowman.png"), tr("Decompile"), SLOT(decompileSlot()), "ActionGraphDecompile"));
|
||||
mMenuBuilder->addAction(mToggleOverview = makeShortcutAction(DIcon("graph.png"), tr("&Overview"), SLOT(toggleOverviewSlot()), "ActionGraphToggleOverview"), [this](QMenu*)
|
||||
{
|
||||
if(graphZoomMode)
|
||||
|
@ -2530,34 +2528,6 @@ void DisassemblerGraphView::xrefSlot()
|
|||
mXrefDlg->showNormal();
|
||||
}
|
||||
|
||||
void DisassemblerGraphView::decompileSlot()
|
||||
{
|
||||
std::vector<SnowmanRange> ranges;
|
||||
ranges.reserve(currentGraph.nodes.size());
|
||||
|
||||
if(!DbgIsDebugging())
|
||||
return;
|
||||
if(currentGraph.nodes.empty())
|
||||
return;
|
||||
SnowmanRange r;
|
||||
for(const auto & nodeIt : currentGraph.nodes)
|
||||
{
|
||||
const BridgeCFNode & node = nodeIt.second;
|
||||
r.start = node.instrs.empty() ? node.start : node.instrs[0].addr;
|
||||
r.end = node.instrs.empty() ? node.end : node.instrs[node.instrs.size() - 1].addr;
|
||||
BASIC_INSTRUCTION_INFO info;
|
||||
DbgDisasmFastAt(r.end, &info);
|
||||
r.end += info.size - 1;
|
||||
ranges.push_back(r);
|
||||
}
|
||||
std::sort(ranges.begin(), ranges.end(), [](const SnowmanRange & a, const SnowmanRange & b)
|
||||
{
|
||||
return a.start > b.start;
|
||||
});
|
||||
emit displaySnowmanWidget();
|
||||
DecompileRanges(Bridge::getBridge()->snowmanView, ranges.data(), ranges.size());
|
||||
}
|
||||
|
||||
void DisassemblerGraphView::followActionSlot()
|
||||
{
|
||||
QAction* action = qobject_cast<QAction*>(sender());
|
||||
|
|
|
@ -257,9 +257,6 @@ public:
|
|||
|
||||
VaHistory mHistory;
|
||||
|
||||
signals:
|
||||
void displaySnowmanWidget();
|
||||
|
||||
public slots:
|
||||
void loadGraphSlot(BridgeCFGraphList* graph, duint addr);
|
||||
void graphAtSlot(duint addr);
|
||||
|
@ -285,7 +282,6 @@ public slots:
|
|||
void setCommentSlot();
|
||||
void setLabelSlot();
|
||||
void xrefSlot();
|
||||
void decompileSlot();
|
||||
void fitToWindowSlot();
|
||||
void zoomToCursorSlot();
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include "DebugStatusLabel.h"
|
||||
#include "LogStatusLabel.h"
|
||||
#include "SourceViewerManager.h"
|
||||
#include "SnowmanView.h"
|
||||
#include "HandlesView.h"
|
||||
#include "MainWindowCloseThread.h"
|
||||
#include "TimeWastedCounter.h"
|
||||
|
@ -189,14 +188,6 @@ MainWindow::MainWindow(QWidget* parent)
|
|||
mThreadView->setWindowTitle(tr("Threads"));
|
||||
mThreadView->setWindowIcon(DIcon("arrow-threads.png"));
|
||||
|
||||
// Snowman view (decompiler)
|
||||
mSnowmanView = CreateSnowman(this);
|
||||
if(!mSnowmanView)
|
||||
mSnowmanView = new QLabel("<center>Snowman is disabled...</center>", this);
|
||||
mSnowmanView->setWindowTitle(tr("Snowman"));
|
||||
mSnowmanView->setWindowIcon(DIcon("snowman.png"));
|
||||
Bridge::getBridge()->snowmanView = mSnowmanView;
|
||||
|
||||
// Notes manager
|
||||
mNotesManager = new NotesManager(this);
|
||||
mNotesManager->setWindowTitle(tr("Notes"));
|
||||
|
@ -234,7 +225,6 @@ MainWindow::MainWindow(QWidget* parent)
|
|||
mWidgetList.push_back(WidgetInfo(mSourceViewManager, "SourceTab"));
|
||||
mWidgetList.push_back(WidgetInfo(mReferenceManager, "ReferencesTab"));
|
||||
mWidgetList.push_back(WidgetInfo(mThreadView, "ThreadsTab"));
|
||||
mWidgetList.push_back(WidgetInfo(mSnowmanView, "SnowmanTab"));
|
||||
mWidgetList.push_back(WidgetInfo(mHandlesView, "HandlesTab"));
|
||||
mWidgetList.push_back(WidgetInfo(mTraceBrowser, "TraceTab"));
|
||||
|
||||
|
@ -322,7 +312,6 @@ MainWindow::MainWindow(QWidget* parent)
|
|||
connect(ui->actionChangeCommandLine, SIGNAL(triggered()), this, SLOT(changeCommandLine()));
|
||||
connect(ui->actionManual, SIGNAL(triggered()), this, SLOT(displayManual()));
|
||||
connect(ui->actionNotes, SIGNAL(triggered()), this, SLOT(displayNotesWidget()));
|
||||
connect(ui->actionSnowman, SIGNAL(triggered()), this, SLOT(displaySnowmanWidget()));
|
||||
connect(ui->actionHandles, SIGNAL(triggered()), this, SLOT(displayHandlesWidget()));
|
||||
connect(ui->actionGraph, SIGNAL(triggered()), this, SLOT(displayGraphWidget()));
|
||||
connect(ui->actionPreviousTab, SIGNAL(triggered()), this, SLOT(displayPreviousTab()));
|
||||
|
@ -345,13 +334,11 @@ MainWindow::MainWindow(QWidget* parent)
|
|||
connect(mCpuWidget->getDisasmWidget(), SIGNAL(updateWindowTitle(QString)), this, SLOT(updateWindowTitleSlot(QString)));
|
||||
connect(mCpuWidget->getDisasmWidget(), SIGNAL(displayReferencesWidget()), this, SLOT(displayReferencesWidget()));
|
||||
connect(mCpuWidget->getDisasmWidget(), SIGNAL(displaySourceManagerWidget()), this, SLOT(displaySourceViewWidget()));
|
||||
connect(mCpuWidget->getDisasmWidget(), SIGNAL(displaySnowmanWidget()), this, SLOT(displaySnowmanWidget()));
|
||||
connect(mCpuWidget->getDisasmWidget(), SIGNAL(displayLogWidget()), this, SLOT(displayLogWidget()));
|
||||
connect(mCpuWidget->getDisasmWidget(), SIGNAL(displayGraphWidget()), this, SLOT(displayGraphWidget()));
|
||||
connect(mCpuWidget->getDisasmWidget(), SIGNAL(displaySymbolsWidget()), this, SLOT(displaySymbolWidget()));
|
||||
connect(mCpuWidget->getDisasmWidget(), SIGNAL(showPatches()), this, SLOT(patchWindow()));
|
||||
|
||||
connect(mGraphView, SIGNAL(displaySnowmanWidget()), this, SLOT(displaySnowmanWidget()));
|
||||
|
||||
connect(mCpuWidget->getDumpWidget(), SIGNAL(displayReferencesWidget()), this, SLOT(displayReferencesWidget()));
|
||||
|
||||
|
@ -520,7 +507,6 @@ void MainWindow::closeEvent(QCloseEvent* event)
|
|||
if(bExecuteThread)
|
||||
{
|
||||
bExecuteThread = false;
|
||||
CloseSnowman(mSnowmanView);
|
||||
Sleep(100);
|
||||
mCloseThread->start();
|
||||
emit Bridge::getBridge()->close();
|
||||
|
@ -717,7 +703,6 @@ void MainWindow::refreshShortcuts()
|
|||
setGlobalShortcut(ui->actionBookmarks, ConfigShortcut("ViewBookmarks"));
|
||||
setGlobalShortcut(ui->actionFunctions, ConfigShortcut("ViewFunctions"));
|
||||
setGlobalShortcut(ui->actionVariables, ConfigShortcut("ViewVariables"));
|
||||
setGlobalShortcut(ui->actionSnowman, ConfigShortcut("ViewSnowman"));
|
||||
setGlobalShortcut(ui->actionHandles, ConfigShortcut("ViewHandles"));
|
||||
setGlobalShortcut(ui->actionGraph, ConfigShortcut("ViewGraph"));
|
||||
setGlobalShortcut(ui->actionPreviousTab, ConfigShortcut("ViewPreviousTab"));
|
||||
|
@ -988,11 +973,6 @@ void MainWindow::displayThreadsWidget()
|
|||
showQWidgetTab(mThreadView);
|
||||
}
|
||||
|
||||
void MainWindow::displaySnowmanWidget()
|
||||
{
|
||||
showQWidgetTab(mSnowmanView);
|
||||
}
|
||||
|
||||
void MainWindow::displayGraphWidget()
|
||||
{
|
||||
showQWidgetTab(mGraphView);
|
||||
|
|
|
@ -86,7 +86,6 @@ public slots:
|
|||
void displaySourceViewWidget();
|
||||
void displayReferencesWidget();
|
||||
void displayThreadsWidget();
|
||||
void displaySnowmanWidget();
|
||||
void displayVariables();
|
||||
void displayGraphWidget();
|
||||
void displayRunTrace();
|
||||
|
@ -176,7 +175,6 @@ private:
|
|||
ThreadView* mThreadView;
|
||||
PatchDialog* mPatchDialog;
|
||||
CalculatorDialog* mCalculatorDialog;
|
||||
QWidget* mSnowmanView;
|
||||
HandlesView* mHandlesView;
|
||||
NotesManager* mNotesManager;
|
||||
DisassemblerGraphView* mGraphView;
|
||||
|
|
|
@ -69,7 +69,6 @@
|
|||
<addaction name="actionSource"/>
|
||||
<addaction name="actionReferences"/>
|
||||
<addaction name="actionThreads"/>
|
||||
<addaction name="actionSnowman"/>
|
||||
<addaction name="actionHandles"/>
|
||||
<addaction name="actionGraph"/>
|
||||
<addaction name="actionTrace"/>
|
||||
|
@ -817,15 +816,6 @@
|
|||
<string>Notes</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSnowman">
|
||||
<property name="icon">
|
||||
<iconset resource="../../resource.qrc">
|
||||
<normaloff>:/icons/images/snowman.png</normaloff>:/icons/images/snowman.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Snowman</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionHandles">
|
||||
<property name="icon">
|
||||
<iconset resource="../../resource.qrc">
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
#ifndef SNOWMANVIEW_H
|
||||
#define SNOWMANVIEW_H
|
||||
|
||||
class QWidget;
|
||||
|
||||
struct SnowmanRange
|
||||
{
|
||||
duint start;
|
||||
duint end;
|
||||
};
|
||||
|
||||
extern "C" __declspec(dllimport) QWidget* CreateSnowman(QWidget* parent);
|
||||
extern "C" __declspec(dllimport) void DecompileAt(QWidget* snowman, dsint start, dsint end);
|
||||
extern "C" __declspec(dllimport) void DecompileRanges(QWidget* snowman, const SnowmanRange* ranges, duint count);
|
||||
extern "C" __declspec(dllimport) void CloseSnowman(QWidget* snowman);
|
||||
|
||||
#endif // SNOWMANVIEW_H
|
Binary file not shown.
Binary file not shown.
|
@ -354,7 +354,7 @@ Configuration::Configuration() : QObject(), noMoreMsgbox(false)
|
|||
tabOrderUint.insert("SourceTab", curTab++);
|
||||
tabOrderUint.insert("ReferencesTab", curTab++);
|
||||
tabOrderUint.insert("ThreadsTab", curTab++);
|
||||
tabOrderUint.insert("SnowmanTab", curTab++);
|
||||
curTab++; // removed SnowmanTab
|
||||
tabOrderUint.insert("HandlesTab", curTab++);
|
||||
tabOrderUint.insert("TraceTab", curTab++);
|
||||
defaultUints.insert("TabOrder", tabOrderUint);
|
||||
|
@ -398,7 +398,6 @@ Configuration::Configuration() : QObject(), noMoreMsgbox(false)
|
|||
defaultShortcuts.insert("ViewBookmarks", Shortcut({tr("View"), tr("Bookmarks")}, "Ctrl+Alt+B", true));
|
||||
defaultShortcuts.insert("ViewFunctions", Shortcut({tr("View"), tr("Functions")}, "Ctrl+Alt+F", true));
|
||||
defaultShortcuts.insert("ViewVariables", Shortcut({tr("View"), tr("Variables")}, "", true));
|
||||
defaultShortcuts.insert("ViewSnowman", Shortcut({tr("View"), tr("Snowman")}, "", true));
|
||||
defaultShortcuts.insert("ViewHandles", Shortcut({tr("View"), tr("Handles")}, "", true));
|
||||
defaultShortcuts.insert("ViewGraph", Shortcut({tr("View"), tr("Graph")}, "Alt+G", true));
|
||||
defaultShortcuts.insert("ViewPreviousTab", Shortcut({tr("View"), tr("Previous Tab")}, "Alt+Left"));
|
||||
|
@ -508,8 +507,6 @@ Configuration::Configuration() : QObject(), noMoreMsgbox(false)
|
|||
defaultShortcuts.insert("ActionToggleDestinationPreview", Shortcut({tr("Actions"), tr("Enable/Disable Branch Destination Preview")}, "P"));
|
||||
defaultShortcuts.insert("ActionFind", Shortcut({tr("Actions"), tr("Find")}, "Ctrl+F"));
|
||||
defaultShortcuts.insert("ActionFindInModule", Shortcut({tr("Actions"), tr("Find in Current Module")}, "Ctrl+Shift+F"));
|
||||
defaultShortcuts.insert("ActionDecompileFunction", Shortcut({tr("Actions"), tr("Decompile Function")}, "F5"));
|
||||
defaultShortcuts.insert("ActionDecompileSelection", Shortcut({tr("Actions"), tr("Decompile Selection")}, "Shift+F5"));
|
||||
defaultShortcuts.insert("ActionEditBreakpoint", Shortcut({tr("Actions"), tr("Edit breakpoint")}, ""));
|
||||
defaultShortcuts.insert("ActionToggleLogging", Shortcut({tr("Actions"), tr("Enable/Disable Logging")}, ""));
|
||||
defaultShortcuts.insert("ActionAllocateMemory", Shortcut({tr("Actions"), tr("Allocate Memory")}, ""));
|
||||
|
@ -587,7 +584,6 @@ Configuration::Configuration() : QObject(), noMoreMsgbox(false)
|
|||
defaultShortcuts.insert("ActionGraphToggleOverview", Shortcut({tr("Actions"), tr("Graph"), tr("Toggle overview")}, "O"));
|
||||
defaultShortcuts.insert("ActionGraphToggleSummary", Shortcut({tr("Actions"), tr("Graph"), tr("Toggle summary")}, "U"));
|
||||
defaultShortcuts.insert("ActionGraphSyncOrigin", Shortcut({tr("Actions"), tr("Graph"), tr("Toggle sync with origin")}, "S"));
|
||||
defaultShortcuts.insert("ActionGraphDecompile", Shortcut({tr("Actions"), tr("Graph"), tr("Decompile")}, "Tab"));
|
||||
defaultShortcuts.insert("ActionIncrementx87Stack", Shortcut({tr("Actions"), tr("Increment x87 Stack")}));
|
||||
defaultShortcuts.insert("ActionDecrementx87Stack", Shortcut({tr("Actions"), tr("Decrement x87 Stack")}));
|
||||
defaultShortcuts.insert("ActionPush", Shortcut({tr("Actions"), tr("Push")}));
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 835 B |
|
@ -60,7 +60,6 @@
|
|||
<file>images/search-for.png</file>
|
||||
<file>images/highlight.png</file>
|
||||
<file>images/label.png</file>
|
||||
<file>images/snowman.png</file>
|
||||
<file>images/notes.png</file>
|
||||
<file>images/win-help.png</file>
|
||||
<file>images/faq.png</file>
|
||||
|
@ -181,8 +180,6 @@
|
|||
<file>images/copy_selection_no_bytes.png</file>
|
||||
<file>images/copy_table_line.png</file>
|
||||
<file>images/copyfilepath.png</file>
|
||||
<file>images/decompile_function.png</file>
|
||||
<file>images/decompile_selection.png</file>
|
||||
<file>images/download_symbols.png</file>
|
||||
<file>images/entrypoint.png</file>
|
||||
<file>images/follow_entrypoint.png</file>
|
||||
|
|
|
@ -65,7 +65,6 @@ INCLUDEPATH += \
|
|||
Src/Bridge \
|
||||
Src/Global \
|
||||
Src/Utils \
|
||||
Src/ThirdPartyLibs/snowman \
|
||||
Src/ThirdPartyLibs/ldconvert \
|
||||
../zydis_wrapper \
|
||||
../zydis_wrapper/zydis/include
|
||||
|
@ -353,13 +352,11 @@ LIBS += -luser32 -ladvapi32 -lwinmm -lshell32
|
|||
!contains(QMAKE_HOST.arch, x86_64) {
|
||||
# Windows x86 (32bit) specific build
|
||||
LIBS += -L"$$PWD/../zydis_wrapper/bin/x32$${DIR_SUFFIX}" -lzydis_wrapper
|
||||
LIBS += -L"$$PWD/Src/ThirdPartyLibs/snowman" -lsnowman_x86
|
||||
LIBS += -L"$$PWD/Src/ThirdPartyLibs/ldconvert" -lldconvert_x86
|
||||
LIBS += -L"$${X64_BIN_DIR}" -lx32bridge
|
||||
} else {
|
||||
# Windows x64 (64bit) specific build
|
||||
LIBS += -L"$$PWD/../zydis_wrapper/bin/x64$${DIR_SUFFIX}" -lzydis_wrapper
|
||||
LIBS += -L"$$PWD/Src/ThirdPartyLibs/snowman" -lsnowman_x64
|
||||
LIBS += -L"$$PWD/Src/ThirdPartyLibs/ldconvert" -lldconvert_x64
|
||||
LIBS += -L"$${X64_BIN_DIR}" -lx64bridge
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue