Skip to content

Commit ee62202

Browse files
committed
Go to thread entry option added
1 parent d50209f commit ee62202

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

x64_dbg_gui/Project/Src/Gui/ThreadView.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ void ThreadView::contextMenuSlot(const QPoint & pos)
1515
wMenu->addSeparator();
1616
wMenu->addMenu(mSetPriority);
1717
wMenu->addSeparator();
18+
wMenu->addAction(mGoToThreadEntry);
19+
wMenu->addSeparator();
1820
QMenu wCopyMenu("&Copy", this);
1921
setupCopyMenu(&wCopyMenu);
2022
if(wCopyMenu.actions().length())
@@ -49,6 +51,13 @@ void ThreadView::contextMenuSlot(const QPoint & pos)
4951
wMenu->exec(mapToGlobal(pos)); //execute context menu
5052
}
5153

54+
void ThreadView::GoToThreadEntry()
55+
{
56+
QString addr_text = getCellContent(getInitialSelection(), 2);
57+
DbgCmdExecDirect(QString("disasm " + addr_text).toUtf8().constData());
58+
emit showCpu();
59+
}
60+
5261
void ThreadView::SwitchThread()
5362
{
5463
QString threadId = getCellContent(getInitialSelection(), 1);
@@ -133,6 +142,7 @@ void ThreadView::setupContextMenu()
133142
mKillThread = new QAction("Kill Thread", this);
134143
connect(mKillThread, SIGNAL(triggered()), this, SLOT(KillThread()));
135144

145+
// Set priority
136146
mSetPriority = new QMenu("Set Priority", this);
137147

138148
mSetPriorityIdle = new QAction("Idle", this);
@@ -162,6 +172,11 @@ void ThreadView::setupContextMenu()
162172
mSetPriorityTimeCritical = new QAction("Time Critical", this);
163173
connect(mSetPriorityTimeCritical, SIGNAL(triggered()), this, SLOT(SetPriorityTimeCriticalSlot()));
164174
mSetPriority->addAction(mSetPriorityTimeCritical);
175+
176+
// GoToThreadEntry
177+
mGoToThreadEntry = new QAction("Go to Thread Entry", this);
178+
connect(mGoToThreadEntry, SIGNAL(triggered()), this, SLOT(GoToThreadEntry()));
179+
165180
}
166181

167182
ThreadView::ThreadView(StdTable* parent) : StdTable(parent)

x64_dbg_gui/Project/Src/Gui/ThreadView.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public slots:
1919
void SuspendThread();
2020
void ResumeThread();
2121
void KillThread();
22+
void GoToThreadEntry();
2223
void contextMenuSlot(const QPoint & pos);
2324
void SetPriorityIdleSlot();
2425
void SetPriorityAboveNormalSlot();
@@ -35,6 +36,7 @@ public slots:
3536
int mCurrentThread;
3637
QAction* mSwitchThread;
3738
QAction* mSuspendThread;
39+
QAction* mGoToThreadEntry;
3840
QAction* mResumeThread;
3941
QAction* mKillThread;
4042
QAction* mSetPriorityIdle;

0 commit comments

Comments
 (0)