{"action":"created","comment":{"url":"https://api.github.com/repos/citra-emu/citra/pulls/comments/59056140","id":59056140,"diff_hunk":"@@ -0,0 +1,182 @@\n+// Copyright 2016 Citra Emulator Project\n+// Licensed under GPLv2 or any later version\n+// Refer to the license.txt file included.\n+\n+#include <QAbstractListModel>\n+#include <QListView>\n+#include <QDockWidget>\n+\n+#include \"core/hle/kernel/thread.h\"\n+#include \"core/hle/kernel/event.h\"\n+#include \"core/hle/kernel/semaphore.h\"\n+#include \"core/hle/kernel/mutex.h\"\n+#include \"core/hle/kernel/session.h\"\n+#include \"core/hle/kernel/timer.h\"\n+\n+class EmuThread;\n+\n+class WaitTreeItem : public QObject{\n+    Q_OBJECT\n+public:\n+    virtual bool IsExpandable() const;\n+    virtual QString GetText() const = 0;\n+    virtual ~WaitTreeItem();\n+};\n+class WaitTreeText : public WaitTreeItem {\n+    Q_OBJECT\n+private:\n+    QString text;\n+public:\n+    WaitTreeText(const QString& text);\n+    virtual QString GetText() const override;\n+};\n+class WaitTreeExpandableItem : public WaitTreeItem {\n+    Q_OBJECT\n+public:\n+    virtual bool IsExpandable() const override;\n+    virtual std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const = 0;\n+};\n+class WaitTreeWaitObject : public WaitTreeExpandableItem {\n+    Q_OBJECT\n+protected:\n+    const Kernel::WaitObject& object;\n+public:\n+    WaitTreeWaitObject(const Kernel::WaitObject& object);\n+    static std::unique_ptr<WaitTreeWaitObject> make(const Kernel::WaitObject& object);\n+    virtual QString GetText() const override;\n+    virtual std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override;\n+};\n+\n+class WaitTreeObjectList : public WaitTreeExpandableItem {\n+    Q_OBJECT\n+private:\n+    const std::vector<Kernel::SharedPtr<Kernel::WaitObject>>& object_list;\n+    bool wait_all;\n+public:\n+    WaitTreeObjectList(const std::vector<Kernel::SharedPtr<Kernel::WaitObject>>& list, bool wait_all);\n+    virtual QString GetText() const override;\n+    virtual std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override;\n+};\n+class WaitTreeThread : public WaitTreeWaitObject {\n+    Q_OBJECT\n+public:\n+    WaitTreeThread(const Kernel::Thread& thread);\n+    virtual QString GetText() const override;\n+    virtual std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override;\n+};\n+class WaitTreeEvent : public WaitTreeWaitObject {\n+    Q_OBJECT\n+public:\n+    WaitTreeEvent(const Kernel::Event& object);\n+    virtual std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override;\n+};\n+class WaitTreeMutex : public WaitTreeWaitObject {\n+    Q_OBJECT\n+public:\n+    WaitTreeMutex(const Kernel::Mutex& object);\n+    virtual std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override;\n+};\n+class WaitTreeSemaphore : public WaitTreeWaitObject {\n+    Q_OBJECT\n+public:\n+    WaitTreeSemaphore(const Kernel::Semaphore& object);\n+    virtual std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override;\n+};\n+\n+class WaitTreeTimer : public WaitTreeWaitObject {\n+    Q_OBJECT\n+public:\n+    WaitTreeTimer(const Kernel::Timer& object);\n+\n+    virtual std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override;\n+};\n+\n+class WaitTreeMutexList : public WaitTreeExpandableItem {\n+    Q_OBJECT\n+private:\n+    const boost::container::flat_set<Kernel::SharedPtr<Kernel::Mutex>>& mutex_list;\n+public:\n+    WaitTreeMutexList(const boost::container::flat_set<Kernel::SharedPtr<Kernel::Mutex>>& list);\n+    virtual QString GetText() const override;\n+    virtual std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override;\n+};\n+\n+class WaitTreeThreadList : public WaitTreeExpandableItem {\n+    Q_OBJECT\n+private:","path":"src/citra_qt/debugger/wait_tree.h","position":106,"original_position":106,"commit_id":"36055b5d5d39a9a0be90c3061afff1896a314c0c","original_commit_id":"36055b5d5d39a9a0be90c3061afff1896a314c0c","user":{"login":"lioncash","id":712067,"avatar_url":"https://avatars.githubusercontent.com/u/712067?v=3","gravatar_id":"","url":"https://api.github.com/users/lioncash","html_url":"https://github.com/lioncash","followers_url":"https://api.github.com/users/lioncash/followers","following_url":"https://api.github.com/users/lioncash/following{/other_user}","gists_url":"https://api.github.com/users/lioncash/gists{/gist_id}","starred_url":"https://api.github.com/users/lioncash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lioncash/subscriptions","organizations_url":"https://api.github.com/users/lioncash/orgs","repos_url":"https://api.github.com/users/lioncash/repos","events_url":"https://api.github.com/users/lioncash/events{/privacy}","received_events_url":"https://api.github.com/users/lioncash/received_events","type":"User","site_admin":false},"body":"public interface should come first.","created_at":"2016-04-08T16:57:35Z","updated_at":"2016-04-08T16:57:35Z","html_url":"https://github.com/citra-emu/citra/pull/1652#discussion_r59056140","pull_request_url":"https://api.github.com/repos/citra-emu/citra/pulls/1652","_links":{"self":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/comments/59056140"},"html":{"href":"https://github.com/citra-emu/citra/pull/1652#discussion_r59056140"},"pull_request":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/1652"}}},"pull_request":{"url":"https://api.github.com/repos/citra-emu/citra/pulls/1652","id":65814351,"html_url":"https://github.com/citra-emu/citra/pull/1652","diff_url":"https://github.com/citra-emu/citra/pull/1652.diff","patch_url":"https://github.com/citra-emu/citra/pull/1652.patch","issue_url":"https://api.github.com/repos/citra-emu/citra/issues/1652","number":1652,"state":"open","locked":false,"title":"Frontend: implement wait tree widget","user":{"login":"wwylele","id":4592895,"avatar_url":"https://avatars.githubusercontent.com/u/4592895?v=3","gravatar_id":"","url":"https://api.github.com/users/wwylele","html_url":"https://github.com/wwylele","followers_url":"https://api.github.com/users/wwylele/followers","following_url":"https://api.github.com/users/wwylele/following{/other_user}","gists_url":"https://api.github.com/users/wwylele/gists{/gist_id}","starred_url":"https://api.github.com/users/wwylele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wwylele/subscriptions","organizations_url":"https://api.github.com/users/wwylele/orgs","repos_url":"https://api.github.com/users/wwylele/repos","events_url":"https://api.github.com/users/wwylele/events{/privacy}","received_events_url":"https://api.github.com/users/wwylele/received_events","type":"User","site_admin":false},"body":"I just found this in the TODO list and gave a try. \r\nHow it looks:\r\n![wt](https://cloud.githubusercontent.com/assets/4592895/14390742/40cb1ae2-fdc1-11e5-99e9-6b96dda9b9c1.PNG)\r\nWhen game is paused, it lists all threads, and show their status and what are they waiting for (recursively).\r\nNeeds more testing, because I don't have many games to test all cases.\r\nAlso please help improve the expression in the \"tree view\" (list view in fact)\r\nIf this is what it supposed to be, I will also try implementing other debugger.","created_at":"2016-04-08T16:44:05Z","updated_at":"2016-04-08T16:57:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eec295ad6527a239d2cecf71701ba82e05cb345d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/citra-emu/citra/pulls/1652/commits","review_comments_url":"https://api.github.com/repos/citra-emu/citra/pulls/1652/comments","review_comment_url":"https://api.github.com/repos/citra-emu/citra/pulls/comments{/number}","comments_url":"https://api.github.com/repos/citra-emu/citra/issues/1652/comments","statuses_url":"https://api.github.com/repos/citra-emu/citra/statuses/36055b5d5d39a9a0be90c3061afff1896a314c0c","head":{"label":"wwylele:kernal-tool","ref":"kernal-tool","sha":"36055b5d5d39a9a0be90c3061afff1896a314c0c","user":{"login":"wwylele","id":4592895,"avatar_url":"https://avatars.githubusercontent.com/u/4592895?v=3","gravatar_id":"","url":"https://api.github.com/users/wwylele","html_url":"https://github.com/wwylele","followers_url":"https://api.github.com/users/wwylele/followers","following_url":"https://api.github.com/users/wwylele/following{/other_user}","gists_url":"https://api.github.com/users/wwylele/gists{/gist_id}","starred_url":"https://api.github.com/users/wwylele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wwylele/subscriptions","organizations_url":"https://api.github.com/users/wwylele/orgs","repos_url":"https://api.github.com/users/wwylele/repos","events_url":"https://api.github.com/users/wwylele/events{/privacy}","received_events_url":"https://api.github.com/users/wwylele/received_events","type":"User","site_admin":false},"repo":{"id":53776373,"name":"citra","full_name":"wwylele/citra","owner":{"login":"wwylele","id":4592895,"avatar_url":"https://avatars.githubusercontent.com/u/4592895?v=3","gravatar_id":"","url":"https://api.github.com/users/wwylele","html_url":"https://github.com/wwylele","followers_url":"https://api.github.com/users/wwylele/followers","following_url":"https://api.github.com/users/wwylele/following{/other_user}","gists_url":"https://api.github.com/users/wwylele/gists{/gist_id}","starred_url":"https://api.github.com/users/wwylele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wwylele/subscriptions","organizations_url":"https://api.github.com/users/wwylele/orgs","repos_url":"https://api.github.com/users/wwylele/repos","events_url":"https://api.github.com/users/wwylele/events{/privacy}","received_events_url":"https://api.github.com/users/wwylele/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wwylele/citra","description":"Nintendo 3DS Emulator","fork":true,"url":"https://api.github.com/repos/wwylele/citra","forks_url":"https://api.github.com/repos/wwylele/citra/forks","keys_url":"https://api.github.com/repos/wwylele/citra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wwylele/citra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wwylele/citra/teams","hooks_url":"https://api.github.com/repos/wwylele/citra/hooks","issue_events_url":"https://api.github.com/repos/wwylele/citra/issues/events{/number}","events_url":"https://api.github.com/repos/wwylele/citra/events","assignees_url":"https://api.github.com/repos/wwylele/citra/assignees{/user}","branches_url":"https://api.github.com/repos/wwylele/citra/branches{/branch}","tags_url":"https://api.github.com/repos/wwylele/citra/tags","blobs_url":"https://api.github.com/repos/wwylele/citra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wwylele/citra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wwylele/citra/git/refs{/sha}","trees_url":"https://api.github.com/repos/wwylele/citra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wwylele/citra/statuses/{sha}","languages_url":"https://api.github.com/repos/wwylele/citra/languages","stargazers_url":"https://api.github.com/repos/wwylele/citra/stargazers","contributors_url":"https://api.github.com/repos/wwylele/citra/contributors","subscribers_url":"https://api.github.com/repos/wwylele/citra/subscribers","subscription_url":"https://api.github.com/repos/wwylele/citra/subscription","commits_url":"https://api.github.com/repos/wwylele/citra/commits{/sha}","git_commits_url":"https://api.github.com/repos/wwylele/citra/git/commits{/sha}","comments_url":"https://api.github.com/repos/wwylele/citra/comments{/number}","issue_comment_url":"https://api.github.com/repos/wwylele/citra/issues/comments{/number}","contents_url":"https://api.github.com/repos/wwylele/citra/contents/{+path}","compare_url":"https://api.github.com/repos/wwylele/citra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wwylele/citra/merges","archive_url":"https://api.github.com/repos/wwylele/citra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wwylele/citra/downloads","issues_url":"https://api.github.com/repos/wwylele/citra/issues{/number}","pulls_url":"https://api.github.com/repos/wwylele/citra/pulls{/number}","milestones_url":"https://api.github.com/repos/wwylele/citra/milestones{/number}","notifications_url":"https://api.github.com/repos/wwylele/citra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wwylele/citra/labels{/name}","releases_url":"https://api.github.com/repos/wwylele/citra/releases{/id}","deployments_url":"https://api.github.com/repos/wwylele/citra/deployments","created_at":"2016-03-13T09:09:07Z","updated_at":"2016-03-13T09:09:11Z","pushed_at":"2016-04-08T16:29:22Z","git_url":"git://github.com/wwylele/citra.git","ssh_url":"git@github.com:wwylele/citra.git","clone_url":"https://github.com/wwylele/citra.git","svn_url":"https://github.com/wwylele/citra","homepage":"https://citra-emu.org","size":11933,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"citra-emu:master","ref":"master","sha":"f3ba678b81ea68eaaa2aa40ccda213682d8d1a98","user":{"login":"citra-emu","id":7605670,"avatar_url":"https://avatars.githubusercontent.com/u/7605670?v=3","gravatar_id":"","url":"https://api.github.com/users/citra-emu","html_url":"https://github.com/citra-emu","followers_url":"https://api.github.com/users/citra-emu/followers","following_url":"https://api.github.com/users/citra-emu/following{/other_user}","gists_url":"https://api.github.com/users/citra-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/citra-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citra-emu/subscriptions","organizations_url":"https://api.github.com/users/citra-emu/orgs","repos_url":"https://api.github.com/users/citra-emu/repos","events_url":"https://api.github.com/users/citra-emu/events{/privacy}","received_events_url":"https://api.github.com/users/citra-emu/received_events","type":"Organization","site_admin":false},"repo":{"id":19866730,"name":"citra","full_name":"citra-emu/citra","owner":{"login":"citra-emu","id":7605670,"avatar_url":"https://avatars.githubusercontent.com/u/7605670?v=3","gravatar_id":"","url":"https://api.github.com/users/citra-emu","html_url":"https://github.com/citra-emu","followers_url":"https://api.github.com/users/citra-emu/followers","following_url":"https://api.github.com/users/citra-emu/following{/other_user}","gists_url":"https://api.github.com/users/citra-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/citra-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citra-emu/subscriptions","organizations_url":"https://api.github.com/users/citra-emu/orgs","repos_url":"https://api.github.com/users/citra-emu/repos","events_url":"https://api.github.com/users/citra-emu/events{/privacy}","received_events_url":"https://api.github.com/users/citra-emu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/citra-emu/citra","description":"Nintendo 3DS Emulator","fork":false,"url":"https://api.github.com/repos/citra-emu/citra","forks_url":"https://api.github.com/repos/citra-emu/citra/forks","keys_url":"https://api.github.com/repos/citra-emu/citra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/citra-emu/citra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/citra-emu/citra/teams","hooks_url":"https://api.github.com/repos/citra-emu/citra/hooks","issue_events_url":"https://api.github.com/repos/citra-emu/citra/issues/events{/number}","events_url":"https://api.github.com/repos/citra-emu/citra/events","assignees_url":"https://api.github.com/repos/citra-emu/citra/assignees{/user}","branches_url":"https://api.github.com/repos/citra-emu/citra/branches{/branch}","tags_url":"https://api.github.com/repos/citra-emu/citra/tags","blobs_url":"https://api.github.com/repos/citra-emu/citra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/citra-emu/citra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/citra-emu/citra/git/refs{/sha}","trees_url":"https://api.github.com/repos/citra-emu/citra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/citra-emu/citra/statuses/{sha}","languages_url":"https://api.github.com/repos/citra-emu/citra/languages","stargazers_url":"https://api.github.com/repos/citra-emu/citra/stargazers","contributors_url":"https://api.github.com/repos/citra-emu/citra/contributors","subscribers_url":"https://api.github.com/repos/citra-emu/citra/subscribers","subscription_url":"https://api.github.com/repos/citra-emu/citra/subscription","commits_url":"https://api.github.com/repos/citra-emu/citra/commits{/sha}","git_commits_url":"https://api.github.com/repos/citra-emu/citra/git/commits{/sha}","comments_url":"https://api.github.com/repos/citra-emu/citra/comments{/number}","issue_comment_url":"https://api.github.com/repos/citra-emu/citra/issues/comments{/number}","contents_url":"https://api.github.com/repos/citra-emu/citra/contents/{+path}","compare_url":"https://api.github.com/repos/citra-emu/citra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/citra-emu/citra/merges","archive_url":"https://api.github.com/repos/citra-emu/citra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/citra-emu/citra/downloads","issues_url":"https://api.github.com/repos/citra-emu/citra/issues{/number}","pulls_url":"https://api.github.com/repos/citra-emu/citra/pulls{/number}","milestones_url":"https://api.github.com/repos/citra-emu/citra/milestones{/number}","notifications_url":"https://api.github.com/repos/citra-emu/citra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/citra-emu/citra/labels{/name}","releases_url":"https://api.github.com/repos/citra-emu/citra/releases{/id}","deployments_url":"https://api.github.com/repos/citra-emu/citra/deployments","created_at":"2014-05-16T18:33:15Z","updated_at":"2016-04-07T15:00:51Z","pushed_at":"2016-04-08T16:44:05Z","git_url":"git://github.com/citra-emu/citra.git","ssh_url":"git@github.com:citra-emu/citra.git","clone_url":"https://github.com/citra-emu/citra.git","svn_url":"https://github.com/citra-emu/citra","homepage":"https://citra-emu.org","size":19341,"stargazers_count":1683,"watchers_count":1683,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":394,"mirror_url":null,"open_issues_count":206,"forks":394,"open_issues":206,"watchers":1683,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/1652"},"html":{"href":"https://github.com/citra-emu/citra/pull/1652"},"issue":{"href":"https://api.github.com/repos/citra-emu/citra/issues/1652"},"comments":{"href":"https://api.github.com/repos/citra-emu/citra/issues/1652/comments"},"review_comments":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/1652/comments"},"review_comment":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/1652/commits"},"statuses":{"href":"https://api.github.com/repos/citra-emu/citra/statuses/36055b5d5d39a9a0be90c3061afff1896a314c0c"}}}}