{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/ds2/pulls/comments/62428617","id":62428617,"diff_hunk":"@@ -195,6 +195,26 @@ ErrorCode Mach::step(ProcessThreadId const &ptid, ProcessInfo const &pinfo,\n   return kErrorUnsupported;\n }\n \n+ErrorCode Mach::enableHardwareSingleStep(ProcessThreadId const &ptid,","path":"Sources/Host/Darwin/Mach.cpp","position":210,"original_position":13,"commit_id":"f24462aed8f61271695a3f10bb82520300f809ea","original_commit_id":"c6742d284888bba65c521effa600e9421a2756f3","user":{"login":"sas","id":51052,"avatar_url":"https://avatars.githubusercontent.com/u/51052?v=3","gravatar_id":"","url":"https://api.github.com/users/sas","html_url":"https://github.com/sas","followers_url":"https://api.github.com/users/sas/followers","following_url":"https://api.github.com/users/sas/following{/other_user}","gists_url":"https://api.github.com/users/sas/gists{/gist_id}","starred_url":"https://api.github.com/users/sas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sas/subscriptions","organizations_url":"https://api.github.com/users/sas/orgs","repos_url":"https://api.github.com/users/sas/repos","events_url":"https://api.github.com/users/sas/events{/privacy}","received_events_url":"https://api.github.com/users/sas/received_events","type":"User","site_admin":false},"body":"This shouldn't be here.","created_at":"2016-05-08T08:07:41Z","updated_at":"2016-05-08T08:07:41Z","html_url":"https://github.com/facebook/ds2/pull/197#discussion_r62428617","pull_request_url":"https://api.github.com/repos/facebook/ds2/pulls/197","_links":{"self":{"href":"https://api.github.com/repos/facebook/ds2/pulls/comments/62428617"},"html":{"href":"https://github.com/facebook/ds2/pull/197#discussion_r62428617"},"pull_request":{"href":"https://api.github.com/repos/facebook/ds2/pulls/197"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/ds2/pulls/197","id":60047804,"html_url":"https://github.com/facebook/ds2/pull/197","diff_url":"https://github.com/facebook/ds2/pull/197.diff","patch_url":"https://github.com/facebook/ds2/pull/197.patch","issue_url":"https://api.github.com/repos/facebook/ds2/issues/197","number":197,"state":"open","locked":false,"title":"Base of the support of MacOSX","user":{"login":"kokarez","id":2339063,"avatar_url":"https://avatars.githubusercontent.com/u/2339063?v=3","gravatar_id":"","url":"https://api.github.com/users/kokarez","html_url":"https://github.com/kokarez","followers_url":"https://api.github.com/users/kokarez/followers","following_url":"https://api.github.com/users/kokarez/following{/other_user}","gists_url":"https://api.github.com/users/kokarez/gists{/gist_id}","starred_url":"https://api.github.com/users/kokarez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kokarez/subscriptions","organizations_url":"https://api.github.com/users/kokarez/orgs","repos_url":"https://api.github.com/users/kokarez/repos","events_url":"https://api.github.com/users/kokarez/events{/privacy}","received_events_url":"https://api.github.com/users/kokarez/received_events","type":"User","site_admin":false},"body":"Hi, first of all, sorry it's not a lightweight patch :) Ask me how you prefer it and I will do it!\r\n\r\nMacOSX support status:\r\n  - Compile\r\n  - Read most of the process info with LibProc\r\n  - PTrace is fully (?) support (since the 10% offered by mac was already here)\r\n  - Mach base communication done task/thread\r\n  - Can read the register of a thread\r\n  - Can read in the memory of the application\r\n  - Certification work (needed to use mach arch)\r\n\r\nTodo:\r\n  - Compile on travis (travis already propose OSX env)\r\n  - write in memory\r\n  - set cpu state\r\n  - get memory region\r\n  - clean the certification plist.\r\n  - auto test :)\r\n\r\nHere's an example with a basic app:\r\n```gdb\r\n(lldb) target create \"./a.out\"\r\nCurrent executable set to './a.out' (x86_64).\r\n(lldb) gdb-remote localhost:4243\r\nProcess 46277 stopped\r\n* thread #1: tid = 0xb4c5, 0x00007fff668c8000, stop reason = signal SIGTRAP\r\n    frame #0: 0x00007fff668c8000\r\n->  0x7fff668c8000: popq   %rdi\r\n    0x7fff668c8001: pushq  $0x0\r\n    0x7fff668c8003: movq   %rsp, %rbp\r\n    0x7fff668c8006: andq   $-0x10, %rsp\r\n(lldb) x/20i 0x7fff668c8000\r\n->  0x7fff668c8000: 5f                    popq   %rdi\r\n    0x7fff668c8001: 6a 00                 pushq  $0x0\r\n    0x7fff668c8003: 48 89 e5              movq   %rsp, %rbp\r\n    0x7fff668c8006: 48 83 e4 f0           andq   $-0x10, %rsp\r\n    0x7fff668c800a: 48 83 ec 10           subq   $0x10, %rsp\r\n    0x7fff668c800e: 8b 75 08              movl   0x8(%rbp), %esi\r\n    0x7fff668c8011: 48 8d 55 10           leaq   0x10(%rbp), %rdx\r\n    0x7fff668c8015: 4c 8b 05 ec 7a 03 00  movq   0x37aec(%rip), %r8\r\n    0x7fff668c801c: 48 8d 0d dd ff ff ff  leaq   -0x23(%rip), %rcx\r\n    0x7fff668c8023: 4c 29 c1              subq   %r8, %rcx\r\n    0x7fff668c8026: 4c 8d 05 d3 ef ff ff  leaq   -0x102d(%rip), %r8\r\n    0x7fff668c802d: 4c 8d 4d f8           leaq   -0x8(%rbp), %r9\r\n    0x7fff668c8031: e8 40 00 00 00        callq  0x7fff668c8076\r\n    0x7fff668c8036: 48 8b 7d f8           movq   -0x8(%rbp), %rdi\r\n    0x7fff668c803a: 48 83 ff 00           cmpq   $0x0, %rdi\r\n    0x7fff668c803e: 75 10                 jne    0x7fff668c8050\r\n    0x7fff668c8040: 48 89 ec              movq   %rbp, %rsp\r\n    0x7fff668c8043: 48 83 c4 08           addq   $0x8, %rsp\r\n    0x7fff668c8047: 48 c7 c5 00 00 00 00  movq   $0x0, %rbp\r\n    0x7fff668c804e: ff e0                 jmpq   *%rax\r\n```\r\n\r\nIt's look like code, and after multiple reboot, I get the same code. So I suppose it's working :D \r\n\r\nThanks in advance for your time, and have fun reading!","created_at":"2016-02-20T13:13:10Z","updated_at":"2016-05-08T08:07:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a587b5fac324ab81b70be54e9cfe5b7e520d7625","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/ds2/pulls/197/commits","review_comments_url":"https://api.github.com/repos/facebook/ds2/pulls/197/comments","review_comment_url":"https://api.github.com/repos/facebook/ds2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/ds2/issues/197/comments","statuses_url":"https://api.github.com/repos/facebook/ds2/statuses/f24462aed8f61271695a3f10bb82520300f809ea","head":{"label":"kokarez:feature/MacOSX","ref":"feature/MacOSX","sha":"f24462aed8f61271695a3f10bb82520300f809ea","user":{"login":"kokarez","id":2339063,"avatar_url":"https://avatars.githubusercontent.com/u/2339063?v=3","gravatar_id":"","url":"https://api.github.com/users/kokarez","html_url":"https://github.com/kokarez","followers_url":"https://api.github.com/users/kokarez/followers","following_url":"https://api.github.com/users/kokarez/following{/other_user}","gists_url":"https://api.github.com/users/kokarez/gists{/gist_id}","starred_url":"https://api.github.com/users/kokarez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kokarez/subscriptions","organizations_url":"https://api.github.com/users/kokarez/orgs","repos_url":"https://api.github.com/users/kokarez/repos","events_url":"https://api.github.com/users/kokarez/events{/privacy}","received_events_url":"https://api.github.com/users/kokarez/received_events","type":"User","site_admin":false},"repo":{"id":51998638,"name":"ds2","full_name":"kokarez/ds2","owner":{"login":"kokarez","id":2339063,"avatar_url":"https://avatars.githubusercontent.com/u/2339063?v=3","gravatar_id":"","url":"https://api.github.com/users/kokarez","html_url":"https://github.com/kokarez","followers_url":"https://api.github.com/users/kokarez/followers","following_url":"https://api.github.com/users/kokarez/following{/other_user}","gists_url":"https://api.github.com/users/kokarez/gists{/gist_id}","starred_url":"https://api.github.com/users/kokarez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kokarez/subscriptions","organizations_url":"https://api.github.com/users/kokarez/orgs","repos_url":"https://api.github.com/users/kokarez/repos","events_url":"https://api.github.com/users/kokarez/events{/privacy}","received_events_url":"https://api.github.com/users/kokarez/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kokarez/ds2","description":"Debug server for lldb.","fork":true,"url":"https://api.github.com/repos/kokarez/ds2","forks_url":"https://api.github.com/repos/kokarez/ds2/forks","keys_url":"https://api.github.com/repos/kokarez/ds2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kokarez/ds2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kokarez/ds2/teams","hooks_url":"https://api.github.com/repos/kokarez/ds2/hooks","issue_events_url":"https://api.github.com/repos/kokarez/ds2/issues/events{/number}","events_url":"https://api.github.com/repos/kokarez/ds2/events","assignees_url":"https://api.github.com/repos/kokarez/ds2/assignees{/user}","branches_url":"https://api.github.com/repos/kokarez/ds2/branches{/branch}","tags_url":"https://api.github.com/repos/kokarez/ds2/tags","blobs_url":"https://api.github.com/repos/kokarez/ds2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kokarez/ds2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kokarez/ds2/git/refs{/sha}","trees_url":"https://api.github.com/repos/kokarez/ds2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kokarez/ds2/statuses/{sha}","languages_url":"https://api.github.com/repos/kokarez/ds2/languages","stargazers_url":"https://api.github.com/repos/kokarez/ds2/stargazers","contributors_url":"https://api.github.com/repos/kokarez/ds2/contributors","subscribers_url":"https://api.github.com/repos/kokarez/ds2/subscribers","subscription_url":"https://api.github.com/repos/kokarez/ds2/subscription","commits_url":"https://api.github.com/repos/kokarez/ds2/commits{/sha}","git_commits_url":"https://api.github.com/repos/kokarez/ds2/git/commits{/sha}","comments_url":"https://api.github.com/repos/kokarez/ds2/comments{/number}","issue_comment_url":"https://api.github.com/repos/kokarez/ds2/issues/comments{/number}","contents_url":"https://api.github.com/repos/kokarez/ds2/contents/{+path}","compare_url":"https://api.github.com/repos/kokarez/ds2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kokarez/ds2/merges","archive_url":"https://api.github.com/repos/kokarez/ds2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kokarez/ds2/downloads","issues_url":"https://api.github.com/repos/kokarez/ds2/issues{/number}","pulls_url":"https://api.github.com/repos/kokarez/ds2/pulls{/number}","milestones_url":"https://api.github.com/repos/kokarez/ds2/milestones{/number}","notifications_url":"https://api.github.com/repos/kokarez/ds2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kokarez/ds2/labels{/name}","releases_url":"https://api.github.com/repos/kokarez/ds2/releases{/id}","deployments_url":"https://api.github.com/repos/kokarez/ds2/deployments","created_at":"2016-02-18T10:12:42Z","updated_at":"2016-02-18T10:12:44Z","pushed_at":"2016-05-08T07:51:31Z","git_url":"git://github.com/kokarez/ds2.git","ssh_url":"git@github.com:kokarez/ds2.git","clone_url":"https://github.com/kokarez/ds2.git","svn_url":"https://github.com/kokarez/ds2","homepage":null,"size":1720,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"facebook:master","ref":"master","sha":"1c296bb1f9f577490937b8afff831728eea8dfd8","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":25325140,"name":"ds2","full_name":"facebook/ds2","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/ds2","description":"Debug server for lldb.","fork":false,"url":"https://api.github.com/repos/facebook/ds2","forks_url":"https://api.github.com/repos/facebook/ds2/forks","keys_url":"https://api.github.com/repos/facebook/ds2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/ds2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/ds2/teams","hooks_url":"https://api.github.com/repos/facebook/ds2/hooks","issue_events_url":"https://api.github.com/repos/facebook/ds2/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/ds2/events","assignees_url":"https://api.github.com/repos/facebook/ds2/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/ds2/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/ds2/tags","blobs_url":"https://api.github.com/repos/facebook/ds2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/ds2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/ds2/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/ds2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/ds2/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/ds2/languages","stargazers_url":"https://api.github.com/repos/facebook/ds2/stargazers","contributors_url":"https://api.github.com/repos/facebook/ds2/contributors","subscribers_url":"https://api.github.com/repos/facebook/ds2/subscribers","subscription_url":"https://api.github.com/repos/facebook/ds2/subscription","commits_url":"https://api.github.com/repos/facebook/ds2/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/ds2/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/ds2/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/ds2/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/ds2/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/ds2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/ds2/merges","archive_url":"https://api.github.com/repos/facebook/ds2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/ds2/downloads","issues_url":"https://api.github.com/repos/facebook/ds2/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/ds2/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/ds2/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/ds2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/ds2/labels{/name}","releases_url":"https://api.github.com/repos/facebook/ds2/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/ds2/deployments","created_at":"2014-10-16T22:32:52Z","updated_at":"2016-05-07T07:32:38Z","pushed_at":"2016-05-08T07:51:31Z","git_url":"git://github.com/facebook/ds2.git","ssh_url":"git@github.com:facebook/ds2.git","clone_url":"https://github.com/facebook/ds2.git","svn_url":"https://github.com/facebook/ds2","homepage":null,"size":2284,"stargazers_count":136,"watchers_count":136,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":18,"forks":32,"open_issues":18,"watchers":136,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/ds2/pulls/197"},"html":{"href":"https://github.com/facebook/ds2/pull/197"},"issue":{"href":"https://api.github.com/repos/facebook/ds2/issues/197"},"comments":{"href":"https://api.github.com/repos/facebook/ds2/issues/197/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/ds2/pulls/197/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/ds2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/ds2/pulls/197/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/ds2/statuses/f24462aed8f61271695a3f10bb82520300f809ea"}}}}