1
0
Fork 0

GUI: download symbols in CPU tab (#1680)

This commit is contained in:
Georgeto 2017-08-07 19:38:34 +02:00 committed by Duncan Ogilvie
parent ef0cbcf58f
commit 7646747eca
2 changed files with 23 additions and 0 deletions

View File

@ -528,6 +528,15 @@ void CPUDisassembly::setupRightClickContextMenu()
analysisMenu->addMenu(encodeTypeMenu);
mMenuBuilder->addMenu(makeMenu(DIcon("analysis.png"), tr("Analysis")), analysisMenu);
MenuBuilder* downloadSymbolsMenu = new MenuBuilder(this);
downloadSymbolsMenu->addAction(makeShortcutAction(DIcon("pdb.png"), tr("&Current module"), SLOT(downloadCurrentSymbolsSlot()), "ActionDownloadSymbol"), [this](QMenu*)
{
char module[MAX_MODULE_SIZE] = "";
return DbgGetModuleAt(rvaToVa(getInitialSelection()), module);
});
downloadSymbolsMenu->addAction(makeShortcutAction(DIcon("pdb.png"), tr("&All modules"), SLOT(downloadAllSymbolsSlot()), "ActionDownloadAllSymbol"));
mMenuBuilder->addMenu(makeMenu(DIcon("pdb.png"), tr("Download Symbols")), downloadSymbolsMenu);
mMenuBuilder->addSeparator();
@ -2136,3 +2145,15 @@ void CPUDisassembly::followInMemoryMapSlot()
{
DbgCmdExec(QString("memmapdump %1").arg(ToHexString(rvaToVa(getInitialSelection()))).toUtf8().constData());
}
void CPUDisassembly::downloadCurrentSymbolsSlot()
{
char module[MAX_MODULE_SIZE] = "";
if(DbgGetModuleAt(rvaToVa(getInitialSelection()), module))
DbgCmdExec(QString("symdownload \"%0\"").arg(module).toUtf8().constData());
}
void CPUDisassembly::downloadAllSymbolsSlot()
{
DbgCmdExec("symdownload");
}

View File

@ -118,6 +118,8 @@ public slots:
void copyTokenTextSlot();
void copyTokenValueSlot();
void followInMemoryMapSlot();
void downloadCurrentSymbolsSlot();
void downloadAllSymbolsSlot();
protected:
void paintEvent(QPaintEvent* event);