GUI: added an option to copy the file path of a module
This commit is contained in:
parent
3199025d7b
commit
a30fecb90b
|
@ -120,6 +120,9 @@ void SymbolView::setupContextMenu()
|
|||
mDownloadAllSymbolsAction = new QAction("Download Symbols for &All Modules", this);
|
||||
connect(mDownloadAllSymbolsAction, SIGNAL(triggered()), this, SLOT(moduleDownloadAllSymbols()));
|
||||
|
||||
mCopyPathAction = new QAction("Copy File &Path", this);
|
||||
connect(mCopyPathAction, SIGNAL(triggered()), this, SLOT(moduleCopyPath()));
|
||||
|
||||
//Shortcuts
|
||||
refreshShortcutsSlot();
|
||||
connect(Config(), SIGNAL(shortcutsUpdated()), this, SLOT(refreshShortcutsSlot()));
|
||||
|
@ -237,6 +240,10 @@ void SymbolView::moduleContextMenu(const QPoint & pos)
|
|||
wMenu->addAction(mFollowModuleEntryAction);
|
||||
wMenu->addAction(mDownloadSymbolsAction);
|
||||
wMenu->addAction(mDownloadAllSymbolsAction);
|
||||
int_t modbase = DbgValFromString(mModuleList->getCellContent(mModuleList->getInitialSelection(), 0).toUtf8().constData());
|
||||
char szModPath[MAX_PATH] = "";
|
||||
if(DbgFunctions()->ModPathFromAddr(modbase, szModPath, _countof(szModPath)))
|
||||
wMenu->addAction(mCopyPathAction);
|
||||
QMenu wCopyMenu("&Copy", this);
|
||||
mModuleList->setupCopyMenu(&wCopyMenu);
|
||||
if(wCopyMenu.actions().length())
|
||||
|
@ -259,6 +266,14 @@ void SymbolView::moduleEntryFollow()
|
|||
emit showCpu();
|
||||
}
|
||||
|
||||
void SymbolView::moduleCopyPath()
|
||||
{
|
||||
int_t modbase = DbgValFromString(mModuleList->getCellContent(mModuleList->getInitialSelection(), 0).toUtf8().constData());
|
||||
char szModPath[MAX_PATH] = "";
|
||||
if(DbgFunctions()->ModPathFromAddr(modbase, szModPath, _countof(szModPath)))
|
||||
Bridge::CopyToClipboard(szModPath);
|
||||
}
|
||||
|
||||
void SymbolView::moduleDownloadSymbols()
|
||||
{
|
||||
DbgCmdExec(QString("symdownload " + mModuleList->getCellContent(mModuleList->getInitialSelection(), 1)).toUtf8().constData());
|
||||
|
|
|
@ -33,6 +33,7 @@ private slots:
|
|||
void moduleEntryFollow();
|
||||
void moduleDownloadSymbols();
|
||||
void moduleDownloadAllSymbols();
|
||||
void moduleCopyPath();
|
||||
void toggleBreakpoint();
|
||||
void toggleBookmark();
|
||||
void refreshShortcutsSlot();
|
||||
|
@ -56,6 +57,7 @@ private:
|
|||
QAction* mFollowModuleEntryAction;
|
||||
QAction* mDownloadSymbolsAction;
|
||||
QAction* mDownloadAllSymbolsAction;
|
||||
QAction* mCopyPathAction;
|
||||
|
||||
static void cbSymbolEnum(SYMBOLINFO* symbol, void* user);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue