mirror of
https://github.com/x64dbg/x64dbg.git
synced 2024-11-23 13:00:14 +00:00
Merge pull request #3333 from ynwarcs/symbol-commands-from-callstack-view
Add symbol loading commands to the callstack view context menu.
This commit is contained in:
commit
4d631707b8
@ -49,6 +49,11 @@ void CallStackView::setupContextMenu()
|
||||
{
|
||||
return !getCellContent(getInitialSelection(), ColFrom).isEmpty() && isSelectionValid();
|
||||
});
|
||||
QAction* loadSymbolsForThread = makeAction(DIcon("pdb"), tr("Download Symbols for This Thread"), SLOT(loadSymbolsForThreadSlot()));
|
||||
mMenuBuilder->addAction(loadSymbolsForThread, [this](QMenu*)
|
||||
{
|
||||
return isSelectionValid();
|
||||
});
|
||||
mFollowFrom->setShortcutContext(Qt::WidgetShortcut);
|
||||
mFollowFrom->setShortcut(QKeySequence("enter"));
|
||||
connect(this, SIGNAL(enterPressedSignal()), this, SLOT(followFromSlot()));
|
||||
@ -265,6 +270,28 @@ void CallStackView::renameThreadSlot()
|
||||
DbgCmdExec(QString("setthreadname %1, \"%2\"").arg(ToHexString(threadId)).arg(DbgCmdEscape(threadName)));
|
||||
}
|
||||
|
||||
void CallStackView::loadSymbolsForThreadSlot()
|
||||
{
|
||||
char module[MAX_MODULE_SIZE] = "";
|
||||
duint firstRowForThread = 1;
|
||||
const duint threadId = getCellUserdata(getInitialSelection(), ColThread);
|
||||
for(duint row = getInitialSelection(); row > 0; --row)
|
||||
{
|
||||
if(getCellUserdata(row, ColThread) != threadId)
|
||||
{
|
||||
firstRowForThread = row + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
for(duint row = firstRowForThread; row < getRowCount(); ++row)
|
||||
{
|
||||
if(getCellUserdata(row, ColThread) != threadId)
|
||||
break;
|
||||
if(DbgGetModuleAt(getCellUserdata(row, ColFrom), module))
|
||||
DbgCmdExec(QString("symdownload \"%0\"").arg(module));
|
||||
}
|
||||
}
|
||||
|
||||
void CallStackView::followInThreadsSlot()
|
||||
{
|
||||
QStringList threadIDName = getCellContent(getInitialSelection(), ColThread).split(" - ");
|
||||
|
@ -23,6 +23,7 @@ protected slots:
|
||||
void showSuspectedCallStackSlot();
|
||||
void followInThreadsSlot();
|
||||
void renameThreadSlot();
|
||||
void loadSymbolsForThreadSlot();
|
||||
|
||||
private:
|
||||
enum
|
||||
|
Loading…
Reference in New Issue
Block a user