PROJECT: updated todo list
GUI: fixed infobox GUI: removed last space GUI: added Goto dialog to the dump
This commit is contained in:
parent
d9fdc0a99a
commit
e9e5b26d14
|
@ -9,7 +9,6 @@
|
|||
- getremotestring
|
||||
- function parameter
|
||||
- help file updates
|
||||
- tls callbacks
|
||||
- inject dll
|
||||
- dump memory
|
||||
- dump process
|
||||
|
|
|
@ -895,6 +895,7 @@ void Disassembly::setSingleSelection(int_t index)
|
|||
mSelection.firstSelectedIndex = index;
|
||||
mSelection.fromIndex = index;
|
||||
mSelection.toIndex = index;
|
||||
emit selectionChanged(rvaToVa(index));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -78,6 +78,7 @@ public:
|
|||
int_t getSize();
|
||||
|
||||
signals:
|
||||
void selectionChanged(int_t parVA);
|
||||
|
||||
public slots:
|
||||
void disassambleAt(int_t parVA, int_t parCIP);
|
||||
|
|
|
@ -26,4 +26,5 @@ void InfoBox::setInfoLineSlot(int line, QString text)
|
|||
if(line < 0 || line > 2)
|
||||
return;
|
||||
setCellContent(line, 0, text);
|
||||
reloadData();
|
||||
}
|
||||
|
|
|
@ -171,6 +171,8 @@ Instruction_t QBeaEngine::DisassembleAt(byte_t* data, uint_t size, uint_t instIn
|
|||
len = (len < 1) ? 1 : len ;
|
||||
|
||||
wInst.instStr = QString(mDisasmStruct.CompleteInstr);
|
||||
if(wInst.instStr.at(wInst.instStr.length()-1)==' ')
|
||||
wInst.instStr.chop(1);
|
||||
wInst.dump = QByteArray((char*)mDisasmStruct.EIP, len);
|
||||
wInst.rva = origInstRVA;
|
||||
wInst.lentgh = len;
|
||||
|
|
|
@ -11,6 +11,15 @@ CPUDump::CPUDump(QWidget *parent) : HexDump(parent)
|
|||
|
||||
void CPUDump::setupContextMenu()
|
||||
{
|
||||
//Goto menu
|
||||
mGotoMenu = new QMenu("&Goto", this);
|
||||
//Goto->Expression
|
||||
mGotoExpression = new QAction("&Expression", this);
|
||||
mGotoExpression->setShortcutContext(Qt::WidgetShortcut);
|
||||
mGotoExpression->setShortcut(QKeySequence("ctrl+g"));
|
||||
this->addAction(mGotoExpression);
|
||||
connect(mGotoExpression, SIGNAL(triggered()), this, SLOT(gotoExpressionSlot()));
|
||||
|
||||
//Hex menu
|
||||
mHexMenu = new QMenu("&Hex", this);
|
||||
//Hex->Ascii
|
||||
|
@ -140,6 +149,7 @@ QString CPUDump::paintContent(QPainter* painter, int_t rowBase, int rowOffset, i
|
|||
void CPUDump::contextMenuEvent(QContextMenuEvent *event)
|
||||
{
|
||||
QMenu* wMenu = new QMenu(this); //create context menu
|
||||
wMenu->addMenu(mGotoMenu);
|
||||
wMenu->addMenu(mHexMenu);
|
||||
wMenu->addMenu(mTextMenu);
|
||||
wMenu->addMenu(mIntegerMenu);
|
||||
|
@ -149,6 +159,17 @@ void CPUDump::contextMenuEvent(QContextMenuEvent *event)
|
|||
wMenu->exec(event->globalPos()); //execute context menu
|
||||
}
|
||||
|
||||
void CPUDump::gotoExpressionSlot()
|
||||
{
|
||||
GotoDialog mGoto(this);
|
||||
mGoto.setWindowTitle("Enter expression to follow in Dump...");
|
||||
if(mGoto.exec()==QDialog::Accepted)
|
||||
{
|
||||
QString cmd;
|
||||
DbgCmdExec(cmd.sprintf("dump \"%s\"", mGoto.expressionText.toUtf8().constData()).toUtf8().constData());
|
||||
}
|
||||
}
|
||||
|
||||
void CPUDump::hexAsciiSlot()
|
||||
{
|
||||
int charwidth=QFontMetrics(this->font()).width(QChar(' '));
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "NewTypes.h"
|
||||
#include "HexDump.h"
|
||||
#include "Bridge.h"
|
||||
#include "GotoDialog.h"
|
||||
|
||||
class CPUDump : public HexDump
|
||||
{
|
||||
|
@ -19,6 +20,8 @@ public:
|
|||
void contextMenuEvent(QContextMenuEvent* event);
|
||||
|
||||
public slots:
|
||||
void gotoExpressionSlot();
|
||||
|
||||
void hexAsciiSlot();
|
||||
void hexUnicodeSlot();
|
||||
|
||||
|
@ -43,6 +46,9 @@ public slots:
|
|||
void disassemblySlot();
|
||||
|
||||
private:
|
||||
QMenu* mGotoMenu;
|
||||
QAction* mGotoExpression;
|
||||
|
||||
QMenu* mHexMenu;
|
||||
QAction* mHexAsciiAction;
|
||||
QAction* mHexUnicodeAction;
|
||||
|
|
|
@ -17,11 +17,17 @@ bool MyApplication::notify(QObject* receiver, QEvent* event)
|
|||
}
|
||||
catch (const std::exception& ex)
|
||||
{
|
||||
GuiAddLogMessage(QString().sprintf("Fatal GUI Exception: %s!\n", ex.what()).toUtf8().constData());
|
||||
const char* message=QString().sprintf("Fatal GUI Exception: %s!\n", ex.what()).toUtf8().constData();
|
||||
GuiAddLogMessage(message);
|
||||
puts(message);
|
||||
OutputDebugStringA(message);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
GuiAddLogMessage("Fatal GUI Exception: (...)!\n");
|
||||
const char* message="Fatal GUI Exception: (...)!\n";
|
||||
GuiAddLogMessage(message);
|
||||
puts(message);
|
||||
OutputDebugStringA(message);
|
||||
}
|
||||
return done;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue