BRIDGE: added GuiUpdateDumpView
DBG: fixed a bug with the refreshing moment GUI: added updateDump GUI: removed global goto window GUI: removed ugly context menu
This commit is contained in:
parent
8a54713db9
commit
082afb92f4
|
@ -580,6 +580,7 @@ BRIDGE_IMPEXP void GuiUpdateAllViews()
|
|||
GuiUpdateRegisterView();
|
||||
GuiUpdateDisassemblyView();
|
||||
GuiUpdateBreakpointsView();
|
||||
GuiUpdateDumpView();
|
||||
}
|
||||
|
||||
BRIDGE_IMPEXP void GuiUpdateRegisterView()
|
||||
|
@ -731,6 +732,11 @@ BRIDGE_IMPEXP void GuiStackDumpAt(duint addr, duint csp)
|
|||
_gui_sendmessage(GUI_STACK_DUMP_AT, (void*)addr, (void*)csp);
|
||||
}
|
||||
|
||||
BRIDGE_IMPEXP void GuiUpdateDumpView()
|
||||
{
|
||||
_gui_sendmessage(GUI_UPDATE_DUMP_VIEW, 0, 0);
|
||||
}
|
||||
|
||||
//Main
|
||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||
{
|
||||
|
|
|
@ -375,8 +375,9 @@ enum GUIMSG
|
|||
GUI_REF_GETCELLCONTENT, // param1=int row, param2=int col
|
||||
GUI_REF_RELOADDATA, // param1=unused, param2=unused
|
||||
GUI_REF_SETSINGLESELECTION, // param1=int index, param2=bool scroll
|
||||
GUI_REF_SETPROGRESS, // param1=int progress, param2=unused
|
||||
GUI_STACK_DUMP_AT // param1=duint addr, param2=duint csp
|
||||
GUI_REF_SETPROGRESS, // param1=int progress, param2=unused
|
||||
GUI_STACK_DUMP_AT, // param1=duint addr, param2=duint csp
|
||||
GUI_UPDATE_DUMP_VIEW // param1=unused, param2=unused
|
||||
};
|
||||
|
||||
//GUI structures
|
||||
|
@ -422,6 +423,7 @@ BRIDGE_IMPEXP void GuiReferenceReloadData();
|
|||
BRIDGE_IMPEXP void GuiReferenceSetSingleSelection(int index, bool scroll);
|
||||
BRIDGE_IMPEXP void GuiReferenceSetProgress(int progress);
|
||||
BRIDGE_IMPEXP void GuiStackDumpAt(duint addr, duint csp);
|
||||
BRIDGE_IMPEXP void GuiUpdateDumpView();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -72,7 +72,6 @@ void dbgsetskipexceptions(bool skip)
|
|||
|
||||
void DebugUpdateGui(uint disasm_addr, bool stack)
|
||||
{
|
||||
GuiUpdateAllViews();
|
||||
uint cip=GetContextData(UE_CIP);
|
||||
GuiDisasmAt(disasm_addr, cip);
|
||||
if(stack)
|
||||
|
@ -84,6 +83,7 @@ void DebugUpdateGui(uint disasm_addr, bool stack)
|
|||
if(!modnamefromaddr(disasm_addr, modname, true))
|
||||
*modname=0;
|
||||
GuiUpdateCPUTitle(modname);
|
||||
GuiUpdateAllViews();
|
||||
}
|
||||
|
||||
static void cbUserBreakpoint()
|
||||
|
|
|
@ -16,6 +16,8 @@ HexDump::HexDump(QWidget *parent) : AbstractTableView(parent)
|
|||
mMemPage = new MemoryPage(0, 0);
|
||||
|
||||
clearDescriptors();
|
||||
|
||||
connect(Bridge::getBridge(), SIGNAL(updateDump()), this, SLOT(reloadData()));
|
||||
}
|
||||
|
||||
void HexDump::printDumpAt(int_t parVA)
|
||||
|
|
|
@ -210,6 +210,11 @@ void Bridge::emitStackDumpAt(uint_t va, uint_t csp)
|
|||
emit stackDumpAt(va, csp);
|
||||
}
|
||||
|
||||
void Bridge::emitUpdateDump()
|
||||
{
|
||||
emit updateDump();
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
Static Functions
|
||||
************************************************************************************/
|
||||
|
@ -440,6 +445,12 @@ __declspec(dllexport) void* _gui_sendmessage(GUIMSG type, void* param1, void* pa
|
|||
}
|
||||
break;
|
||||
|
||||
case GUI_UPDATE_DUMP_VIEW:
|
||||
{
|
||||
Bridge::getBridge()->emitUpdateDump();
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
}
|
||||
|
|
|
@ -58,6 +58,7 @@ public:
|
|||
void emitReferenceSetSingleSelection(int index, bool scroll);
|
||||
void emitReferenceSetProgress(int progress);
|
||||
void emitStackDumpAt(uint_t va, uint_t csp);
|
||||
void emitUpdateDump();
|
||||
|
||||
//Public variables
|
||||
void* winId;
|
||||
|
@ -97,6 +98,7 @@ signals:
|
|||
void referenceSetSingleSelection(int index, bool scroll);
|
||||
void referenceSetProgress(int progress);
|
||||
void stackDumpAt(uint_t va, uint_t csp);
|
||||
void updateDump();
|
||||
|
||||
private:
|
||||
QMutex mBridgeMutex;
|
||||
|
|
|
@ -126,6 +126,7 @@ void CPUDisassembly::contextMenuEvent(QContextMenuEvent* event)
|
|||
|
||||
// Goto Menu
|
||||
mGotoMenu->addAction(mGotoOrigin);
|
||||
mGotoMenu->addAction(mGotoExpression);
|
||||
wMenu->addMenu(mGotoMenu);
|
||||
|
||||
QAction* wAction = wMenu->exec(event->globalPos());
|
||||
|
@ -184,6 +185,13 @@ void CPUDisassembly::setupRightClickContextMenu()
|
|||
this->addAction(mGotoOrigin);
|
||||
connect(mGotoOrigin, SIGNAL(triggered()), this, SLOT(gotoOrigin()));
|
||||
|
||||
// Address action
|
||||
mGotoExpression = new QAction("Expression", this);
|
||||
mGotoExpression->setShortcutContext(Qt::WidgetShortcut);
|
||||
mGotoExpression->setShortcut(QKeySequence("ctrl+g"));
|
||||
this->addAction(mGotoExpression);
|
||||
connect(mGotoExpression, SIGNAL(triggered()), this, SLOT(gotoExpression()));
|
||||
|
||||
//---------------------- Breakpoints -----------------------------
|
||||
// Menu
|
||||
mBPMenu = new QMenu("Breakpoint", this);
|
||||
|
@ -434,7 +442,7 @@ void CPUDisassembly::toggleFunction()
|
|||
if(DbgGetLabelAt(function_start, SEG_DEFAULT, labeltext))
|
||||
label_text = " (" + QString(labeltext) + ")";
|
||||
|
||||
QMessageBox msg(QMessageBox::Warning, "Deleting the function:", start_text + "-" + end_text + label_text, QMessageBox::Ok|QMessageBox::Cancel);
|
||||
QMessageBox msg(QMessageBox::Warning, "Deleting function:", start_text + "-" + end_text + label_text, QMessageBox::Ok|QMessageBox::Cancel);
|
||||
msg.setDefaultButton(QMessageBox::Cancel);
|
||||
msg.setWindowIcon(QIcon(":/icons/images/compile-warning.png"));
|
||||
msg.setParent(this, Qt::Dialog);
|
||||
|
@ -486,3 +494,13 @@ void CPUDisassembly::assembleAt()
|
|||
msg.exec();
|
||||
}
|
||||
}
|
||||
|
||||
void CPUDisassembly::gotoExpression()
|
||||
{
|
||||
GotoDialog mGoto(this);
|
||||
if(mGoto.exec()==QDialog::Accepted)
|
||||
{
|
||||
QString cmd;
|
||||
DbgCmdExec(cmd.sprintf("disasm \"%s\"", mGoto.expressionText.toUtf8().constData()).toUtf8().constData());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "Bridge.h"
|
||||
#include "LineEditDialog.h"
|
||||
#include "QBeaEngine.h"
|
||||
#include "GotoDialog.h"
|
||||
#include <QAction>
|
||||
#include <QMessageBox>
|
||||
#include <QMenu>
|
||||
|
@ -43,6 +44,7 @@ public slots:
|
|||
void setBookmark();
|
||||
void toggleFunction();
|
||||
void assembleAt();
|
||||
void gotoExpression();
|
||||
|
||||
private:
|
||||
|
||||
|
@ -68,8 +70,7 @@ private:
|
|||
QAction* msetHwBPOnSlot1Action;
|
||||
QAction* msetHwBPOnSlot2Action;
|
||||
QAction* msetHwBPOnSlot3Action;
|
||||
|
||||
|
||||
QAction* mGotoExpression;
|
||||
};
|
||||
|
||||
#endif // CPUDISASSEMBLY_H
|
||||
|
|
|
@ -323,16 +323,6 @@ void MainWindow::displayAboutWidget()
|
|||
msg.exec();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionGoto_triggered()
|
||||
{
|
||||
GotoDialog mGoto(this);
|
||||
if(mGoto.exec()==QDialog::Accepted)
|
||||
{
|
||||
QString cmd;
|
||||
DbgCmdExec(cmd.sprintf("disasm \"%s\"", mGoto.expressionText.toUtf8().constData()).toUtf8().constData());
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::openFile()
|
||||
{
|
||||
QString lastPath, filename;
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include "CommandLineEdit.h"
|
||||
#include "MemoryMapView.h"
|
||||
#include "LogView.h"
|
||||
#include "GotoDialog.h"
|
||||
#include "StatusLabel.h"
|
||||
#include "BreakpointsView.h"
|
||||
#include "ScriptView.h"
|
||||
|
@ -56,9 +55,6 @@ public slots:
|
|||
void displayCpuWidget();
|
||||
void displaySymbolWidget();
|
||||
void displayReferencesWidget();
|
||||
|
||||
private slots:
|
||||
void on_actionGoto_triggered();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
|
|
|
@ -10,6 +10,9 @@
|
|||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::NoContextMenu</enum>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>x64_dbg</string>
|
||||
</property>
|
||||
|
@ -116,8 +119,6 @@
|
|||
<addaction name="separator"/>
|
||||
<addaction name="actionRtr"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionGoto"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionCpu"/>
|
||||
<addaction name="actionLog"/>
|
||||
<addaction name="actionBreakpoints"/>
|
||||
|
@ -299,18 +300,6 @@
|
|||
<string>&About</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionGoto">
|
||||
<property name="icon">
|
||||
<iconset resource="../../resource.qrc">
|
||||
<normaloff>:/icons/images/geolocation-goto.png</normaloff>:/icons/images/geolocation-goto.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Goto</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+G</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionScylla">
|
||||
<property name="icon">
|
||||
<iconset resource="../../resource.qrc">
|
||||
|
|
Loading…
Reference in New Issue