1
0
Fork 0

DBG+GUI: dont wanna talk about it...

This commit is contained in:
mrexodia 2015-11-24 01:43:35 +01:00
parent 2e60f3a15e
commit 6508104c81
9 changed files with 18 additions and 1 deletions

View File

@ -797,6 +797,7 @@ typedef struct
{
duint start;
duint end;
duint view;
} SELECTIONDATA;
typedef struct

View File

@ -245,7 +245,7 @@ void DebugUpdateStack(duint dumpAddr, duint csp, bool forceDump)
{
SELECTIONDATA selection;
if (GuiSelectionGet(GUI_STACK, &selection))
dumpAddr = selection.start;
dumpAddr = selection.view;
}
GuiStackDumpAt(dumpAddr, csp);
}

View File

@ -1451,6 +1451,12 @@ dsint Disassembly::getSize()
return mMemPage->getSize();
}
duint Disassembly::getTableOffsetRva()
{
return mInstBuffer.size() ? mInstBuffer.at(0).rva : 0;
}
void Disassembly::historyClear()
{
mVaHistory.clear(); //clear history for new targets

View File

@ -75,6 +75,7 @@ public:
void disassembleClear();
const dsint getBase() const;
dsint getSize();
duint getTableOffsetRva();
// history management
void historyClear();

View File

@ -96,6 +96,11 @@ duint HexDump::rvaToVa(dsint rva)
return mMemPage->va(rva);
}
duint HexDump::getTableOffsetRva()
{
return getTableOffset() * getBytePerRowCount() - mByteOffset;
}
void HexDump::mouseMoveEvent(QMouseEvent* event)
{
bool wAccept = true;

View File

@ -132,6 +132,7 @@ public:
void printDumpAt(dsint parVA, bool select, bool repaint = true);
duint rvaToVa(dsint rva);
duint getTableOffsetRva();
signals:
void selectionUpdated();

View File

@ -826,6 +826,7 @@ void CPUDisassembly::selectionGetSlot(SELECTIONDATA* selection)
{
selection->start = rvaToVa(getSelectionStart());
selection->end = rvaToVa(getSelectionEnd());
selection->view = rvaToVa(getTableOffsetRva());
Bridge::getBridge()->setResult(1);
}

View File

@ -1173,6 +1173,7 @@ void CPUDump::selectionGet(SELECTIONDATA* selection)
{
selection->start = rvaToVa(getSelectionStart());
selection->end = rvaToVa(getSelectionEnd());
selection->view = rvaToVa(getTableOffsetRva());
Bridge::getBridge()->setResult(1);
}

View File

@ -418,6 +418,7 @@ void CPUStack::selectionGet(SELECTIONDATA* selection)
{
selection->start = rvaToVa(getSelectionStart());
selection->end = rvaToVa(getSelectionEnd());
selection->view = rvaToVa(getTableOffsetRva());
Bridge::getBridge()->setResult(1);
}