Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suyu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
Suyu
Commits
c50393e0
There was an error fetching the commit references. Please try again later.
Commit
c50393e0
authored
6 years ago
by
Subv
Browse files
Options
Downloads
Patches
Plain Diff
Qt/WaitTree: Display the callstack for each thread in the wait tree widget.
parent
1b5c02fc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/yuzu/debugger/wait_tree.cpp
+26
-0
26 additions, 0 deletions
src/yuzu/debugger/wait_tree.cpp
src/yuzu/debugger/wait_tree.h
+11
-0
11 additions, 0 deletions
src/yuzu/debugger/wait_tree.h
with
37 additions
and
0 deletions
src/yuzu/debugger/wait_tree.cpp
+
26
−
0
View file @
c50393e0
...
@@ -98,6 +98,30 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeMutexInfo::GetChildren() cons
...
@@ -98,6 +98,30 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeMutexInfo::GetChildren() cons
return
list
;
return
list
;
}
}
WaitTreeCallstack
::
WaitTreeCallstack
(
const
Kernel
::
Thread
&
thread
)
:
thread
(
thread
)
{}
QString
WaitTreeCallstack
::
GetText
()
const
{
return
tr
(
"Call stack"
);
}
std
::
vector
<
std
::
unique_ptr
<
WaitTreeItem
>>
WaitTreeCallstack
::
GetChildren
()
const
{
std
::
vector
<
std
::
unique_ptr
<
WaitTreeItem
>>
list
;
constexpr
size_t
BaseRegister
=
29
;
u64
base_pointer
=
thread
.
context
.
cpu_registers
[
BaseRegister
];
while
(
base_pointer
!=
0
)
{
u64
lr
=
Memory
::
Read64
(
base_pointer
+
sizeof
(
u64
));
if
(
lr
==
0
)
break
;
list
.
push_back
(
std
::
make_unique
<
WaitTreeText
>
(
tr
(
"0x%1"
).
arg
(
lr
-
sizeof
(
u32
),
16
,
16
,
QChar
(
'0'
))));
base_pointer
=
Memory
::
Read64
(
base_pointer
);
}
return
list
;
}
WaitTreeWaitObject
::
WaitTreeWaitObject
(
const
Kernel
::
WaitObject
&
o
)
:
object
(
o
)
{}
WaitTreeWaitObject
::
WaitTreeWaitObject
(
const
Kernel
::
WaitObject
&
o
)
:
object
(
o
)
{}
bool
WaitTreeExpandableItem
::
IsExpandable
()
const
{
bool
WaitTreeExpandableItem
::
IsExpandable
()
const
{
...
@@ -269,6 +293,8 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeThread::GetChildren() const {
...
@@ -269,6 +293,8 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeThread::GetChildren() const {
thread
.
IsSleepingOnWaitAll
()));
thread
.
IsSleepingOnWaitAll
()));
}
}
list
.
push_back
(
std
::
make_unique
<
WaitTreeCallstack
>
(
thread
));
return
list
;
return
list
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/yuzu/debugger/wait_tree.h
+
11
−
0
View file @
c50393e0
...
@@ -73,6 +73,17 @@ private:
...
@@ -73,6 +73,17 @@ private:
Kernel
::
SharedPtr
<
Kernel
::
Thread
>
owner
;
Kernel
::
SharedPtr
<
Kernel
::
Thread
>
owner
;
};
};
class
WaitTreeCallstack
:
public
WaitTreeExpandableItem
{
Q_OBJECT
public:
explicit
WaitTreeCallstack
(
const
Kernel
::
Thread
&
thread
);
QString
GetText
()
const
override
;
std
::
vector
<
std
::
unique_ptr
<
WaitTreeItem
>>
GetChildren
()
const
override
;
private:
const
Kernel
::
Thread
&
thread
;
};
class
WaitTreeWaitObject
:
public
WaitTreeExpandableItem
{
class
WaitTreeWaitObject
:
public
WaitTreeExpandableItem
{
Q_OBJECT
Q_OBJECT
public:
public:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment