{"action":"created","comment":{"url":"https://api.github.com/repos/derekparker/delve/pulls/comments/53102719","id":53102719,"diff_hunk":"@@ -111,3 +112,50 @@ func (thread *Thread) resolveCallArg(inst *ArchInst, currentGoroutine bool, regs\n \t}\n \treturn &Location{PC: pc, File: file, Line: line, Fn: fn}\n }\n+\n+type instrseq []x86asm.Op\n+\n+var windowsPrologue = instrseq{x86asm.MOV, x86asm.MOV, x86asm.LEA, x86asm.CMP, x86asm.JBE}\n+var windowsPrologue2 = instrseq{x86asm.MOV, x86asm.MOV, x86asm.CMP, x86asm.JBE}\n+var linuxPrologue = instrseq{x86asm.MOV, x86asm.LEA, x86asm.CMP, x86asm.JBE}","path":"proc/disasm_amd64.go","position":17,"original_position":17,"commit_id":"24e2913ed2f94a815de1241b2527af230977d92d","original_commit_id":"24e2913ed2f94a815de1241b2527af230977d92d","user":{"login":"derekparker","id":1314079,"avatar_url":"https://avatars.githubusercontent.com/u/1314079?v=3","gravatar_id":"","url":"https://api.github.com/users/derekparker","html_url":"https://github.com/derekparker","followers_url":"https://api.github.com/users/derekparker/followers","following_url":"https://api.github.com/users/derekparker/following{/other_user}","gists_url":"https://api.github.com/users/derekparker/gists{/gist_id}","starred_url":"https://api.github.com/users/derekparker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekparker/subscriptions","organizations_url":"https://api.github.com/users/derekparker/orgs","repos_url":"https://api.github.com/users/derekparker/repos","events_url":"https://api.github.com/users/derekparker/events{/privacy}","received_events_url":"https://api.github.com/users/derekparker/received_events","type":"User","site_admin":false},"body":"Does this apply to OSX as well (I'm assuming so), if so let's just rename this `unixPrologue` for now. Also, I'm somewhat tempted to prefer splitting these declarations out into their own OS specific file, but I fear that would hide the discoverability of `prologues`.","created_at":"2016-02-17T00:13:34Z","updated_at":"2016-02-17T00:13:34Z","html_url":"https://github.com/derekparker/delve/pull/413#discussion_r53102719","pull_request_url":"https://api.github.com/repos/derekparker/delve/pulls/413","_links":{"self":{"href":"https://api.github.com/repos/derekparker/delve/pulls/comments/53102719"},"html":{"href":"https://github.com/derekparker/delve/pull/413#discussion_r53102719"},"pull_request":{"href":"https://api.github.com/repos/derekparker/delve/pulls/413"}}},"pull_request":{"url":"https://api.github.com/repos/derekparker/delve/pulls/413","id":59003602,"html_url":"https://github.com/derekparker/delve/pull/413","diff_url":"https://github.com/derekparker/delve/pull/413.diff","patch_url":"https://github.com/derekparker/delve/pull/413.patch","issue_url":"https://api.github.com/repos/derekparker/delve/issues/413","number":413,"state":"open","locked":false,"title":"Using the disassembler to skip the prologue","user":{"login":"aarzilli","id":303620,"avatar_url":"https://avatars.githubusercontent.com/u/303620?v=3","gravatar_id":"","url":"https://api.github.com/users/aarzilli","html_url":"https://github.com/aarzilli","followers_url":"https://api.github.com/users/aarzilli/followers","following_url":"https://api.github.com/users/aarzilli/following{/other_user}","gists_url":"https://api.github.com/users/aarzilli/gists{/gist_id}","starred_url":"https://api.github.com/users/aarzilli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aarzilli/subscriptions","organizations_url":"https://api.github.com/users/aarzilli/orgs","repos_url":"https://api.github.com/users/aarzilli/repos","events_url":"https://api.github.com/users/aarzilli/events{/privacy}","received_events_url":"https://api.github.com/users/aarzilli/received_events","type":"User","site_admin":false},"body":"This PR builds on top of PR #405.\r\n\r\nI replaced FunctionEntryToFirstLine with SkipPrologue. SkipPrologue disassembles the function, does some really simple pattern matching to detect where the prologue ends (and if exists) and returns the address of the first instruction after the prologue.\r\n\r\nThis means that SkipPrologue will work correctly on functions that are defined on a single line, it should never hang (#396) and also that we can still call it if the users sets a breakpoint with `<filename>:<lineno>` because the first instruction after the prologue, usually, still refers to the same source line as the prologue.\r\n","created_at":"2016-02-11T08:55:01Z","updated_at":"2016-02-17T00:13:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8ffaece98a6bf8f9d66c353a52d12fe0a87733e6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/derekparker/delve/pulls/413/commits","review_comments_url":"https://api.github.com/repos/derekparker/delve/pulls/413/comments","review_comment_url":"https://api.github.com/repos/derekparker/delve/pulls/comments{/number}","comments_url":"https://api.github.com/repos/derekparker/delve/issues/413/comments","statuses_url":"https://api.github.com/repos/derekparker/delve/statuses/24e2913ed2f94a815de1241b2527af230977d92d","head":{"label":"aarzilli:disass-prologue","ref":"disass-prologue","sha":"24e2913ed2f94a815de1241b2527af230977d92d","user":{"login":"aarzilli","id":303620,"avatar_url":"https://avatars.githubusercontent.com/u/303620?v=3","gravatar_id":"","url":"https://api.github.com/users/aarzilli","html_url":"https://github.com/aarzilli","followers_url":"https://api.github.com/users/aarzilli/followers","following_url":"https://api.github.com/users/aarzilli/following{/other_user}","gists_url":"https://api.github.com/users/aarzilli/gists{/gist_id}","starred_url":"https://api.github.com/users/aarzilli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aarzilli/subscriptions","organizations_url":"https://api.github.com/users/aarzilli/orgs","repos_url":"https://api.github.com/users/aarzilli/repos","events_url":"https://api.github.com/users/aarzilli/events{/privacy}","received_events_url":"https://api.github.com/users/aarzilli/received_events","type":"User","site_admin":false},"repo":{"id":37608792,"name":"delve","full_name":"aarzilli/delve","owner":{"login":"aarzilli","id":303620,"avatar_url":"https://avatars.githubusercontent.com/u/303620?v=3","gravatar_id":"","url":"https://api.github.com/users/aarzilli","html_url":"https://github.com/aarzilli","followers_url":"https://api.github.com/users/aarzilli/followers","following_url":"https://api.github.com/users/aarzilli/following{/other_user}","gists_url":"https://api.github.com/users/aarzilli/gists{/gist_id}","starred_url":"https://api.github.com/users/aarzilli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aarzilli/subscriptions","organizations_url":"https://api.github.com/users/aarzilli/orgs","repos_url":"https://api.github.com/users/aarzilli/repos","events_url":"https://api.github.com/users/aarzilli/events{/privacy}","received_events_url":"https://api.github.com/users/aarzilli/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aarzilli/delve","description":"Delve is a debugger for the Go programming language.","fork":true,"url":"https://api.github.com/repos/aarzilli/delve","forks_url":"https://api.github.com/repos/aarzilli/delve/forks","keys_url":"https://api.github.com/repos/aarzilli/delve/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aarzilli/delve/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aarzilli/delve/teams","hooks_url":"https://api.github.com/repos/aarzilli/delve/hooks","issue_events_url":"https://api.github.com/repos/aarzilli/delve/issues/events{/number}","events_url":"https://api.github.com/repos/aarzilli/delve/events","assignees_url":"https://api.github.com/repos/aarzilli/delve/assignees{/user}","branches_url":"https://api.github.com/repos/aarzilli/delve/branches{/branch}","tags_url":"https://api.github.com/repos/aarzilli/delve/tags","blobs_url":"https://api.github.com/repos/aarzilli/delve/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aarzilli/delve/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aarzilli/delve/git/refs{/sha}","trees_url":"https://api.github.com/repos/aarzilli/delve/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aarzilli/delve/statuses/{sha}","languages_url":"https://api.github.com/repos/aarzilli/delve/languages","stargazers_url":"https://api.github.com/repos/aarzilli/delve/stargazers","contributors_url":"https://api.github.com/repos/aarzilli/delve/contributors","subscribers_url":"https://api.github.com/repos/aarzilli/delve/subscribers","subscription_url":"https://api.github.com/repos/aarzilli/delve/subscription","commits_url":"https://api.github.com/repos/aarzilli/delve/commits{/sha}","git_commits_url":"https://api.github.com/repos/aarzilli/delve/git/commits{/sha}","comments_url":"https://api.github.com/repos/aarzilli/delve/comments{/number}","issue_comment_url":"https://api.github.com/repos/aarzilli/delve/issues/comments{/number}","contents_url":"https://api.github.com/repos/aarzilli/delve/contents/{+path}","compare_url":"https://api.github.com/repos/aarzilli/delve/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aarzilli/delve/merges","archive_url":"https://api.github.com/repos/aarzilli/delve/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aarzilli/delve/downloads","issues_url":"https://api.github.com/repos/aarzilli/delve/issues{/number}","pulls_url":"https://api.github.com/repos/aarzilli/delve/pulls{/number}","milestones_url":"https://api.github.com/repos/aarzilli/delve/milestones{/number}","notifications_url":"https://api.github.com/repos/aarzilli/delve/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aarzilli/delve/labels{/name}","releases_url":"https://api.github.com/repos/aarzilli/delve/releases{/id}","deployments_url":"https://api.github.com/repos/aarzilli/delve/deployments","created_at":"2015-06-17T17:05:12Z","updated_at":"2015-06-17T17:05:12Z","pushed_at":"2016-02-16T08:02:41Z","git_url":"git://github.com/aarzilli/delve.git","ssh_url":"git@github.com:aarzilli/delve.git","clone_url":"https://github.com/aarzilli/delve.git","svn_url":"https://github.com/aarzilli/delve","homepage":"","size":10110,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"derekparker:master","ref":"master","sha":"3360a2e997bf0554e840dde1b83422fabce11ae2","user":{"login":"derekparker","id":1314079,"avatar_url":"https://avatars.githubusercontent.com/u/1314079?v=3","gravatar_id":"","url":"https://api.github.com/users/derekparker","html_url":"https://github.com/derekparker","followers_url":"https://api.github.com/users/derekparker/followers","following_url":"https://api.github.com/users/derekparker/following{/other_user}","gists_url":"https://api.github.com/users/derekparker/gists{/gist_id}","starred_url":"https://api.github.com/users/derekparker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekparker/subscriptions","organizations_url":"https://api.github.com/users/derekparker/orgs","repos_url":"https://api.github.com/users/derekparker/repos","events_url":"https://api.github.com/users/derekparker/events{/privacy}","received_events_url":"https://api.github.com/users/derekparker/received_events","type":"User","site_admin":false},"repo":{"id":19994257,"name":"delve","full_name":"derekparker/delve","owner":{"login":"derekparker","id":1314079,"avatar_url":"https://avatars.githubusercontent.com/u/1314079?v=3","gravatar_id":"","url":"https://api.github.com/users/derekparker","html_url":"https://github.com/derekparker","followers_url":"https://api.github.com/users/derekparker/followers","following_url":"https://api.github.com/users/derekparker/following{/other_user}","gists_url":"https://api.github.com/users/derekparker/gists{/gist_id}","starred_url":"https://api.github.com/users/derekparker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekparker/subscriptions","organizations_url":"https://api.github.com/users/derekparker/orgs","repos_url":"https://api.github.com/users/derekparker/repos","events_url":"https://api.github.com/users/derekparker/events{/privacy}","received_events_url":"https://api.github.com/users/derekparker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/derekparker/delve","description":"Delve is a debugger for the Go programming language.","fork":false,"url":"https://api.github.com/repos/derekparker/delve","forks_url":"https://api.github.com/repos/derekparker/delve/forks","keys_url":"https://api.github.com/repos/derekparker/delve/keys{/key_id}","collaborators_url":"https://api.github.com/repos/derekparker/delve/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/derekparker/delve/teams","hooks_url":"https://api.github.com/repos/derekparker/delve/hooks","issue_events_url":"https://api.github.com/repos/derekparker/delve/issues/events{/number}","events_url":"https://api.github.com/repos/derekparker/delve/events","assignees_url":"https://api.github.com/repos/derekparker/delve/assignees{/user}","branches_url":"https://api.github.com/repos/derekparker/delve/branches{/branch}","tags_url":"https://api.github.com/repos/derekparker/delve/tags","blobs_url":"https://api.github.com/repos/derekparker/delve/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/derekparker/delve/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/derekparker/delve/git/refs{/sha}","trees_url":"https://api.github.com/repos/derekparker/delve/git/trees{/sha}","statuses_url":"https://api.github.com/repos/derekparker/delve/statuses/{sha}","languages_url":"https://api.github.com/repos/derekparker/delve/languages","stargazers_url":"https://api.github.com/repos/derekparker/delve/stargazers","contributors_url":"https://api.github.com/repos/derekparker/delve/contributors","subscribers_url":"https://api.github.com/repos/derekparker/delve/subscribers","subscription_url":"https://api.github.com/repos/derekparker/delve/subscription","commits_url":"https://api.github.com/repos/derekparker/delve/commits{/sha}","git_commits_url":"https://api.github.com/repos/derekparker/delve/git/commits{/sha}","comments_url":"https://api.github.com/repos/derekparker/delve/comments{/number}","issue_comment_url":"https://api.github.com/repos/derekparker/delve/issues/comments{/number}","contents_url":"https://api.github.com/repos/derekparker/delve/contents/{+path}","compare_url":"https://api.github.com/repos/derekparker/delve/compare/{base}...{head}","merges_url":"https://api.github.com/repos/derekparker/delve/merges","archive_url":"https://api.github.com/repos/derekparker/delve/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/derekparker/delve/downloads","issues_url":"https://api.github.com/repos/derekparker/delve/issues{/number}","pulls_url":"https://api.github.com/repos/derekparker/delve/pulls{/number}","milestones_url":"https://api.github.com/repos/derekparker/delve/milestones{/number}","notifications_url":"https://api.github.com/repos/derekparker/delve/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/derekparker/delve/labels{/name}","releases_url":"https://api.github.com/repos/derekparker/delve/releases{/id}","deployments_url":"https://api.github.com/repos/derekparker/delve/deployments","created_at":"2014-05-20T19:24:43Z","updated_at":"2016-02-16T22:38:59Z","pushed_at":"2016-02-16T23:59:47Z","git_url":"git://github.com/derekparker/delve.git","ssh_url":"git@github.com:derekparker/delve.git","clone_url":"https://github.com/derekparker/delve.git","svn_url":"https://github.com/derekparker/delve","homepage":"","size":10684,"stargazers_count":3093,"watchers_count":3093,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":187,"mirror_url":null,"open_issues_count":60,"forks":187,"open_issues":60,"watchers":3093,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/derekparker/delve/pulls/413"},"html":{"href":"https://github.com/derekparker/delve/pull/413"},"issue":{"href":"https://api.github.com/repos/derekparker/delve/issues/413"},"comments":{"href":"https://api.github.com/repos/derekparker/delve/issues/413/comments"},"review_comments":{"href":"https://api.github.com/repos/derekparker/delve/pulls/413/comments"},"review_comment":{"href":"https://api.github.com/repos/derekparker/delve/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/derekparker/delve/pulls/413/commits"},"statuses":{"href":"https://api.github.com/repos/derekparker/delve/statuses/24e2913ed2f94a815de1241b2527af230977d92d"}}}}