{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/51165706","id":51165706,"diff_hunk":"@@ -0,0 +1,31 @@\n+//\n+// Copyright (c) Microsoft. All rights reserved.\n+// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n+//","path":"src/inc/cfi.h","position":4,"original_position":4,"commit_id":"acc3f5776da9321d27d933eb31b81fa91ff16bd2","original_commit_id":"acc3f5776da9321d27d933eb31b81fa91ff16bd2","user":{"login":"BruceForstall","id":10901265,"avatar_url":"https://avatars.githubusercontent.com/u/10901265?v=3","gravatar_id":"","url":"https://api.github.com/users/BruceForstall","html_url":"https://github.com/BruceForstall","followers_url":"https://api.github.com/users/BruceForstall/followers","following_url":"https://api.github.com/users/BruceForstall/following{/other_user}","gists_url":"https://api.github.com/users/BruceForstall/gists{/gist_id}","starred_url":"https://api.github.com/users/BruceForstall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BruceForstall/subscriptions","organizations_url":"https://api.github.com/users/BruceForstall/orgs","repos_url":"https://api.github.com/users/BruceForstall/repos","events_url":"https://api.github.com/users/BruceForstall/events{/privacy}","received_events_url":"https://api.github.com/users/BruceForstall/received_events","type":"User","site_admin":false},"body":"Stephen Toub changed all the header file license agreements yesterday, so you should update this to match the new standard.","created_at":"2016-01-28T18:38:28Z","updated_at":"2016-01-28T18:38:28Z","html_url":"https://github.com/dotnet/coreclr/pull/2868#discussion_r51165706","pull_request_url":"https://api.github.com/repos/dotnet/coreclr/pulls/2868","_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/51165706"},"html":{"href":"https://github.com/dotnet/coreclr/pull/2868#discussion_r51165706"},"pull_request":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/2868"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/2868","id":57276809,"html_url":"https://github.com/dotnet/coreclr/pull/2868","diff_url":"https://github.com/dotnet/coreclr/pull/2868.diff","patch_url":"https://github.com/dotnet/coreclr/pull/2868.patch","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/2868","number":2868,"state":"open","locked":false,"title":"Support for CFI unwind info","user":{"login":"kyulee1","id":10963908,"avatar_url":"https://avatars.githubusercontent.com/u/10963908?v=3","gravatar_id":"","url":"https://api.github.com/users/kyulee1","html_url":"https://github.com/kyulee1","followers_url":"https://api.github.com/users/kyulee1/followers","following_url":"https://api.github.com/users/kyulee1/following{/other_user}","gists_url":"https://api.github.com/users/kyulee1/gists{/gist_id}","starred_url":"https://api.github.com/users/kyulee1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyulee1/subscriptions","organizations_url":"https://api.github.com/users/kyulee1/orgs","repos_url":"https://api.github.com/users/kyulee1/repos","events_url":"https://api.github.com/users/kyulee1/events{/privacy}","received_events_url":"https://api.github.com/users/kyulee1/received_events","type":"User","site_admin":false},"body":"For Unix targeting CoreRT, this will provide platform specific unwind\r\ninfo which is a dwarf format.\r\nUnlike window’s UNWIND_INFO, we won’t encode the format within RyuJit\r\nwhich is not only complex/error-prone but also will be slightly\r\ndifferent depending on platforms.\r\nInstead, CFI pseudo instructions are encoded, which will be passed to\r\nCoreRT/ObjectWriter whi will translate them to directly emit CFI\r\ninstructions in LLVM MC to establish frames.\r\nThen LLVM MC will handle the details of laying out the  eh_frame\r\nsections.\r\nOne a JitFlag is used to dynamically dispatch either Windows’s unwind\r\nblob or this CFI instruction table. No JIT/EE interface change is needed\r\nsince we’ve already passing an opaque blob.\r\nInitially when I looked at what Clang does, the prologue and the\r\nsequence of CFI emissions are a bit different than Windows.\r\nSince we will emit the same sequence of code with the same runtime that\r\nwe define, I assume this is unnecessary – I’ve verified the CFI sequence\r\nhere can work correctly with libunwind.\r\nBasically we need only 3 operations – push reg is a combination of 1 and\r\n2 below.\r\n 1. Allocation – increase stack frame. Normally subtract esp in x64.\r\n 2. Store – Copy a (callee save) register to stack (memory)\r\n 3. SaveFP – Set frame pointer register\r\nSince Windows operation is based on the relative value (all offsets,\r\netc are computed from the current point), I also use the similar form of\r\nCFI instructions .\r\nSo, mostly one window’s code corresponds to two CFIs – we might optimize\r\nthis by aggregating allocation, but I’d like to keep the current\r\nsyntax/semantic same as Windows.\r\nThis results in a very simple transformation in par with Windows.","created_at":"2016-01-26T21:40:12Z","updated_at":"2016-01-28T18:38:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e5e4e16678b0a3cce643d5e9d82012555d6853e4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/coreclr/pulls/2868/commits","review_comments_url":"https://api.github.com/repos/dotnet/coreclr/pulls/2868/comments","review_comment_url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/2868/comments","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/acc3f5776da9321d27d933eb31b81fa91ff16bd2","head":{"label":"kyulee1:cfi","ref":"cfi","sha":"acc3f5776da9321d27d933eb31b81fa91ff16bd2","user":{"login":"kyulee1","id":10963908,"avatar_url":"https://avatars.githubusercontent.com/u/10963908?v=3","gravatar_id":"","url":"https://api.github.com/users/kyulee1","html_url":"https://github.com/kyulee1","followers_url":"https://api.github.com/users/kyulee1/followers","following_url":"https://api.github.com/users/kyulee1/following{/other_user}","gists_url":"https://api.github.com/users/kyulee1/gists{/gist_id}","starred_url":"https://api.github.com/users/kyulee1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyulee1/subscriptions","organizations_url":"https://api.github.com/users/kyulee1/orgs","repos_url":"https://api.github.com/users/kyulee1/repos","events_url":"https://api.github.com/users/kyulee1/events{/privacy}","received_events_url":"https://api.github.com/users/kyulee1/received_events","type":"User","site_admin":false},"repo":{"id":30781442,"name":"coreclr","full_name":"kyulee1/coreclr","owner":{"login":"kyulee1","id":10963908,"avatar_url":"https://avatars.githubusercontent.com/u/10963908?v=3","gravatar_id":"","url":"https://api.github.com/users/kyulee1","html_url":"https://github.com/kyulee1","followers_url":"https://api.github.com/users/kyulee1/followers","following_url":"https://api.github.com/users/kyulee1/following{/other_user}","gists_url":"https://api.github.com/users/kyulee1/gists{/gist_id}","starred_url":"https://api.github.com/users/kyulee1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyulee1/subscriptions","organizations_url":"https://api.github.com/users/kyulee1/orgs","repos_url":"https://api.github.com/users/kyulee1/repos","events_url":"https://api.github.com/users/kyulee1/events{/privacy}","received_events_url":"https://api.github.com/users/kyulee1/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kyulee1/coreclr","description":"This repo contains the .NET Core runtime, called CoreCLR. It is an execution engine for .NET apps, performing functions such as IL byte code loading, compilation to machine code and garbage collection. The repo contains the complete up-to-date CoreCLR codebase.","fork":true,"url":"https://api.github.com/repos/kyulee1/coreclr","forks_url":"https://api.github.com/repos/kyulee1/coreclr/forks","keys_url":"https://api.github.com/repos/kyulee1/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kyulee1/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kyulee1/coreclr/teams","hooks_url":"https://api.github.com/repos/kyulee1/coreclr/hooks","issue_events_url":"https://api.github.com/repos/kyulee1/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/kyulee1/coreclr/events","assignees_url":"https://api.github.com/repos/kyulee1/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/kyulee1/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/kyulee1/coreclr/tags","blobs_url":"https://api.github.com/repos/kyulee1/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kyulee1/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kyulee1/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/kyulee1/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kyulee1/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/kyulee1/coreclr/languages","stargazers_url":"https://api.github.com/repos/kyulee1/coreclr/stargazers","contributors_url":"https://api.github.com/repos/kyulee1/coreclr/contributors","subscribers_url":"https://api.github.com/repos/kyulee1/coreclr/subscribers","subscription_url":"https://api.github.com/repos/kyulee1/coreclr/subscription","commits_url":"https://api.github.com/repos/kyulee1/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/kyulee1/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/kyulee1/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/kyulee1/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/kyulee1/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/kyulee1/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kyulee1/coreclr/merges","archive_url":"https://api.github.com/repos/kyulee1/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kyulee1/coreclr/downloads","issues_url":"https://api.github.com/repos/kyulee1/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/kyulee1/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/kyulee1/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/kyulee1/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kyulee1/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/kyulee1/coreclr/releases{/id}","deployments_url":"https://api.github.com/repos/kyulee1/coreclr/deployments","created_at":"2015-02-13T23:55:33Z","updated_at":"2016-01-11T18:01:49Z","pushed_at":"2016-01-28T15:52:10Z","git_url":"git://github.com/kyulee1/coreclr.git","ssh_url":"git@github.com:kyulee1/coreclr.git","clone_url":"https://github.com/kyulee1/coreclr.git","svn_url":"https://github.com/kyulee1/coreclr","homepage":"","size":51502,"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":"dotnet:master","ref":"master","sha":"014c69d7f58998be5ffbc94a49244819f23b9bdd","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":30092893,"name":"coreclr","full_name":"dotnet/coreclr","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/coreclr","description":"This repo contains the .NET Core runtime, called CoreCLR, and the base library, called mscorlib. It includes the garbage collector, JIT compiler, base .NET data types and many low-level classes.","fork":false,"url":"https://api.github.com/repos/dotnet/coreclr","forks_url":"https://api.github.com/repos/dotnet/coreclr/forks","keys_url":"https://api.github.com/repos/dotnet/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/coreclr/teams","hooks_url":"https://api.github.com/repos/dotnet/coreclr/hooks","issue_events_url":"https://api.github.com/repos/dotnet/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/coreclr/events","assignees_url":"https://api.github.com/repos/dotnet/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/coreclr/tags","blobs_url":"https://api.github.com/repos/dotnet/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/coreclr/languages","stargazers_url":"https://api.github.com/repos/dotnet/coreclr/stargazers","contributors_url":"https://api.github.com/repos/dotnet/coreclr/contributors","subscribers_url":"https://api.github.com/repos/dotnet/coreclr/subscribers","subscription_url":"https://api.github.com/repos/dotnet/coreclr/subscription","commits_url":"https://api.github.com/repos/dotnet/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/coreclr/merges","archive_url":"https://api.github.com/repos/dotnet/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/coreclr/downloads","issues_url":"https://api.github.com/repos/dotnet/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/coreclr/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/coreclr/deployments","created_at":"2015-01-30T22:10:02Z","updated_at":"2016-01-28T18:16:31Z","pushed_at":"2016-01-28T18:22:58Z","git_url":"git://github.com/dotnet/coreclr.git","ssh_url":"git@github.com:dotnet/coreclr.git","clone_url":"https://github.com/dotnet/coreclr.git","svn_url":"https://github.com/dotnet/coreclr","homepage":"http://dotnet.github.io/","size":58550,"stargazers_count":5783,"watchers_count":5783,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1263,"mirror_url":null,"open_issues_count":483,"forks":1263,"open_issues":483,"watchers":5783,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/2868"},"html":{"href":"https://github.com/dotnet/coreclr/pull/2868"},"issue":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/2868"},"comments":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/2868/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/2868/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/2868/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/coreclr/statuses/acc3f5776da9321d27d933eb31b81fa91ff16bd2"}}}}