From e480a8032bd7f460ac2a34135d319e52d04f936f Mon Sep 17 00:00:00 2001
From: Sebastian Valle <subv2112@gmail.com>
Date: Sun, 12 Apr 2020 16:44:51 -0500
Subject: [PATCH] =?UTF-8?q?Debuggers/Qt:=20Show=20the=20threads=20process?=
 =?UTF-8?q?=20names=20and=20ids=20in=20the=20Wai=E2=80=A6=20(#5201)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/citra_qt/debugger/wait_tree.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/citra_qt/debugger/wait_tree.cpp b/src/citra_qt/debugger/wait_tree.cpp
index 15a7ada03..540ab6c41 100644
--- a/src/citra_qt/debugger/wait_tree.cpp
+++ b/src/citra_qt/debugger/wait_tree.cpp
@@ -216,6 +216,7 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeThread::GetChildren() const {
     std::vector<std::unique_ptr<WaitTreeItem>> list(WaitTreeWaitObject::GetChildren());
 
     const auto& thread = static_cast<const Kernel::Thread&>(object);
+    const auto* process = thread.owner_process;
 
     QString processor;
     switch (thread.processor_id) {
@@ -238,6 +239,10 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeThread::GetChildren() const {
 
     list.push_back(std::make_unique<WaitTreeText>(tr("processor = %1").arg(processor)));
     list.push_back(std::make_unique<WaitTreeText>(tr("thread id = %1").arg(thread.GetThreadId())));
+    list.push_back(
+        std::make_unique<WaitTreeText>(tr("process = %1 (%2)")
+                                           .arg(QString::fromStdString(process->GetName()))
+                                           .arg(process->process_id)));
     list.push_back(std::make_unique<WaitTreeText>(tr("priority = %1(current) / %2(normal)")
                                                       .arg(thread.current_priority)
                                                       .arg(thread.nominal_priority)));