1
0
Fork 0

DBG+GUI: improvements to the freeze stack option

This commit is contained in:
mrexodia 2016-10-16 15:24:45 +02:00
parent 1d9835c84f
commit 32aa4b0a72
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
2 changed files with 7 additions and 6 deletions

View File

@ -452,11 +452,7 @@ void DebugUpdateStack(duint dumpAddr, duint csp, bool forceDump)
if(GuiIsUpdateDisabled()) if(GuiIsUpdateDisabled())
return; return;
if(!forceDump && bFreezeStack) if(!forceDump && bFreezeStack)
{ dumpAddr = 0;
SELECTIONDATA selection;
if(GuiSelectionGet(GUI_STACK, &selection))
dumpAddr = selection.start;
}
GuiStackDumpAt(dumpAddr, csp); GuiStackDumpAt(dumpAddr, csp);
GuiUpdateArgumentWidget(); GuiUpdateArgumentWidget();
} }

View File

@ -242,6 +242,7 @@ void CPUStack::setupContextMenu()
//Freeze the stack //Freeze the stack
mMenuBuilder->addAction(mFreezeStack = makeAction(DIcon("freeze.png"), tr("Freeze the stack"), SLOT(freezeStackSlot()))); mMenuBuilder->addAction(mFreezeStack = makeAction(DIcon("freeze.png"), tr("Freeze the stack"), SLOT(freezeStackSlot())));
mFreezeStack->setCheckable(true);
//Follow in Memory Map //Follow in Memory Map
mMenuBuilder->addAction(makeAction(DIcon("memmap_find_address_page.png"), tr("Follow in Memory Map"), SLOT(followInMemoryMapSlot()))); mMenuBuilder->addAction(makeAction(DIcon("memmap_find_address_page.png"), tr("Follow in Memory Map"), SLOT(followInMemoryMapSlot())));
@ -319,7 +320,10 @@ void CPUStack::updateFreezeStackAction()
if(bStackFrozen) if(bStackFrozen)
mFreezeStack->setText(tr("Unfreeze the stack")); mFreezeStack->setText(tr("Unfreeze the stack"));
else else
{
mFreezeStack->setText(tr("Freeze the stack")); mFreezeStack->setText(tr("Freeze the stack"));
gotoSpSlot();
}
mFreezeStack->setChecked(bStackFrozen); mFreezeStack->setChecked(bStackFrozen);
} }
@ -532,7 +536,8 @@ void CPUStack::mouseDoubleClickEvent(QMouseEvent* event)
void CPUStack::stackDumpAt(duint addr, duint csp) void CPUStack::stackDumpAt(duint addr, duint csp)
{ {
addVaToHistory(addr); if(DbgMemIsValidReadPtr(addr))
addVaToHistory(addr);
mCsp = csp; mCsp = csp;
// Get the callstack // Get the callstack