core/debugger: Support reading guest thread names
This commit is contained in:
parent
858f8ac6d9
commit
07922abffc
4 changed files with 172 additions and 14 deletions
|
@ -198,6 +198,10 @@ ResultCode KThread::Initialize(KThreadFunction func, uintptr_t arg, VAddr user_s
|
|||
resource_limit_release_hint = false;
|
||||
cpu_time = 0;
|
||||
|
||||
// Set debug context.
|
||||
stack_top = user_stack_top;
|
||||
argument = arg;
|
||||
|
||||
// Clear our stack parameters.
|
||||
std::memset(static_cast<void*>(std::addressof(GetStackParameters())), 0,
|
||||
sizeof(StackParameters));
|
||||
|
|
|
@ -660,6 +660,14 @@ public:
|
|||
void IfDummyThreadTryWait();
|
||||
void IfDummyThreadEndWait();
|
||||
|
||||
[[nodiscard]] uintptr_t GetArgument() const {
|
||||
return argument;
|
||||
}
|
||||
|
||||
[[nodiscard]] VAddr GetUserStackTop() const {
|
||||
return stack_top;
|
||||
}
|
||||
|
||||
private:
|
||||
static constexpr size_t PriorityInheritanceCountMax = 10;
|
||||
union SyncObjectBuffer {
|
||||
|
@ -791,6 +799,8 @@ private:
|
|||
std::vector<KSynchronizationObject*> wait_objects_for_debugging;
|
||||
VAddr mutex_wait_address_for_debugging{};
|
||||
ThreadWaitReasonForDebugging wait_reason_for_debugging{};
|
||||
uintptr_t argument;
|
||||
VAddr stack_top;
|
||||
|
||||
public:
|
||||
using ConditionVariableThreadTreeType = ConditionVariableThreadTree;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue