{"action":"created","comment":{"url":"https://api.github.com/repos/radare/radare2/pulls/comments/218009157","pull_request_review_id":155850766,"id":218009157,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxODAwOTE1Nw==","diff_hunk":"@@ -3351,6 +3361,59 @@ ut64 Elf_(r_bin_elf_v2p) (ELFOBJ *bin, ut64 vaddr) {\n \treturn vaddr;\n }\n \n+/* converts a physical address to the virtual address, looking\n+ * at the program headers in the binary bin */\n+ut64 Elf_(r_bin_elf_p2v_new) (ELFOBJ *bin, ut64 paddr) {\n+\tint i;\n+\n+\tif (!bin) {\n+\t\treturn UT64_MAX;\n+\t}\n+\n+\tif (!bin->phdr) {\n+\t\tif (bin->ehdr.e_type == ET_REL) {\n+\t\t\treturn bin->baddr + paddr;\n+\t\t}\n+\t\treturn UT64_MAX;\n+\t}\n+\tfor (i = 0; i < bin->ehdr.e_phnum; ++i) {\n+\t\tElf_(Phdr) *p = &bin->phdr[i];\n+\t\tif (!p) {\n+\t\t\tbreak;\n+\t\t}\n+\t\tif (p->p_type == PT_LOAD && is_in_pphdr (p, paddr)) {\n+\t\t\treturn p->p_vaddr + paddr - p->p_offset;\n+\t\t}\n+\t}\n+\n+\treturn UT64_MAX;\n+}\n+\n+/* converts a virtual address to the relative physical address, looking\n+ * at the program headers in the binary bin */\n+ut64 Elf_(r_bin_elf_v2p_new) (ELFOBJ *bin, ut64 vaddr) {","path":"libr/bin/format/elf/elf.c","position":112,"original_position":112,"commit_id":"165ecea0a34240615b19c8b645131040255ffbf7","original_commit_id":"165ecea0a34240615b19c8b645131040255ffbf7","user":{"login":"kazarmy","id":12002672,"node_id":"MDQ6VXNlcjEyMDAyNjcy","avatar_url":"https://avatars1.githubusercontent.com/u/12002672?v=4","gravatar_id":"","url":"https://api.github.com/users/kazarmy","html_url":"https://github.com/kazarmy","followers_url":"https://api.github.com/users/kazarmy/followers","following_url":"https://api.github.com/users/kazarmy/following{/other_user}","gists_url":"https://api.github.com/users/kazarmy/gists{/gist_id}","starred_url":"https://api.github.com/users/kazarmy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kazarmy/subscriptions","organizations_url":"https://api.github.com/users/kazarmy/orgs","repos_url":"https://api.github.com/users/kazarmy/repos","events_url":"https://api.github.com/users/kazarmy/events{/privacy}","received_events_url":"https://api.github.com/users/kazarmy/received_events","type":"User","site_admin":false},"body":"yes","created_at":"2018-09-17T09:54:06Z","updated_at":"2018-09-17T09:54:06Z","html_url":"https://github.com/radare/radare2/pull/11513#discussion_r218009157","pull_request_url":"https://api.github.com/repos/radare/radare2/pulls/11513","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/radare/radare2/pulls/comments/218009157"},"html":{"href":"https://github.com/radare/radare2/pull/11513#discussion_r218009157"},"pull_request":{"href":"https://api.github.com/repos/radare/radare2/pulls/11513"}},"in_reply_to_id":217996490},"pull_request":{"url":"https://api.github.com/repos/radare/radare2/pulls/11513","id":215319401,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1MzE5NDAx","html_url":"https://github.com/radare/radare2/pull/11513","diff_url":"https://github.com/radare/radare2/pull/11513.diff","patch_url":"https://github.com/radare/radare2/pull/11513.patch","issue_url":"https://api.github.com/repos/radare/radare2/issues/11513","number":11513,"state":"open","locked":false,"title":"r_bin_elf_p2v/v2p_new: return UT64_MAX on error + is: show ---------- for paddr if symbol's value is not vaddr","user":{"login":"kazarmy","id":12002672,"node_id":"MDQ6VXNlcjEyMDAyNjcy","avatar_url":"https://avatars1.githubusercontent.com/u/12002672?v=4","gravatar_id":"","url":"https://api.github.com/users/kazarmy","html_url":"https://github.com/kazarmy","followers_url":"https://api.github.com/users/kazarmy/followers","following_url":"https://api.github.com/users/kazarmy/following{/other_user}","gists_url":"https://api.github.com/users/kazarmy/gists{/gist_id}","starred_url":"https://api.github.com/users/kazarmy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kazarmy/subscriptions","organizations_url":"https://api.github.com/users/kazarmy/orgs","repos_url":"https://api.github.com/users/kazarmy/repos","events_url":"https://api.github.com/users/kazarmy/events{/privacy}","received_events_url":"https://api.github.com/users/kazarmy/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-09-13T15:16:49Z","updated_at":"2018-09-17T09:54:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f5c59b49bdbc8c1ada9cd47c9cc94ccd022117ce","assignee":null,"assignees":[],"requested_reviewers":[{"login":"radare","id":917142,"node_id":"MDQ6VXNlcjkxNzE0Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/917142?v=4","gravatar_id":"","url":"https://api.github.com/users/radare","html_url":"https://github.com/radare","followers_url":"https://api.github.com/users/radare/followers","following_url":"https://api.github.com/users/radare/following{/other_user}","gists_url":"https://api.github.com/users/radare/gists{/gist_id}","starred_url":"https://api.github.com/users/radare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radare/subscriptions","organizations_url":"https://api.github.com/users/radare/orgs","repos_url":"https://api.github.com/users/radare/repos","events_url":"https://api.github.com/users/radare/events{/privacy}","received_events_url":"https://api.github.com/users/radare/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/radare/radare2/milestones/32","html_url":"https://github.com/radare/radare2/milestone/32","labels_url":"https://api.github.com/repos/radare/radare2/milestones/32/labels","id":3484549,"node_id":"MDk6TWlsZXN0b25lMzQ4NDU0OQ==","number":32,"title":"3.0","description":"","creator":{"login":"XVilka","id":203261,"node_id":"MDQ6VXNlcjIwMzI2MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/203261?v=4","gravatar_id":"","url":"https://api.github.com/users/XVilka","html_url":"https://github.com/XVilka","followers_url":"https://api.github.com/users/XVilka/followers","following_url":"https://api.github.com/users/XVilka/following{/other_user}","gists_url":"https://api.github.com/users/XVilka/gists{/gist_id}","starred_url":"https://api.github.com/users/XVilka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XVilka/subscriptions","organizations_url":"https://api.github.com/users/XVilka/orgs","repos_url":"https://api.github.com/users/XVilka/repos","events_url":"https://api.github.com/users/XVilka/events{/privacy}","received_events_url":"https://api.github.com/users/XVilka/received_events","type":"User","site_admin":false},"open_issues":162,"closed_issues":33,"state":"open","created_at":"2018-07-10T03:42:21Z","updated_at":"2018-09-17T09:13:07Z","due_on":"2018-10-15T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/radare/radare2/pulls/11513/commits","review_comments_url":"https://api.github.com/repos/radare/radare2/pulls/11513/comments","review_comment_url":"https://api.github.com/repos/radare/radare2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/radare/radare2/issues/11513/comments","statuses_url":"https://api.github.com/repos/radare/radare2/statuses/165ecea0a34240615b19c8b645131040255ffbf7","head":{"label":"kazarmy:r_bin_elf_p2v／v2p-UT64_MAX-on-error","ref":"r_bin_elf_p2v／v2p-UT64_MAX-on-error","sha":"165ecea0a34240615b19c8b645131040255ffbf7","user":{"login":"kazarmy","id":12002672,"node_id":"MDQ6VXNlcjEyMDAyNjcy","avatar_url":"https://avatars1.githubusercontent.com/u/12002672?v=4","gravatar_id":"","url":"https://api.github.com/users/kazarmy","html_url":"https://github.com/kazarmy","followers_url":"https://api.github.com/users/kazarmy/followers","following_url":"https://api.github.com/users/kazarmy/following{/other_user}","gists_url":"https://api.github.com/users/kazarmy/gists{/gist_id}","starred_url":"https://api.github.com/users/kazarmy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kazarmy/subscriptions","organizations_url":"https://api.github.com/users/kazarmy/orgs","repos_url":"https://api.github.com/users/kazarmy/repos","events_url":"https://api.github.com/users/kazarmy/events{/privacy}","received_events_url":"https://api.github.com/users/kazarmy/received_events","type":"User","site_admin":false},"repo":{"id":78314637,"node_id":"MDEwOlJlcG9zaXRvcnk3ODMxNDYzNw==","name":"radare2","full_name":"kazarmy/radare2","private":false,"owner":{"login":"kazarmy","id":12002672,"node_id":"MDQ6VXNlcjEyMDAyNjcy","avatar_url":"https://avatars1.githubusercontent.com/u/12002672?v=4","gravatar_id":"","url":"https://api.github.com/users/kazarmy","html_url":"https://github.com/kazarmy","followers_url":"https://api.github.com/users/kazarmy/followers","following_url":"https://api.github.com/users/kazarmy/following{/other_user}","gists_url":"https://api.github.com/users/kazarmy/gists{/gist_id}","starred_url":"https://api.github.com/users/kazarmy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kazarmy/subscriptions","organizations_url":"https://api.github.com/users/kazarmy/orgs","repos_url":"https://api.github.com/users/kazarmy/repos","events_url":"https://api.github.com/users/kazarmy/events{/privacy}","received_events_url":"https://api.github.com/users/kazarmy/received_events","type":"User","site_admin":false},"html_url":"https://github.com/kazarmy/radare2","description":"unix-like reverse engineering framework and commandline tools","fork":true,"url":"https://api.github.com/repos/kazarmy/radare2","forks_url":"https://api.github.com/repos/kazarmy/radare2/forks","keys_url":"https://api.github.com/repos/kazarmy/radare2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kazarmy/radare2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kazarmy/radare2/teams","hooks_url":"https://api.github.com/repos/kazarmy/radare2/hooks","issue_events_url":"https://api.github.com/repos/kazarmy/radare2/issues/events{/number}","events_url":"https://api.github.com/repos/kazarmy/radare2/events","assignees_url":"https://api.github.com/repos/kazarmy/radare2/assignees{/user}","branches_url":"https://api.github.com/repos/kazarmy/radare2/branches{/branch}","tags_url":"https://api.github.com/repos/kazarmy/radare2/tags","blobs_url":"https://api.github.com/repos/kazarmy/radare2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kazarmy/radare2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kazarmy/radare2/git/refs{/sha}","trees_url":"https://api.github.com/repos/kazarmy/radare2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kazarmy/radare2/statuses/{sha}","languages_url":"https://api.github.com/repos/kazarmy/radare2/languages","stargazers_url":"https://api.github.com/repos/kazarmy/radare2/stargazers","contributors_url":"https://api.github.com/repos/kazarmy/radare2/contributors","subscribers_url":"https://api.github.com/repos/kazarmy/radare2/subscribers","subscription_url":"https://api.github.com/repos/kazarmy/radare2/subscription","commits_url":"https://api.github.com/repos/kazarmy/radare2/commits{/sha}","git_commits_url":"https://api.github.com/repos/kazarmy/radare2/git/commits{/sha}","comments_url":"https://api.github.com/repos/kazarmy/radare2/comments{/number}","issue_comment_url":"https://api.github.com/repos/kazarmy/radare2/issues/comments{/number}","contents_url":"https://api.github.com/repos/kazarmy/radare2/contents/{+path}","compare_url":"https://api.github.com/repos/kazarmy/radare2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kazarmy/radare2/merges","archive_url":"https://api.github.com/repos/kazarmy/radare2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kazarmy/radare2/downloads","issues_url":"https://api.github.com/repos/kazarmy/radare2/issues{/number}","pulls_url":"https://api.github.com/repos/kazarmy/radare2/pulls{/number}","milestones_url":"https://api.github.com/repos/kazarmy/radare2/milestones{/number}","notifications_url":"https://api.github.com/repos/kazarmy/radare2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kazarmy/radare2/labels{/name}","releases_url":"https://api.github.com/repos/kazarmy/radare2/releases{/id}","deployments_url":"https://api.github.com/repos/kazarmy/radare2/deployments","created_at":"2017-01-08T01:31:38Z","updated_at":"2017-01-08T01:31:48Z","pushed_at":"2018-09-16T11:18:35Z","git_url":"git://github.com/kazarmy/radare2.git","ssh_url":"git@github.com:kazarmy/radare2.git","clone_url":"https://github.com/kazarmy/radare2.git","svn_url":"https://github.com/kazarmy/radare2","homepage":"http://www.radare.org/","size":90280,"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":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"radare:master","ref":"master","sha":"5c6b97634318145aab12a3455760a90264c2beb0","user":{"login":"radare","id":917142,"node_id":"MDQ6VXNlcjkxNzE0Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/917142?v=4","gravatar_id":"","url":"https://api.github.com/users/radare","html_url":"https://github.com/radare","followers_url":"https://api.github.com/users/radare/followers","following_url":"https://api.github.com/users/radare/following{/other_user}","gists_url":"https://api.github.com/users/radare/gists{/gist_id}","starred_url":"https://api.github.com/users/radare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radare/subscriptions","organizations_url":"https://api.github.com/users/radare/orgs","repos_url":"https://api.github.com/users/radare/repos","events_url":"https://api.github.com/users/radare/events{/privacy}","received_events_url":"https://api.github.com/users/radare/received_events","type":"User","site_admin":false},"repo":{"id":4869294,"node_id":"MDEwOlJlcG9zaXRvcnk0ODY5Mjk0","name":"radare2","full_name":"radare/radare2","private":false,"owner":{"login":"radare","id":917142,"node_id":"MDQ6VXNlcjkxNzE0Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/917142?v=4","gravatar_id":"","url":"https://api.github.com/users/radare","html_url":"https://github.com/radare","followers_url":"https://api.github.com/users/radare/followers","following_url":"https://api.github.com/users/radare/following{/other_user}","gists_url":"https://api.github.com/users/radare/gists{/gist_id}","starred_url":"https://api.github.com/users/radare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radare/subscriptions","organizations_url":"https://api.github.com/users/radare/orgs","repos_url":"https://api.github.com/users/radare/repos","events_url":"https://api.github.com/users/radare/events{/privacy}","received_events_url":"https://api.github.com/users/radare/received_events","type":"User","site_admin":false},"html_url":"https://github.com/radare/radare2","description":"unix-like reverse engineering framework and commandline tools security","fork":false,"url":"https://api.github.com/repos/radare/radare2","forks_url":"https://api.github.com/repos/radare/radare2/forks","keys_url":"https://api.github.com/repos/radare/radare2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/radare/radare2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/radare/radare2/teams","hooks_url":"https://api.github.com/repos/radare/radare2/hooks","issue_events_url":"https://api.github.com/repos/radare/radare2/issues/events{/number}","events_url":"https://api.github.com/repos/radare/radare2/events","assignees_url":"https://api.github.com/repos/radare/radare2/assignees{/user}","branches_url":"https://api.github.com/repos/radare/radare2/branches{/branch}","tags_url":"https://api.github.com/repos/radare/radare2/tags","blobs_url":"https://api.github.com/repos/radare/radare2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/radare/radare2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/radare/radare2/git/refs{/sha}","trees_url":"https://api.github.com/repos/radare/radare2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/radare/radare2/statuses/{sha}","languages_url":"https://api.github.com/repos/radare/radare2/languages","stargazers_url":"https://api.github.com/repos/radare/radare2/stargazers","contributors_url":"https://api.github.com/repos/radare/radare2/contributors","subscribers_url":"https://api.github.com/repos/radare/radare2/subscribers","subscription_url":"https://api.github.com/repos/radare/radare2/subscription","commits_url":"https://api.github.com/repos/radare/radare2/commits{/sha}","git_commits_url":"https://api.github.com/repos/radare/radare2/git/commits{/sha}","comments_url":"https://api.github.com/repos/radare/radare2/comments{/number}","issue_comment_url":"https://api.github.com/repos/radare/radare2/issues/comments{/number}","contents_url":"https://api.github.com/repos/radare/radare2/contents/{+path}","compare_url":"https://api.github.com/repos/radare/radare2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/radare/radare2/merges","archive_url":"https://api.github.com/repos/radare/radare2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/radare/radare2/downloads","issues_url":"https://api.github.com/repos/radare/radare2/issues{/number}","pulls_url":"https://api.github.com/repos/radare/radare2/pulls{/number}","milestones_url":"https://api.github.com/repos/radare/radare2/milestones{/number}","notifications_url":"https://api.github.com/repos/radare/radare2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/radare/radare2/labels{/name}","releases_url":"https://api.github.com/repos/radare/radare2/releases{/id}","deployments_url":"https://api.github.com/repos/radare/radare2/deployments","created_at":"2012-07-03T07:42:26Z","updated_at":"2018-09-17T09:06:10Z","pushed_at":"2018-09-17T09:40:00Z","git_url":"git://github.com/radare/radare2.git","ssh_url":"git@github.com:radare/radare2.git","clone_url":"https://github.com/radare/radare2.git","svn_url":"https://github.com/radare/radare2","homepage":"http://www.radare.org/","size":90024,"stargazers_count":8222,"watchers_count":8222,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1615,"mirror_url":null,"archived":false,"open_issues_count":998,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":1615,"open_issues":998,"watchers":8222,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/radare/radare2/pulls/11513"},"html":{"href":"https://github.com/radare/radare2/pull/11513"},"issue":{"href":"https://api.github.com/repos/radare/radare2/issues/11513"},"comments":{"href":"https://api.github.com/repos/radare/radare2/issues/11513/comments"},"review_comments":{"href":"https://api.github.com/repos/radare/radare2/pulls/11513/comments"},"review_comment":{"href":"https://api.github.com/repos/radare/radare2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/radare/radare2/pulls/11513/commits"},"statuses":{"href":"https://api.github.com/repos/radare/radare2/statuses/165ecea0a34240615b19c8b645131040255ffbf7"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"kazarmy"}}