Permalink
Browse files

DBG+GUI+PROJECT: switched to Qt 5.6.0 (check the wiki for an updated …

…compile guide)
  • Loading branch information...
1 parent 69aa29f commit cd0fe880da676bdee4695b21559e3a3f6727ece7 @mrexodia mrexodia committed Jun 2, 2016
View
@@ -7,47 +7,53 @@ echo qt_base
mkdir %RELEASEDIR%\qt_base
mkdir %RELEASEDIR%\qt_base\x32
+mkdir %RELEASEDIR%\qt_base\x32\platforms
mkdir %RELEASEDIR%\qt_base\x64
-
-copy bin\x32\QtCore4.dll %RELEASEDIR%\qt_base\x32\QtCore4.dll
-copy bin\x32\QtGui4.dll %RELEASEDIR%\qt_base\x32\QtGui4.dll
-copy bin\x32\QtNetwork4.dll %RELEASEDIR%\qt_base\x32\QtNetwork4.dll
-copy bin\x64\QtCore4.dll %RELEASEDIR%\qt_base\x64\QtCore4.dll
-copy bin\x64\QtGui4.dll %RELEASEDIR%\qt_base\x64\QtGui4.dll
-copy bin\x64\QtNetwork4.dll %RELEASEDIR%\qt_base\x64\QtNetwork4.dll
+mkdir %RELEASEDIR%\qt_base\x64\platforms
+
+copy bin\x32\Qt5Core.dll %RELEASEDIR%\qt_base\x32\
+copy bin\x32\Qt5Gui.dll %RELEASEDIR%\qt_base\x32\
+copy bin\x32\Qt5Widgets.dll %RELEASEDIR%\qt_base\x32\
+copy bin\x32\Qt5Network.dll %RELEASEDIR%\qt_base\x32\
+copy bin\x32\platforms\qwindows.dll %RELEASEDIR%\qt_base\x32\platforms\
+copy bin\x64\Qt5Core.dll %RELEASEDIR%\qt_base\x64\
+copy bin\x64\Qt5Gui.dll %RELEASEDIR%\qt_base\x64\
+copy bin\x64\Qt5Widgets.dll %RELEASEDIR%\qt_base\x64\
+copy bin\x64\Qt5Network.dll %RELEASEDIR%\qt_base\x64\
+copy bin\x64\platforms\qwindows.dll %RELEASEDIR%\qt_base\x64\platforms\
echo bin_base
mkdir %RELEASEDIR%\bin_base
mkdir %RELEASEDIR%\bin_base\x32
mkdir %RELEASEDIR%\bin_base\x64
-copy bin\x32\x32_bridge.dll %RELEASEDIR%\bin_base\x32\x32_bridge.dll
-copy bin\x32\x32_dbg.dll %RELEASEDIR%\bin_base\x32\x32_dbg.dll
-copy bin\x32\capstone.dll %RELEASEDIR%\bin_base\x32\capstone.dll
-copy bin\x32\dbghelp.dll %RELEASEDIR%\bin_base\x32\dbghelp.dll
-copy bin\x32\symsrv.dll %RELEASEDIR%\bin_base\x32\symsrv.dll
-copy bin\x32\DeviceNameResolver.dll %RELEASEDIR%\bin_base\x32\DeviceNameResolver.dll
-copy bin\x32\Scylla.dll %RELEASEDIR%\bin_base\x32\Scylla.dll
-copy bin\x32\jansson.dll %RELEASEDIR%\bin_base\x32\jansson.dll
-copy bin\x32\lz4.dll %RELEASEDIR%\bin_base\x32\lz4.dll
-copy bin\x32\TitanEngine.dll %RELEASEDIR%\bin_base\x32\TitanEngine.dll
-copy bin\x32\XEDParse.dll %RELEASEDIR%\bin_base\x32\XEDParse.dll
-copy bin\x32\yara.dll %RELEASEDIR%\bin_base\x32\yara.dll
-copy bin\x32\snowman.dll %RELEASEDIR%\bin_base\x32\snowman.dll
-copy bin\x64\x64_bridge.dll %RELEASEDIR%\bin_base\x64\x64_bridge.dll
-copy bin\x64\x64_dbg.dll %RELEASEDIR%\bin_base\x64\x64_dbg.dll
-copy bin\x64\capstone.dll %RELEASEDIR%\bin_base\x64\capstone.dll
-copy bin\x64\dbghelp.dll %RELEASEDIR%\bin_base\x64\dbghelp.dll
-copy bin\x64\symsrv.dll %RELEASEDIR%\bin_base\x64\symsrv.dll
-copy bin\x64\DeviceNameResolver.dll %RELEASEDIR%\bin_base\x64\DeviceNameResolver.dll
-copy bin\x64\Scylla.dll %RELEASEDIR%\bin_base\x64\Scylla.dll
-copy bin\x64\jansson.dll %RELEASEDIR%\bin_base\x64\jansson.dll
-copy bin\x64\lz4.dll %RELEASEDIR%\bin_base\x64\lz4.dll
-copy bin\x64\TitanEngine.dll %RELEASEDIR%\bin_base\x64\TitanEngine.dll
-copy bin\x64\XEDParse.dll %RELEASEDIR%\bin_base\x64\XEDParse.dll
-copy bin\x64\yara.dll %RELEASEDIR%\bin_base\x64\yara.dll
-copy bin\x64\snowman.dll %RELEASEDIR%\bin_base\x64\snowman.dll
+copy bin\x32\x32_bridge.dll %RELEASEDIR%\bin_base\x32\
+copy bin\x32\x32_dbg.dll %RELEASEDIR%\bin_base\x32\
+copy bin\x32\capstone.dll %RELEASEDIR%\bin_base\x32\
+copy bin\x32\dbghelp.dll %RELEASEDIR%\bin_base\x32\
+copy bin\x32\symsrv.dll %RELEASEDIR%\bin_base\x32\
+copy bin\x32\DeviceNameResolver.dll %RELEASEDIR%\bin_base\x32\
+copy bin\x32\Scylla.dll %RELEASEDIR%\bin_base\x32\
+copy bin\x32\jansson.dll %RELEASEDIR%\bin_base\x32\
+copy bin\x32\lz4.dll %RELEASEDIR%\bin_base\x32\
+copy bin\x32\TitanEngine.dll %RELEASEDIR%\bin_base\x32\
+copy bin\x32\XEDParse.dll %RELEASEDIR%\bin_base\x32\
+copy bin\x32\yara.dll %RELEASEDIR%\bin_base\x32\
+copy bin\x32\snowman.dll %RELEASEDIR%\bin_base\x32\
+copy bin\x64\x64_bridge.dll %RELEASEDIR%\bin_base\x64\
+copy bin\x64\x64_dbg.dll %RELEASEDIR%\bin_base\x64\
+copy bin\x64\capstone.dll %RELEASEDIR%\bin_base\x64\
+copy bin\x64\dbghelp.dll %RELEASEDIR%\bin_base\x64\
+copy bin\x64\symsrv.dll %RELEASEDIR%\bin_base\x64\
+copy bin\x64\DeviceNameResolver.dll %RELEASEDIR%\bin_base\x64\
+copy bin\x64\Scylla.dll %RELEASEDIR%\bin_base\x64\
+copy bin\x64\jansson.dll %RELEASEDIR%\bin_base\x64\
+copy bin\x64\lz4.dll %RELEASEDIR%\bin_base\x64\
+copy bin\x64\TitanEngine.dll %RELEASEDIR%\bin_base\x64\
+copy bin\x64\XEDParse.dll %RELEASEDIR%\bin_base\x64\
+copy bin\x64\yara.dll %RELEASEDIR%\bin_base\x64\
+copy bin\x64\snowman.dll %RELEASEDIR%\bin_base\x64\
echo help
@@ -118,22 +124,22 @@ mkdir %RELEASEDIR%\release\x64
copy bin\x96dbg.exe %RELEASEDIR%\release\x96dbg.exe
copy bin\mnemdb.json %RELEASEDIR%\release\mnemdb.json
xcopy src\gui\Translations\*.qm %RELEASEDIR%\release\translations /S /Y
-copy bin\x32\x32bridge.dll %RELEASEDIR%\release\x32\x32bridge.dll
-copy bin\x32\x32bridge.pdb %RELEASEDIR%\release\x32\x32bridge.pdb
-copy bin\x32\x32dbg.dll %RELEASEDIR%\release\x32\x32dbg.dll
-copy bin\x32\x32dbg.pdb %RELEASEDIR%\release\x32\x32dbg.pdb
-copy bin\x32\x32dbg.exe %RELEASEDIR%\release\x32\x32dbg.exe
-copy bin\x32\x32dbg_exe.pdb %RELEASEDIR%\release\x32\x32dbg_exe.pdb
-copy bin\x32\x32gui.dll %RELEASEDIR%\release\x32\x32gui.dll
-copy bin\x32\x32gui.pdb %RELEASEDIR%\release\x32\x32gui.pdb
-copy bin\x64\x64bridge.dll %RELEASEDIR%\release\x64\x64bridge.dll
-copy bin\x64\x64bridge.pdb %RELEASEDIR%\release\x64\x64bridge.pdb
-copy bin\x64\x64dbg.dll %RELEASEDIR%\release\x64\x64dbg.dll
-copy bin\x64\x64dbg.pdb %RELEASEDIR%\release\x64\x64dbg.pdb
-copy bin\x64\x64dbg.exe %RELEASEDIR%\release\x64\x64dbg.exe
-copy bin\x64\x64dbg_exe.pdb %RELEASEDIR%\release\x64\x64dbg_exe.pdb
-copy bin\x64\x64gui.dll %RELEASEDIR%\release\x64\x64gui.dll
-copy bin\x64\x64gui.pdb %RELEASEDIR%\release\x64\x64gui.pdb
+copy bin\x32\x32bridge.dll %RELEASEDIR%\release\x32\
+copy bin\x32\x32bridge.pdb %RELEASEDIR%\release\x32\
+copy bin\x32\x32dbg.dll %RELEASEDIR%\release\x32\
+copy bin\x32\x32dbg.pdb %RELEASEDIR%\release\x32\
+copy bin\x32\x32dbg.exe %RELEASEDIR%\release\x32\
+copy bin\x32\x32dbg_exe.pdb %RELEASEDIR%\release\x32\
+copy bin\x32\x32gui.dll %RELEASEDIR%\release\x32\
+copy bin\x32\x32gui.pdb %RELEASEDIR%\release\x32\
+copy bin\x64\x64bridge.dll %RELEASEDIR%\release\x64\
+copy bin\x64\x64bridge.pdb %RELEASEDIR%\release\x64\
+copy bin\x64\x64dbg.dll %RELEASEDIR%\release\x64\
+copy bin\x64\x64dbg.pdb %RELEASEDIR%\release\x64\
+copy bin\x64\x64dbg.exe %RELEASEDIR%\release\x64\
+copy bin\x64\x64dbg_exe.pdb %RELEASEDIR%\release\x64\
+copy bin\x64\x64gui.dll %RELEASEDIR%\release\x64\
+copy bin\x64\x64gui.pdb %RELEASEDIR%\release\x64\
xcopy %RELEASEDIR%\qt_base %RELEASEDIR%\release /S /Y
xcopy %RELEASEDIR%\bin_base %RELEASEDIR%\release /S /Y
View
@@ -2,9 +2,9 @@
if "%OLDPATH%"=="" set OLDPATH=%PATH%
-if "%QT32PATH%"=="" set QT32PATH=c:\Qt\qt-4.8.6-x86-msvc2013\qt-4.8.6-x86-msvc2013\bin
-if "%QT64PATH%"=="" set QT64PATH=c:\Qt\qt-4.8.6-x64-msvc2013\qt-4.8.6-x64-msvc2013\bin
-if "%QTCREATORPATH%"=="" set QTCREATORPATH=c:\Qt\qtcreator-3.1.1\bin
+if "%QT32PATH%"=="" set QT32PATH=c:\Qt\qt-5.6.0-x86-msvc2013\5.6\msvc2013\bin
+if "%QT64PATH%"=="" set QT64PATH=c:\Qt\qt-5.6.0-x64-msvc2013\5.6\msvc2013_64\bin
+if "%QTCREATORPATH%"=="" set QTCREATORPATH=c:\Qt\qtcreator-4.0.0\bin
if "%VSVARSALLPATH%"=="" set VSVARSALLPATH=c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat
if "%COVERITYPATH%"=="" set COVERITYPATH=c:\coverity\bin
if "%DOXYGENPATH%"=="" set DOXYGENPATH=C:\Program Files\doxygen\bin
View
@@ -589,69 +589,78 @@ extern "C" DLL_EXPORT duint _dbg_getbranchdestination(duint addr)
if(!cp.Disassemble(addr, data))
return 0;
if(cp.InGroup(CS_GRP_JUMP) || cp.InGroup(CS_GRP_CALL) || cp.IsLoop())
- return cp.ResolveOpValue(0, [](x86_reg reg) -> size_t
{
- switch(reg)
+ auto opValue = cp.ResolveOpValue(0, [](x86_reg reg) -> size_t
{
+ switch(reg)
+ {
#ifndef _WIN64 //x32
- case X86_REG_EAX:
- return GetContextDataEx(hActiveThread, UE_EAX);
- case X86_REG_EBX:
- return GetContextDataEx(hActiveThread, UE_EBX);
- case X86_REG_ECX:
- return GetContextDataEx(hActiveThread, UE_ECX);
- case X86_REG_EDX:
- return GetContextDataEx(hActiveThread, UE_EDX);
- case X86_REG_EBP:
- return GetContextDataEx(hActiveThread, UE_EBP);
- case X86_REG_ESP:
- return GetContextDataEx(hActiveThread, UE_ESP);
- case X86_REG_ESI:
- return GetContextDataEx(hActiveThread, UE_ESI);
- case X86_REG_EDI:
- return GetContextDataEx(hActiveThread, UE_EDI);
- case X86_REG_EIP:
- return GetContextDataEx(hActiveThread, UE_EIP);
+ case X86_REG_EAX:
+ return GetContextDataEx(hActiveThread, UE_EAX);
+ case X86_REG_EBX:
+ return GetContextDataEx(hActiveThread, UE_EBX);
+ case X86_REG_ECX:
+ return GetContextDataEx(hActiveThread, UE_ECX);
+ case X86_REG_EDX:
+ return GetContextDataEx(hActiveThread, UE_EDX);
+ case X86_REG_EBP:
+ return GetContextDataEx(hActiveThread, UE_EBP);
+ case X86_REG_ESP:
+ return GetContextDataEx(hActiveThread, UE_ESP);
+ case X86_REG_ESI:
+ return GetContextDataEx(hActiveThread, UE_ESI);
+ case X86_REG_EDI:
+ return GetContextDataEx(hActiveThread, UE_EDI);
+ case X86_REG_EIP:
+ return GetContextDataEx(hActiveThread, UE_EIP);
#else //x64
- case X86_REG_RAX:
- return GetContextDataEx(hActiveThread, UE_RAX);
- case X86_REG_RBX:
- return GetContextDataEx(hActiveThread, UE_RBX);
- case X86_REG_RCX:
- return GetContextDataEx(hActiveThread, UE_RCX);
- case X86_REG_RDX:
- return GetContextDataEx(hActiveThread, UE_RDX);
- case X86_REG_RBP:
- return GetContextDataEx(hActiveThread, UE_RBP);
- case X86_REG_RSP:
- return GetContextDataEx(hActiveThread, UE_RSP);
- case X86_REG_RSI:
- return GetContextDataEx(hActiveThread, UE_RSI);
- case X86_REG_RDI:
- return GetContextDataEx(hActiveThread, UE_RDI);
- case X86_REG_RIP:
- return GetContextDataEx(hActiveThread, UE_RIP);
- case X86_REG_R8:
- return GetContextDataEx(hActiveThread, UE_R8);
- case X86_REG_R9:
- return GetContextDataEx(hActiveThread, UE_R9);
- case X86_REG_R10:
- return GetContextDataEx(hActiveThread, UE_R10);
- case X86_REG_R11:
- return GetContextDataEx(hActiveThread, UE_R11);
- case X86_REG_R12:
- return GetContextDataEx(hActiveThread, UE_R12);
- case X86_REG_R13:
- return GetContextDataEx(hActiveThread, UE_R13);
- case X86_REG_R14:
- return GetContextDataEx(hActiveThread, UE_R14);
- case X86_REG_R15:
- return GetContextDataEx(hActiveThread, UE_R15);
+ case X86_REG_RAX:
+ return GetContextDataEx(hActiveThread, UE_RAX);
+ case X86_REG_RBX:
+ return GetContextDataEx(hActiveThread, UE_RBX);
+ case X86_REG_RCX:
+ return GetContextDataEx(hActiveThread, UE_RCX);
+ case X86_REG_RDX:
+ return GetContextDataEx(hActiveThread, UE_RDX);
+ case X86_REG_RBP:
+ return GetContextDataEx(hActiveThread, UE_RBP);
+ case X86_REG_RSP:
+ return GetContextDataEx(hActiveThread, UE_RSP);
+ case X86_REG_RSI:
+ return GetContextDataEx(hActiveThread, UE_RSI);
+ case X86_REG_RDI:
+ return GetContextDataEx(hActiveThread, UE_RDI);
+ case X86_REG_RIP:
+ return GetContextDataEx(hActiveThread, UE_RIP);
+ case X86_REG_R8:
+ return GetContextDataEx(hActiveThread, UE_R8);
+ case X86_REG_R9:
+ return GetContextDataEx(hActiveThread, UE_R9);
+ case X86_REG_R10:
+ return GetContextDataEx(hActiveThread, UE_R10);
+ case X86_REG_R11:
+ return GetContextDataEx(hActiveThread, UE_R11);
+ case X86_REG_R12:
+ return GetContextDataEx(hActiveThread, UE_R12);
+ case X86_REG_R13:
+ return GetContextDataEx(hActiveThread, UE_R13);
+ case X86_REG_R14:
+ return GetContextDataEx(hActiveThread, UE_R14);
+ case X86_REG_R15:
+ return GetContextDataEx(hActiveThread, UE_R15);
#endif //_WIN64
- default:
- return 0;
+ default:
+ return 0;
+ }
+ });
+ if(cp[0].type == X86_OP_MEM)
+ {
+ if(MemRead(opValue, &opValue, sizeof(opValue)))
+ return opValue;
}
- });
+ else
+ return opValue;
+ }
if(cp.InGroup(CS_GRP_RET))
{
auto csp = GetContextDataEx(hActiveThread, UE_CSP);
@@ -10,9 +10,7 @@ AppearanceDialog::AppearanceDialog(QWidget* parent) : QDialog(parent), ui(new Ui
ui->setupUi(this);
//set window flags
setModal(true);
-#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
- setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint);
-#endif
+ setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
setFixedSize(this->size()); //fixed size
//Colors
colorMap = &Config()->Colors;
@@ -11,10 +11,7 @@ AssembleDialog::AssembleDialog(QWidget* parent) :
ui->setupUi(this);
setModal(true);
setFixedSize(this->size()); //fixed size
-
-#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
- setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint);
-#endif
+ setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
mSelectedInstrVa = 0;
bKeepSizeChecked = false;
@@ -6,9 +6,7 @@
AttachDialog::AttachDialog(QWidget* parent) : QDialog(parent), ui(new Ui::AttachDialog)
{
ui->setupUi(this);
-#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
- setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint);
-#endif
+ setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
// Setup actions/shortcuts
//
@@ -223,6 +223,7 @@ void CPUArgumentWidget::setupTable()
{
connect(mTable, SIGNAL(contextMenuSignal(QPoint)), this, SLOT(contextMenuSlot(QPoint)));
mTable->verticalScrollBar()->setStyleSheet(ConfigVScrollBarStyle());
+ mTable->horizontalScrollBar()->setStyleSheet(ConfigHScrollBarStyle());
mTable->enableMultiSelection(false);
mTable->setShowHeader(false);
mTable->addColumnAt(0, "", false);
@@ -4,9 +4,7 @@
CalculatorDialog::CalculatorDialog(QWidget* parent) : QDialog(parent), ui(new Ui::CalculatorDialog)
{
ui->setupUi(this);
-#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
- setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint);
-#endif
+ setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
setFixedSize(this->size()); //fixed size
connect(this, SIGNAL(validAddress(bool)), ui->btnGoto, SLOT(setEnabled(bool)));
connect(this, SIGNAL(validAddress(bool)), ui->btnGotoDump, SLOT(setEnabled(bool)));
@@ -1,15 +1,14 @@
#include "CloseDialog.h"
#include "ui_CloseDialog.h"
+#include "MiscUtil.h"
CloseDialog::CloseDialog(QWidget* parent) : QDialog(parent), ui(new Ui::CloseDialog)
{
ui->setupUi(this);
setModal(true);
-#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
- setWindowFlags((Qt::Tool | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint) & ~Qt::WindowCloseButtonHint);
-#endif
+ setWindowFlags(windowFlags() & ~(Qt::WindowContextHelpButtonHint | Qt::WindowCloseButtonHint) | Qt::MSWindowsFixedSizeDialogHint);
setFixedSize(this->size()); //fixed size
- //setWindowFlags(((windowFlags() | Qt::CustomizeWindowHint) & ~Qt::WindowCloseButtonHint));
+ SetApplicationIcon(QDialog::winId());
bCanClose = false;
}
@@ -5,9 +5,7 @@
DataCopyDialog::DataCopyDialog(const QVector<byte_t>* data, QWidget* parent) : QDialog(parent), ui(new Ui::DataCopyDialog)
{
ui->setupUi(this);
-#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
- setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint);
-#endif
+ setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
setFixedSize(this->size()); //fixed size
mData = data;
@@ -8,9 +8,7 @@ EditBreakpointDialog::EditBreakpointDialog(QWidget* parent, const BRIDGEBP & bp)
mBp(bp)
{
ui->setupUi(this);
-#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
- setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint);
-#endif
+ setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::MSWindowsFixedSizeDialogHint);
setFixedSize(this->size()); //fixed size
setWindowTitle(QString("Edit Breakpoint %1").arg(ToHexString(bp.addr)));
setWindowIcon(QIcon(":/icons/images/breakpoint.png"));
Oops, something went wrong.

0 comments on commit cd0fe88

Please sign in to comment.