{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/70861452","id":70861452,"diff_hunk":"@@ -0,0 +1,523 @@\n+// Licensed to the .NET Foundation under one or more agreements.\n+// The .NET Foundation licenses this file to you under the MIT license.\n+// See the LICENSE file in the project root for more information.\n+//*****************************************************************************\n+// File: gdbjit.h\n+// \n+\n+//\n+// Header file for GDB JIT interface implemenation.\n+//\n+//*****************************************************************************\n+\n+\n+#ifndef __GDBJIT_H__\n+#define __GDBJIT_H__\n+\n+#include <stdint.h>\n+#include \"method.hpp\"\n+\n+/* Type for a 16-bit quantity.  */\n+typedef uint16_t Elf32_Half;\n+typedef uint16_t Elf64_Half;\n+\n+/* Types for signed and unsigned 32-bit quantities.  */\n+typedef uint32_t Elf32_Word;\n+typedef\tint32_t  Elf32_Sword;\n+typedef uint32_t Elf64_Word;\n+typedef\tint32_t  Elf64_Sword;\n+\n+/* Types for signed and unsigned 64-bit quantities.  */\n+typedef uint64_t Elf32_Xword;\n+typedef\tint64_t  Elf32_Sxword;\n+typedef uint64_t Elf64_Xword;\n+typedef\tint64_t  Elf64_Sxword;\n+\n+/* Type of addresses.  */\n+typedef uint32_t Elf32_Addr;\n+typedef uint64_t Elf64_Addr;\n+\n+/* Type of file offsets.  */\n+typedef uint32_t Elf32_Off;\n+typedef uint64_t Elf64_Off;\n+\n+/* Type for section indices, which are 16-bit quantities.  */\n+typedef uint16_t Elf32_Section;\n+typedef uint16_t Elf64_Section;\n+\n+/* The ELF file header.  This appears at the start of every ELF file.  */\n+\n+#define EI_NIDENT (16)\n+\n+struct  Elf32_Ehdr","path":"src/vm/gdbjit.h","position":52,"original_position":52,"commit_id":"039ade2cce4bbab54d75f57866618d85ca57931a","original_commit_id":"039ade2cce4bbab54d75f57866618d85ca57931a","user":{"login":"jkotas","id":6668460,"avatar_url":"https://avatars.githubusercontent.com/u/6668460?v=3","gravatar_id":"","url":"https://api.github.com/users/jkotas","html_url":"https://github.com/jkotas","followers_url":"https://api.github.com/users/jkotas/followers","following_url":"https://api.github.com/users/jkotas/following{/other_user}","gists_url":"https://api.github.com/users/jkotas/gists{/gist_id}","starred_url":"https://api.github.com/users/jkotas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkotas/subscriptions","organizations_url":"https://api.github.com/users/jkotas/orgs","repos_url":"https://api.github.com/users/jkotas/repos","events_url":"https://api.github.com/users/jkotas/events{/privacy}","received_events_url":"https://api.github.com/users/jkotas/received_events","type":"User","site_admin":false},"body":"These definitions looks like copy & paste from glibc (https://github.com/bminor/glibc/blob/master/elf/elf.h). \r\n\r\nhttps://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/contributing.md for rules that need to be followed for reusing code from another projects.","created_at":"2016-07-14T18:46:45Z","updated_at":"2016-07-14T18:46:45Z","html_url":"https://github.com/dotnet/coreclr/pull/6278#discussion_r70861452","pull_request_url":"https://api.github.com/repos/dotnet/coreclr/pulls/6278","_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/70861452"},"html":{"href":"https://github.com/dotnet/coreclr/pull/6278#discussion_r70861452"},"pull_request":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/6278"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/6278","id":77488270,"html_url":"https://github.com/dotnet/coreclr/pull/6278","diff_url":"https://github.com/dotnet/coreclr/pull/6278.diff","patch_url":"https://github.com/dotnet/coreclr/pull/6278.patch","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/6278","number":6278,"state":"open","locked":false,"title":"[Linux] GDB JIT support for source line debug information.","user":{"login":"Dmitri-Botcharnikov","id":17641326,"avatar_url":"https://avatars.githubusercontent.com/u/17641326?v=3","gravatar_id":"","url":"https://api.github.com/users/Dmitri-Botcharnikov","html_url":"https://github.com/Dmitri-Botcharnikov","followers_url":"https://api.github.com/users/Dmitri-Botcharnikov/followers","following_url":"https://api.github.com/users/Dmitri-Botcharnikov/following{/other_user}","gists_url":"https://api.github.com/users/Dmitri-Botcharnikov/gists{/gist_id}","starred_url":"https://api.github.com/users/Dmitri-Botcharnikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dmitri-Botcharnikov/subscriptions","organizations_url":"https://api.github.com/users/Dmitri-Botcharnikov/orgs","repos_url":"https://api.github.com/users/Dmitri-Botcharnikov/repos","events_url":"https://api.github.com/users/Dmitri-Botcharnikov/events{/privacy}","received_events_url":"https://api.github.com/users/Dmitri-Botcharnikov/received_events","type":"User","site_admin":false},"body":"This PR adds generation of source line debug information according to GDB JIT interface for using with LLDB (see #6011).\r\nThe feature is enabled by providing its own flag to cmake, i.e. `./build.sh cmakeargs -DFEATURE_GDBJIT=TRUE`.  It also requires the latest SymbolReader managed dll to work (dotnet/corefx#9571).\r\nThe JIT notification is generated at the same time as the DAC notification in `DACNotify::DoJITNotification`, so when managed breakpoint is requested by `bpmd` command, the source lines are displayed on break when available.\r\n```\r\n(lldb) bpmd Test.exe Test.Main\r\nAdding pending breakpoints...\r\n(lldb) c\r\nProcess 14998 resuming\r\n1 location added to breakpoint 1\r\n(lldb) JITTED Test!Test.Main()\r\nSetting breakpoint: breakpoint set --address 0xAFB56461 [Test.Main()]\r\nProcess 14998 stopped\r\n* thread #1: tid = 14998, 0xafb56460 JIT(0xbc230) at Test.cs:87, name = 'corerun', stop reason = breakpoint 3.1\r\n    frame #0: 0xafb56460 JIT(0xbc230) at Test.cs:87\r\n   84  \r\n   85  \r\n   86       static int Main()\r\n-> 87       {\r\n   88           DumpIL();\r\n   89           LikelyInlined();\r\n   90           UnlikelyInlined();\r\n\r\n```\r\nThe current implementation requires source files in current directory and portable PDB in original or current directory.\r\nTested in Linux/x64 and Linux/ARM environments.","created_at":"2016-07-14T16:47:27Z","updated_at":"2016-07-14T18:46:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d2a14a27067c198bca300d0b6a2a9d211ed7813a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/coreclr/pulls/6278/commits","review_comments_url":"https://api.github.com/repos/dotnet/coreclr/pulls/6278/comments","review_comment_url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/6278/comments","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/039ade2cce4bbab54d75f57866618d85ca57931a","head":{"label":"Dmitri-Botcharnikov:feature-gdbjit","ref":"feature-gdbjit","sha":"039ade2cce4bbab54d75f57866618d85ca57931a","user":{"login":"Dmitri-Botcharnikov","id":17641326,"avatar_url":"https://avatars.githubusercontent.com/u/17641326?v=3","gravatar_id":"","url":"https://api.github.com/users/Dmitri-Botcharnikov","html_url":"https://github.com/Dmitri-Botcharnikov","followers_url":"https://api.github.com/users/Dmitri-Botcharnikov/followers","following_url":"https://api.github.com/users/Dmitri-Botcharnikov/following{/other_user}","gists_url":"https://api.github.com/users/Dmitri-Botcharnikov/gists{/gist_id}","starred_url":"https://api.github.com/users/Dmitri-Botcharnikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dmitri-Botcharnikov/subscriptions","organizations_url":"https://api.github.com/users/Dmitri-Botcharnikov/orgs","repos_url":"https://api.github.com/users/Dmitri-Botcharnikov/repos","events_url":"https://api.github.com/users/Dmitri-Botcharnikov/events{/privacy}","received_events_url":"https://api.github.com/users/Dmitri-Botcharnikov/received_events","type":"User","site_admin":false},"repo":{"id":59025804,"name":"coreclr","full_name":"Dmitri-Botcharnikov/coreclr","owner":{"login":"Dmitri-Botcharnikov","id":17641326,"avatar_url":"https://avatars.githubusercontent.com/u/17641326?v=3","gravatar_id":"","url":"https://api.github.com/users/Dmitri-Botcharnikov","html_url":"https://github.com/Dmitri-Botcharnikov","followers_url":"https://api.github.com/users/Dmitri-Botcharnikov/followers","following_url":"https://api.github.com/users/Dmitri-Botcharnikov/following{/other_user}","gists_url":"https://api.github.com/users/Dmitri-Botcharnikov/gists{/gist_id}","starred_url":"https://api.github.com/users/Dmitri-Botcharnikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dmitri-Botcharnikov/subscriptions","organizations_url":"https://api.github.com/users/Dmitri-Botcharnikov/orgs","repos_url":"https://api.github.com/users/Dmitri-Botcharnikov/repos","events_url":"https://api.github.com/users/Dmitri-Botcharnikov/events{/privacy}","received_events_url":"https://api.github.com/users/Dmitri-Botcharnikov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Dmitri-Botcharnikov/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":true,"url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr","forks_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/forks","keys_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/teams","hooks_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/hooks","issue_events_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/events","assignees_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/tags","blobs_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/languages","stargazers_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/stargazers","contributors_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/contributors","subscribers_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/subscribers","subscription_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/subscription","commits_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/merges","archive_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/downloads","issues_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/releases{/id}","deployments_url":"https://api.github.com/repos/Dmitri-Botcharnikov/coreclr/deployments","created_at":"2016-05-17T13:39:22Z","updated_at":"2016-05-17T13:40:42Z","pushed_at":"2016-07-14T16:24:18Z","git_url":"git://github.com/Dmitri-Botcharnikov/coreclr.git","ssh_url":"git@github.com:Dmitri-Botcharnikov/coreclr.git","clone_url":"https://github.com/Dmitri-Botcharnikov/coreclr.git","svn_url":"https://github.com/Dmitri-Botcharnikov/coreclr","homepage":"http://dotnet.github.io/","size":92188,"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":"59b0355f4f4308c34610ded81f4d00fe3070d0ee","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-07-14T18:19:16Z","pushed_at":"2016-07-14T18:39:49Z","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":"https://dotnet.github.io/","size":102144,"stargazers_count":6682,"watchers_count":6682,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1541,"mirror_url":null,"open_issues_count":896,"forks":1541,"open_issues":896,"watchers":6682,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/6278"},"html":{"href":"https://github.com/dotnet/coreclr/pull/6278"},"issue":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/6278"},"comments":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/6278/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/6278/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/6278/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/coreclr/statuses/039ade2cce4bbab54d75f57866618d85ca57931a"}}}}
{"actor":{"display_login":"jkotas"}}