{"action":"created","comment":{"url":"https://api.github.com/repos/citra-emu/citra/pulls/comments/210680071","pull_request_review_id":146946612,"id":210680071,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMDY4MDA3MQ==","diff_hunk":"@@ -144,12 +150,78 @@ struct Breakpoint {\n     bool active;\n     PAddr addr;\n     u32 len;\n+    std::array<u8, 4> inst;\n };\n \n static std::map<u32, Breakpoint> breakpoints_execute;\n static std::map<u32, Breakpoint> breakpoints_read;\n static std::map<u32, Breakpoint> breakpoints_write;\n \n+static Kernel::Thread* FindThreadById(int id) {\n+    const auto& threads = Kernel::GetThreadList();\n+    for (auto& thread : threads) {\n+        if (thread->GetThreadId() == static_cast<u32>(id)) {\n+            return thread.get();\n+        }\n+    }\n+    return nullptr;\n+}\n+\n+static u32 RegRead(std::size_t id, Kernel::Thread* thread = nullptr) {\n+    if (!thread) {\n+        return 0;\n+    }\n+\n+    if (id <= PC_REGISTER) {\n+        return thread->context->GetCpuRegister(id);\n+    } else if (id == CPSR_REGISTER) {\n+        return thread->context->GetCpsr();\n+    } else {\n+        return 0;\n+    }\n+}\n+\n+static void RegWrite(std::size_t id, u32 val, Kernel::Thread* thread = nullptr) {\n+    if (!thread) {\n+        return;\n+    }\n+\n+    if (id <= PC_REGISTER) {\n+        return thread->context->SetCpuRegister(id, val);\n+    } else if (id == CPSR_REGISTER) {\n+        return thread->context->SetCpsr(val);\n+    }\n+}\n+\n+static u64 FpuRead(std::size_t id, Kernel::Thread* thread = nullptr) {\n+    if (!thread) {\n+        return 0;\n+    }\n+\n+    if (id >= D0_REGISTER && id < FPSCR_REGISTER) {\n+        u64 ret = thread->context->GetFpuRegister(2 * (id - D0_REGISTER));\n+        ret |= static_cast<u64>(thread->context->GetFpuRegister(2 * (id - D0_REGISTER) + 1)) << 32;\n+        return ret;\n+    } else if (id == FPSCR_REGISTER) {\n+        return thread->context->GetFpscr();\n+    } else {\n+        return 0;\n+    }\n+}\n+\n+static void FpuWrite(std::size_t id, u64 val, Kernel::Thread* thread = nullptr) {\n+    if (!thread) {\n+        return;\n+    }\n+\n+    if (id >= D0_REGISTER && id < FPSCR_REGISTER) {\n+        thread->context->SetFpuRegister(2 * (id - D0_REGISTER), (u32)val);","path":"src/core/gdbstub/gdbstub.cpp","position":111,"original_position":111,"commit_id":"a6ecb3c9135048b53b43ff17dde850095731315d","original_commit_id":"a6ecb3c9135048b53b43ff17dde850095731315d","user":{"login":"lioncash","id":712067,"node_id":"MDQ6VXNlcjcxMjA2Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/712067?v=4","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":"`static_cast`, also `val >> 32` should also be enclosed in a static_cast.","created_at":"2018-08-16T17:33:35Z","updated_at":"2018-08-16T17:34:58Z","html_url":"https://github.com/citra-emu/citra/pull/4101#discussion_r210680071","pull_request_url":"https://api.github.com/repos/citra-emu/citra/pulls/4101","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/comments/210680071"},"html":{"href":"https://github.com/citra-emu/citra/pull/4101#discussion_r210680071"},"pull_request":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/4101"}}},"pull_request":{"url":"https://api.github.com/repos/citra-emu/citra/pulls/4101","id":208801764,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4ODAxNzY0","html_url":"https://github.com/citra-emu/citra/pull/4101","diff_url":"https://github.com/citra-emu/citra/pull/4101.diff","patch_url":"https://github.com/citra-emu/citra/pull/4101.patch","issue_url":"https://api.github.com/repos/citra-emu/citra/issues/4101","number":4101,"state":"open","locked":false,"title":"GDB Modernization","user":{"login":"Hedges","id":3001146,"node_id":"MDQ6VXNlcjMwMDExNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/3001146?v=4","gravatar_id":"","url":"https://api.github.com/users/Hedges","html_url":"https://github.com/Hedges","followers_url":"https://api.github.com/users/Hedges/followers","following_url":"https://api.github.com/users/Hedges/following{/other_user}","gists_url":"https://api.github.com/users/Hedges/gists{/gist_id}","starred_url":"https://api.github.com/users/Hedges/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hedges/subscriptions","organizations_url":"https://api.github.com/users/Hedges/orgs","repos_url":"https://api.github.com/users/Hedges/repos","events_url":"https://api.github.com/users/Hedges/events{/privacy}","received_events_url":"https://api.github.com/users/Hedges/received_events","type":"User","site_admin":false},"body":"- Can be used in either DynCom or Dynarmic mode\r\n- Added support for threads\r\n- Proper support for FPU registers\r\n- Fix for NibbleToHex conversion that used to produce false error codes\r\n- Fix for clang-format failing under Windows\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/citra-emu/citra/4101)\n<!-- Reviewable:end -->\n","created_at":"2018-08-16T09:44:04Z","updated_at":"2018-08-16T17:34:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b908f1a776f13faa63b9a85af2b039984f683a4b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/citra-emu/citra/pulls/4101/commits","review_comments_url":"https://api.github.com/repos/citra-emu/citra/pulls/4101/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/4101/comments","statuses_url":"https://api.github.com/repos/citra-emu/citra/statuses/a6ecb3c9135048b53b43ff17dde850095731315d","head":{"label":"Hedges:GDBClean","ref":"GDBClean","sha":"a6ecb3c9135048b53b43ff17dde850095731315d","user":{"login":"Hedges","id":3001146,"node_id":"MDQ6VXNlcjMwMDExNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/3001146?v=4","gravatar_id":"","url":"https://api.github.com/users/Hedges","html_url":"https://github.com/Hedges","followers_url":"https://api.github.com/users/Hedges/followers","following_url":"https://api.github.com/users/Hedges/following{/other_user}","gists_url":"https://api.github.com/users/Hedges/gists{/gist_id}","starred_url":"https://api.github.com/users/Hedges/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hedges/subscriptions","organizations_url":"https://api.github.com/users/Hedges/orgs","repos_url":"https://api.github.com/users/Hedges/repos","events_url":"https://api.github.com/users/Hedges/events{/privacy}","received_events_url":"https://api.github.com/users/Hedges/received_events","type":"User","site_admin":false},"repo":{"id":144158602,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQxNTg2MDI=","name":"citra","full_name":"Hedges/citra","owner":{"login":"Hedges","id":3001146,"node_id":"MDQ6VXNlcjMwMDExNDY=","avatar_url":"https://avatars2.githubusercontent.com/u/3001146?v=4","gravatar_id":"","url":"https://api.github.com/users/Hedges","html_url":"https://github.com/Hedges","followers_url":"https://api.github.com/users/Hedges/followers","following_url":"https://api.github.com/users/Hedges/following{/other_user}","gists_url":"https://api.github.com/users/Hedges/gists{/gist_id}","starred_url":"https://api.github.com/users/Hedges/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hedges/subscriptions","organizations_url":"https://api.github.com/users/Hedges/orgs","repos_url":"https://api.github.com/users/Hedges/repos","events_url":"https://api.github.com/users/Hedges/events{/privacy}","received_events_url":"https://api.github.com/users/Hedges/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Hedges/citra","description":"A Nintendo 3DS Emulator","fork":true,"url":"https://api.github.com/repos/Hedges/citra","forks_url":"https://api.github.com/repos/Hedges/citra/forks","keys_url":"https://api.github.com/repos/Hedges/citra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Hedges/citra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Hedges/citra/teams","hooks_url":"https://api.github.com/repos/Hedges/citra/hooks","issue_events_url":"https://api.github.com/repos/Hedges/citra/issues/events{/number}","events_url":"https://api.github.com/repos/Hedges/citra/events","assignees_url":"https://api.github.com/repos/Hedges/citra/assignees{/user}","branches_url":"https://api.github.com/repos/Hedges/citra/branches{/branch}","tags_url":"https://api.github.com/repos/Hedges/citra/tags","blobs_url":"https://api.github.com/repos/Hedges/citra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Hedges/citra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Hedges/citra/git/refs{/sha}","trees_url":"https://api.github.com/repos/Hedges/citra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Hedges/citra/statuses/{sha}","languages_url":"https://api.github.com/repos/Hedges/citra/languages","stargazers_url":"https://api.github.com/repos/Hedges/citra/stargazers","contributors_url":"https://api.github.com/repos/Hedges/citra/contributors","subscribers_url":"https://api.github.com/repos/Hedges/citra/subscribers","subscription_url":"https://api.github.com/repos/Hedges/citra/subscription","commits_url":"https://api.github.com/repos/Hedges/citra/commits{/sha}","git_commits_url":"https://api.github.com/repos/Hedges/citra/git/commits{/sha}","comments_url":"https://api.github.com/repos/Hedges/citra/comments{/number}","issue_comment_url":"https://api.github.com/repos/Hedges/citra/issues/comments{/number}","contents_url":"https://api.github.com/repos/Hedges/citra/contents/{+path}","compare_url":"https://api.github.com/repos/Hedges/citra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Hedges/citra/merges","archive_url":"https://api.github.com/repos/Hedges/citra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Hedges/citra/downloads","issues_url":"https://api.github.com/repos/Hedges/citra/issues{/number}","pulls_url":"https://api.github.com/repos/Hedges/citra/pulls{/number}","milestones_url":"https://api.github.com/repos/Hedges/citra/milestones{/number}","notifications_url":"https://api.github.com/repos/Hedges/citra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Hedges/citra/labels{/name}","releases_url":"https://api.github.com/repos/Hedges/citra/releases{/id}","deployments_url":"https://api.github.com/repos/Hedges/citra/deployments","created_at":"2018-08-09T13:46:36Z","updated_at":"2018-08-16T09:06:40Z","pushed_at":"2018-08-16T15:24:30Z","git_url":"git://github.com/Hedges/citra.git","ssh_url":"git@github.com:Hedges/citra.git","clone_url":"https://github.com/Hedges/citra.git","svn_url":"https://github.com/Hedges/citra","homepage":"https://citra-emu.org","size":24163,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"citra-emu:master","ref":"master","sha":"5c5aad09ce754bbfefc36ad74a9fa52214595950","user":{"login":"citra-emu","id":7605670,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2MDU2NzA=","avatar_url":"https://avatars1.githubusercontent.com/u/7605670?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnkxOTg2NjczMA==","name":"citra","full_name":"citra-emu/citra","owner":{"login":"citra-emu","id":7605670,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2MDU2NzA=","avatar_url":"https://avatars1.githubusercontent.com/u/7605670?v=4","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":"A 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":"2018-08-16T17:13:39Z","pushed_at":"2018-08-16T15:24:38Z","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":37975,"stargazers_count":4176,"watchers_count":4176,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":935,"mirror_url":null,"archived":false,"open_issues_count":366,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":935,"open_issues":366,"watchers":4176,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/4101"},"html":{"href":"https://github.com/citra-emu/citra/pull/4101"},"issue":{"href":"https://api.github.com/repos/citra-emu/citra/issues/4101"},"comments":{"href":"https://api.github.com/repos/citra-emu/citra/issues/4101/comments"},"review_comments":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/4101/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/4101/commits"},"statuses":{"href":"https://api.github.com/repos/citra-emu/citra/statuses/a6ecb3c9135048b53b43ff17dde850095731315d"}},"author_association":"NONE"}}
{"actor":{"display_login":"lioncash"}}