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);
|
mDownloadAllSymbolsAction = new QAction("Download Symbols for &All Modules", this);
|
||||||
connect(mDownloadAllSymbolsAction, SIGNAL(triggered()), this, SLOT(moduleDownloadAllSymbols()));
|
connect(mDownloadAllSymbolsAction, SIGNAL(triggered()), this, SLOT(moduleDownloadAllSymbols()));
|
||||||
|
|
||||||
|
mCopyPathAction = new QAction("Copy File &Path", this);
|
||||||
|
connect(mCopyPathAction, SIGNAL(triggered()), this, SLOT(moduleCopyPath()));
|
||||||
|
|
||||||
//Shortcuts
|
//Shortcuts
|
||||||
refreshShortcutsSlot();
|
refreshShortcutsSlot();
|
||||||
connect(Config(), SIGNAL(shortcutsUpdated()), this, SLOT(refreshShortcutsSlot()));
|
connect(Config(), SIGNAL(shortcutsUpdated()), this, SLOT(refreshShortcutsSlot()));
|
||||||
|
@ -237,6 +240,10 @@ void SymbolView::moduleContextMenu(const QPoint & pos)
|
||||||
wMenu->addAction(mFollowModuleEntryAction);
|
wMenu->addAction(mFollowModuleEntryAction);
|
||||||
wMenu->addAction(mDownloadSymbolsAction);
|
wMenu->addAction(mDownloadSymbolsAction);
|
||||||
wMenu->addAction(mDownloadAllSymbolsAction);
|
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);
|
QMenu wCopyMenu("&Copy", this);
|
||||||
mModuleList->setupCopyMenu(&wCopyMenu);
|
mModuleList->setupCopyMenu(&wCopyMenu);
|
||||||
if(wCopyMenu.actions().length())
|
if(wCopyMenu.actions().length())
|
||||||
|
@ -259,6 +266,14 @@ void SymbolView::moduleEntryFollow()
|
||||||
emit showCpu();
|
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()
|
void SymbolView::moduleDownloadSymbols()
|
||||||
{
|
{
|
||||||
DbgCmdExec(QString("symdownload " + mModuleList->getCellContent(mModuleList->getInitialSelection(), 1)).toUtf8().constData());
|
DbgCmdExec(QString("symdownload " + mModuleList->getCellContent(mModuleList->getInitialSelection(), 1)).toUtf8().constData());
|
||||||
|
|
|
@ -33,6 +33,7 @@ private slots:
|
||||||
void moduleEntryFollow();
|
void moduleEntryFollow();
|
||||||
void moduleDownloadSymbols();
|
void moduleDownloadSymbols();
|
||||||
void moduleDownloadAllSymbols();
|
void moduleDownloadAllSymbols();
|
||||||
|
void moduleCopyPath();
|
||||||
void toggleBreakpoint();
|
void toggleBreakpoint();
|
||||||
void toggleBookmark();
|
void toggleBookmark();
|
||||||
void refreshShortcutsSlot();
|
void refreshShortcutsSlot();
|
||||||
|
@ -56,6 +57,7 @@ private:
|
||||||
QAction* mFollowModuleEntryAction;
|
QAction* mFollowModuleEntryAction;
|
||||||
QAction* mDownloadSymbolsAction;
|
QAction* mDownloadSymbolsAction;
|
||||||
QAction* mDownloadAllSymbolsAction;
|
QAction* mDownloadAllSymbolsAction;
|
||||||
|
QAction* mCopyPathAction;
|
||||||
|
|
||||||
static void cbSymbolEnum(SYMBOLINFO* symbol, void* user);
|
static void cbSymbolEnum(SYMBOLINFO* symbol, void* user);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue