{"action":"created","comment":{"url":"https://api.github.com/repos/Bareflank/hypervisor/pulls/comments/134568590","pull_request_review_id":57871413,"id":134568590,"diff_hunk":"@@ -1553,3 +1697,209 @@ dwarf4::unwind(const fd_entry &fde, register_state *state)\n #ifndef __clang__\n #pragma GCC diagnostic pop\n #endif\n+\n+const char *\n+dwarf4::find_function_name(void *debug_info,\n+                           uint64_t debug_info_len,\n+                           void *debug_abbrev,\n+                           void *debug_str,\n+                           uint64_t addr)\n+{\n+    uint64_t cur_offset = 0;\n+\n+    while (cur_offset < debug_info_len) {\n+        DebugInfoCUHeader32 *info =\n+            get_ptr<DebugInfoCUHeader32>(debug_info, cur_offset);\n+        char *data = get_ptr<char>(info, sizeof(DebugInfoCUHeader32));\n+        void *abbrevs = nullptr;\n+        uint64_t abbrev;\n+        uint64_t stack = 0;\n+\n+        if (info->unit_length == 0xffffffff) {\n+            // we don't understand DWARF64 yet\n+            return nullptr;\n+        }\n+\n+        abbrevs = get_ptr<void>(debug_abbrev, info->debug_abbrev_offset);\n+\n+        do {\n+            uint64_t tag;\n+            bool children;\n+            uint64_t attr = 0;\n+            uint64_t name;\n+            uint64_t form;\n+\n+            abbrev = decode_uleb128(&data);\n+\n+            if (private_get_abbrev(abbrevs, abbrev, &tag, &children)) {\n+                uint64_t pc_low = 0, pc_high = 0;\n+                uint64_t pc_high_form = DW_FORM_data8; // if we don't have high_pc,","path":"bfsysroot/bfunwind/src/dwarf4.cpp","position":198,"original_position":198,"commit_id":"5d5460a5a73de9a0cc1791de339134e07c91bd34","original_commit_id":"3f1d928adb7d85fbf2927a56688f1bf345588a75","user":{"login":"rianquinn","id":5932003,"avatar_url":"https://avatars3.githubusercontent.com/u/5932003?v=4","gravatar_id":"","url":"https://api.github.com/users/rianquinn","html_url":"https://github.com/rianquinn","followers_url":"https://api.github.com/users/rianquinn/followers","following_url":"https://api.github.com/users/rianquinn/following{/other_user}","gists_url":"https://api.github.com/users/rianquinn/gists{/gist_id}","starred_url":"https://api.github.com/users/rianquinn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rianquinn/subscriptions","organizations_url":"https://api.github.com/users/rianquinn/orgs","repos_url":"https://api.github.com/users/rianquinn/repos","events_url":"https://api.github.com/users/rianquinn/events{/privacy}","received_events_url":"https://api.github.com/users/rianquinn/received_events","type":"User","site_admin":false},"body":"remove comment. put it into the function's comments if it has meaning. ","created_at":"2017-08-22T18:44:01Z","updated_at":"2017-08-22T18:46:32Z","html_url":"https://github.com/Bareflank/hypervisor/pull/474#discussion_r134568590","pull_request_url":"https://api.github.com/repos/Bareflank/hypervisor/pulls/474","_links":{"self":{"href":"https://api.github.com/repos/Bareflank/hypervisor/pulls/comments/134568590"},"html":{"href":"https://github.com/Bareflank/hypervisor/pull/474#discussion_r134568590"},"pull_request":{"href":"https://api.github.com/repos/Bareflank/hypervisor/pulls/474"}}},"pull_request":{"url":"https://api.github.com/repos/Bareflank/hypervisor/pulls/474","id":137031219,"html_url":"https://github.com/Bareflank/hypervisor/pull/474","diff_url":"https://github.com/Bareflank/hypervisor/pull/474.diff","patch_url":"https://github.com/Bareflank/hypervisor/pull/474.patch","issue_url":"https://api.github.com/repos/Bareflank/hypervisor/issues/474","number":474,"state":"open","locked":false,"title":"add find_function_name","user":{"login":"incertia","id":1653966,"avatar_url":"https://avatars2.githubusercontent.com/u/1653966?v=4","gravatar_id":"","url":"https://api.github.com/users/incertia","html_url":"https://github.com/incertia","followers_url":"https://api.github.com/users/incertia/followers","following_url":"https://api.github.com/users/incertia/following{/other_user}","gists_url":"https://api.github.com/users/incertia/gists{/gist_id}","starred_url":"https://api.github.com/users/incertia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/incertia/subscriptions","organizations_url":"https://api.github.com/users/incertia/orgs","repos_url":"https://api.github.com/users/incertia/repos","events_url":"https://api.github.com/users/incertia/events{/privacy}","received_events_url":"https://api.github.com/users/incertia/received_events","type":"User","site_admin":false},"body":"give the function some dwarf pointers and it'll find the corresponding function name for you\r\n\r\nthis should be stuck inside `dwarf4::unwind`","created_at":"2017-08-22T16:59:44Z","updated_at":"2017-08-22T18:46:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ce245e5fdbfd3952a3206af1d627201f97bf6fcc","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Bareflank/hypervisor/pulls/474/commits","review_comments_url":"https://api.github.com/repos/Bareflank/hypervisor/pulls/474/comments","review_comment_url":"https://api.github.com/repos/Bareflank/hypervisor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Bareflank/hypervisor/issues/474/comments","statuses_url":"https://api.github.com/repos/Bareflank/hypervisor/statuses/5d5460a5a73de9a0cc1791de339134e07c91bd34","head":{"label":"incertia:dev","ref":"dev","sha":"5d5460a5a73de9a0cc1791de339134e07c91bd34","user":{"login":"incertia","id":1653966,"avatar_url":"https://avatars2.githubusercontent.com/u/1653966?v=4","gravatar_id":"","url":"https://api.github.com/users/incertia","html_url":"https://github.com/incertia","followers_url":"https://api.github.com/users/incertia/followers","following_url":"https://api.github.com/users/incertia/following{/other_user}","gists_url":"https://api.github.com/users/incertia/gists{/gist_id}","starred_url":"https://api.github.com/users/incertia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/incertia/subscriptions","organizations_url":"https://api.github.com/users/incertia/orgs","repos_url":"https://api.github.com/users/incertia/repos","events_url":"https://api.github.com/users/incertia/events{/privacy}","received_events_url":"https://api.github.com/users/incertia/received_events","type":"User","site_admin":false},"repo":{"id":93789163,"name":"hypervisor","full_name":"incertia/hypervisor","owner":{"login":"incertia","id":1653966,"avatar_url":"https://avatars2.githubusercontent.com/u/1653966?v=4","gravatar_id":"","url":"https://api.github.com/users/incertia","html_url":"https://github.com/incertia","followers_url":"https://api.github.com/users/incertia/followers","following_url":"https://api.github.com/users/incertia/following{/other_user}","gists_url":"https://api.github.com/users/incertia/gists{/gist_id}","starred_url":"https://api.github.com/users/incertia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/incertia/subscriptions","organizations_url":"https://api.github.com/users/incertia/orgs","repos_url":"https://api.github.com/users/incertia/repos","events_url":"https://api.github.com/users/incertia/events{/privacy}","received_events_url":"https://api.github.com/users/incertia/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/incertia/hypervisor","description":"lightweight, extendable hypervisor written in C++ with support for Windows and Linux","fork":true,"url":"https://api.github.com/repos/incertia/hypervisor","forks_url":"https://api.github.com/repos/incertia/hypervisor/forks","keys_url":"https://api.github.com/repos/incertia/hypervisor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/incertia/hypervisor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/incertia/hypervisor/teams","hooks_url":"https://api.github.com/repos/incertia/hypervisor/hooks","issue_events_url":"https://api.github.com/repos/incertia/hypervisor/issues/events{/number}","events_url":"https://api.github.com/repos/incertia/hypervisor/events","assignees_url":"https://api.github.com/repos/incertia/hypervisor/assignees{/user}","branches_url":"https://api.github.com/repos/incertia/hypervisor/branches{/branch}","tags_url":"https://api.github.com/repos/incertia/hypervisor/tags","blobs_url":"https://api.github.com/repos/incertia/hypervisor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/incertia/hypervisor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/incertia/hypervisor/git/refs{/sha}","trees_url":"https://api.github.com/repos/incertia/hypervisor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/incertia/hypervisor/statuses/{sha}","languages_url":"https://api.github.com/repos/incertia/hypervisor/languages","stargazers_url":"https://api.github.com/repos/incertia/hypervisor/stargazers","contributors_url":"https://api.github.com/repos/incertia/hypervisor/contributors","subscribers_url":"https://api.github.com/repos/incertia/hypervisor/subscribers","subscription_url":"https://api.github.com/repos/incertia/hypervisor/subscription","commits_url":"https://api.github.com/repos/incertia/hypervisor/commits{/sha}","git_commits_url":"https://api.github.com/repos/incertia/hypervisor/git/commits{/sha}","comments_url":"https://api.github.com/repos/incertia/hypervisor/comments{/number}","issue_comment_url":"https://api.github.com/repos/incertia/hypervisor/issues/comments{/number}","contents_url":"https://api.github.com/repos/incertia/hypervisor/contents/{+path}","compare_url":"https://api.github.com/repos/incertia/hypervisor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/incertia/hypervisor/merges","archive_url":"https://api.github.com/repos/incertia/hypervisor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/incertia/hypervisor/downloads","issues_url":"https://api.github.com/repos/incertia/hypervisor/issues{/number}","pulls_url":"https://api.github.com/repos/incertia/hypervisor/pulls{/number}","milestones_url":"https://api.github.com/repos/incertia/hypervisor/milestones{/number}","notifications_url":"https://api.github.com/repos/incertia/hypervisor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/incertia/hypervisor/labels{/name}","releases_url":"https://api.github.com/repos/incertia/hypervisor/releases{/id}","deployments_url":"https://api.github.com/repos/incertia/hypervisor/deployments","created_at":"2017-06-08T20:29:06Z","updated_at":"2017-06-08T20:29:09Z","pushed_at":"2017-08-22T18:41:52Z","git_url":"git://github.com/incertia/hypervisor.git","ssh_url":"git@github.com:incertia/hypervisor.git","clone_url":"https://github.com/incertia/hypervisor.git","svn_url":"https://github.com/incertia/hypervisor","homepage":"","size":38743,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"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":"Bareflank:dev","ref":"dev","sha":"70d594400ded066dafe4319cf7204778f22402ac","user":{"login":"Bareflank","id":15015782,"avatar_url":"https://avatars1.githubusercontent.com/u/15015782?v=4","gravatar_id":"","url":"https://api.github.com/users/Bareflank","html_url":"https://github.com/Bareflank","followers_url":"https://api.github.com/users/Bareflank/followers","following_url":"https://api.github.com/users/Bareflank/following{/other_user}","gists_url":"https://api.github.com/users/Bareflank/gists{/gist_id}","starred_url":"https://api.github.com/users/Bareflank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bareflank/subscriptions","organizations_url":"https://api.github.com/users/Bareflank/orgs","repos_url":"https://api.github.com/users/Bareflank/repos","events_url":"https://api.github.com/users/Bareflank/events{/privacy}","received_events_url":"https://api.github.com/users/Bareflank/received_events","type":"Organization","site_admin":false},"repo":{"id":43819033,"name":"hypervisor","full_name":"Bareflank/hypervisor","owner":{"login":"Bareflank","id":15015782,"avatar_url":"https://avatars1.githubusercontent.com/u/15015782?v=4","gravatar_id":"","url":"https://api.github.com/users/Bareflank","html_url":"https://github.com/Bareflank","followers_url":"https://api.github.com/users/Bareflank/followers","following_url":"https://api.github.com/users/Bareflank/following{/other_user}","gists_url":"https://api.github.com/users/Bareflank/gists{/gist_id}","starred_url":"https://api.github.com/users/Bareflank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bareflank/subscriptions","organizations_url":"https://api.github.com/users/Bareflank/orgs","repos_url":"https://api.github.com/users/Bareflank/repos","events_url":"https://api.github.com/users/Bareflank/events{/privacy}","received_events_url":"https://api.github.com/users/Bareflank/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Bareflank/hypervisor","description":"lightweight, extendable hypervisor written in C++ with support for Windows and Linux","fork":false,"url":"https://api.github.com/repos/Bareflank/hypervisor","forks_url":"https://api.github.com/repos/Bareflank/hypervisor/forks","keys_url":"https://api.github.com/repos/Bareflank/hypervisor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Bareflank/hypervisor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Bareflank/hypervisor/teams","hooks_url":"https://api.github.com/repos/Bareflank/hypervisor/hooks","issue_events_url":"https://api.github.com/repos/Bareflank/hypervisor/issues/events{/number}","events_url":"https://api.github.com/repos/Bareflank/hypervisor/events","assignees_url":"https://api.github.com/repos/Bareflank/hypervisor/assignees{/user}","branches_url":"https://api.github.com/repos/Bareflank/hypervisor/branches{/branch}","tags_url":"https://api.github.com/repos/Bareflank/hypervisor/tags","blobs_url":"https://api.github.com/repos/Bareflank/hypervisor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Bareflank/hypervisor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Bareflank/hypervisor/git/refs{/sha}","trees_url":"https://api.github.com/repos/Bareflank/hypervisor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Bareflank/hypervisor/statuses/{sha}","languages_url":"https://api.github.com/repos/Bareflank/hypervisor/languages","stargazers_url":"https://api.github.com/repos/Bareflank/hypervisor/stargazers","contributors_url":"https://api.github.com/repos/Bareflank/hypervisor/contributors","subscribers_url":"https://api.github.com/repos/Bareflank/hypervisor/subscribers","subscription_url":"https://api.github.com/repos/Bareflank/hypervisor/subscription","commits_url":"https://api.github.com/repos/Bareflank/hypervisor/commits{/sha}","git_commits_url":"https://api.github.com/repos/Bareflank/hypervisor/git/commits{/sha}","comments_url":"https://api.github.com/repos/Bareflank/hypervisor/comments{/number}","issue_comment_url":"https://api.github.com/repos/Bareflank/hypervisor/issues/comments{/number}","contents_url":"https://api.github.com/repos/Bareflank/hypervisor/contents/{+path}","compare_url":"https://api.github.com/repos/Bareflank/hypervisor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Bareflank/hypervisor/merges","archive_url":"https://api.github.com/repos/Bareflank/hypervisor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Bareflank/hypervisor/downloads","issues_url":"https://api.github.com/repos/Bareflank/hypervisor/issues{/number}","pulls_url":"https://api.github.com/repos/Bareflank/hypervisor/pulls{/number}","milestones_url":"https://api.github.com/repos/Bareflank/hypervisor/milestones{/number}","notifications_url":"https://api.github.com/repos/Bareflank/hypervisor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Bareflank/hypervisor/labels{/name}","releases_url":"https://api.github.com/repos/Bareflank/hypervisor/releases{/id}","deployments_url":"https://api.github.com/repos/Bareflank/hypervisor/deployments","created_at":"2015-10-07T13:53:10Z","updated_at":"2017-08-21T15:43:06Z","pushed_at":"2017-08-22T18:41:54Z","git_url":"git://github.com/Bareflank/hypervisor.git","ssh_url":"git@github.com:Bareflank/hypervisor.git","clone_url":"https://github.com/Bareflank/hypervisor.git","svn_url":"https://github.com/Bareflank/hypervisor","homepage":"","size":38742,"stargazers_count":303,"watchers_count":303,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":63,"mirror_url":null,"open_issues_count":3,"forks":63,"open_issues":3,"watchers":303,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Bareflank/hypervisor/pulls/474"},"html":{"href":"https://github.com/Bareflank/hypervisor/pull/474"},"issue":{"href":"https://api.github.com/repos/Bareflank/hypervisor/issues/474"},"comments":{"href":"https://api.github.com/repos/Bareflank/hypervisor/issues/474/comments"},"review_comments":{"href":"https://api.github.com/repos/Bareflank/hypervisor/pulls/474/comments"},"review_comment":{"href":"https://api.github.com/repos/Bareflank/hypervisor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Bareflank/hypervisor/pulls/474/commits"},"statuses":{"href":"https://api.github.com/repos/Bareflank/hypervisor/statuses/5d5460a5a73de9a0cc1791de339134e07c91bd34"}}}}
{"actor":{"display_login":"rianquinn"}}