{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/37410","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/37410/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/37410/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/37410/events","html_url":"https://github.com/rust-lang/rust/pull/37410","id":185244282,"number":37410,"title":"WIP: Support GDB with native rust support","user":{"login":"TimNN","id":1178249,"avatar_url":"https://avatars.githubusercontent.com/u/1178249?v=3","gravatar_id":"","url":"https://api.github.com/users/TimNN","html_url":"https://github.com/TimNN","followers_url":"https://api.github.com/users/TimNN/followers","following_url":"https://api.github.com/users/TimNN/following{/other_user}","gists_url":"https://api.github.com/users/TimNN/gists{/gist_id}","starred_url":"https://api.github.com/users/TimNN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TimNN/subscriptions","organizations_url":"https://api.github.com/users/TimNN/orgs","repos_url":"https://api.github.com/users/TimNN/repos","events_url":"https://api.github.com/users/TimNN/events{/privacy}","received_events_url":"https://api.github.com/users/TimNN/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars.githubusercontent.com/u/155238?v=3","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false},"assignees":[{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars.githubusercontent.com/u/155238?v=3","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false}],"milestone":null,"comments":23,"created_at":"2016-10-25T21:53:44Z","updated_at":"2016-10-28T16:51:16Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/37410","html_url":"https://github.com/rust-lang/rust/pull/37410","diff_url":"https://github.com/rust-lang/rust/pull/37410.diff","patch_url":"https://github.com/rust-lang/rust/pull/37410.patch"},"body":"This PR aims at making the debuginfo tests pass with the newer GDB versions which have native rust support (RGDB)\r\n\r\nTo that end debuginfo tests now support three GDB prefixes:\r\n\r\n* `gdb` applicable to both GDB varieties\r\n* `gdbg` (**G**eneric) only applicable to the old GDB\r\n* `gdbr` (**R**ust) only applicable to the new RGDB\r\n\r\nFor ease of development the presence of RGDB is determined by the presence of the `GDB_NATIVE_RUST` environment variable.\r\n\r\nFor the final implementation, there are multiple options:\r\n* Have this as a setting in `./configure` / `config.toml` or\r\n* Auto-detect this in someplace (probably best in compiletest)\r\n\r\nFor auto-detecting there are once again multiple options:\r\n* use `gdb --version`: this could be unreliable: in the official docs, rust support is mentioned for version 7.12 however Ubuntu Yakkety Yak ships with `7.11.90.20161005-git`, which already has rust support\r\n* try to do feature detection: execute `gdb --quiet --eval-command='set language rust' --batch` and grep for `undefined item: \"rust\"`\r\n\r\n---\r\n\r\n**Test updates**\r\n\r\nThere's currently only two tests left, which require `set language c`, see fixmes below.\r\n\r\n---\r\n\r\n**How to move forward with this PR:**\r\n\r\nI propose the following steps for moving forward with this PR:\r\n\r\n* [x] Validate the general approach of this PR (the `gdb-`, `gdbg-` and `gdbr-` split)\r\n* [ ] Validate the approach taken for updating the debuginfo tests\r\n* [ ] Determine how to distinguish between the new and old GDB (and implement that)\r\n* [ ] Add one or more non-gating build bots with the new GDB (blocked on the previous item, can happen after this PR has been merged)\r\n* [ ] If the new bots pass the tests, gate on them\r\n* [x] \\(Maybe) update the remaining tests to run without `set syntax c` (in a separate PR)\r\n* [ ] \\(Maybe) add tests specifically for the new GDB (in a separate PR / open an issue about this)\r\n\r\nI'm not completely sure about the build bot related steps (cc @alexcrichton), the current approach was suggested to prevent any downtime / broken build time between a new GDB gating builder being added and this PR being merged.\r\n\r\n---\r\n\r\n**Suboptimal RGDB Output**\r\n\r\nI've found several places where the output of RGDB is not ideal. They are tagged with `// FIXME`, here is an overview:\r\n\r\n* [x] Trait references are not syntactically correct: `type_names::&Trait2<...>` (**WontFix**: the issue is minor and from @Manishearth below: \"to properly address the trait issue we should wait for trait object support\")\r\n* [x] Univariant enums are printed as `<error reading variable>`\r\n* [ ] Unions are printed as `<error reading variable>`\r\n* [ ] \"Nil Enums\" (`enum Foo {}`) are printed as `<error reading variable>` (probably expected? I'm not sure what to make of that test)\r\n* [ ] I have found no alternative for `sizeof(var)` in rust mode, so had to resort to `set language c`\r\n* [ ] I have found not way of interpreting a value as a specific enum variant, so had to resort to `set language c`\r\n* [ ] Before the initial `run` command, gdb does not realise it should be in rust mode (thus, if one want's to print statics before the run one has to explicitly `set language rust`) (maybe this is intended / expected behaviour, if so, someone please tell me ;)\r\n\r\n---\r\n\r\ncc @alexcrichton, @michaelwoerister, #36323\r\n\r\nIf anyone wants to discuss this PR more directly, feel free to ping me on irc (TimNN)."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/256971219","html_url":"https://github.com/rust-lang/rust/pull/37410#issuecomment-256971219","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/37410","id":256971219,"user":{"login":"TimNN","id":1178249,"avatar_url":"https://avatars.githubusercontent.com/u/1178249?v=3","gravatar_id":"","url":"https://api.github.com/users/TimNN","html_url":"https://github.com/TimNN","followers_url":"https://api.github.com/users/TimNN/followers","following_url":"https://api.github.com/users/TimNN/following{/other_user}","gists_url":"https://api.github.com/users/TimNN/gists{/gist_id}","starred_url":"https://api.github.com/users/TimNN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TimNN/subscriptions","organizations_url":"https://api.github.com/users/TimNN/orgs","repos_url":"https://api.github.com/users/TimNN/repos","events_url":"https://api.github.com/users/TimNN/events{/privacy}","received_events_url":"https://api.github.com/users/TimNN/received_events","type":"User","site_admin":false},"created_at":"2016-10-28T16:51:16Z","updated_at":"2016-10-28T16:51:16Z","body":"> This should fix the struct variant issue.\r\n\r\nThis did indeed fix my struct variant issues.\r\n\r\n> That test uses arrow operators btw, those will not work for rust and **you have to explicitly deref**.\r\n\r\n(Emphasis mine) Just, FYI, I found that explicitly dereferencing was not necessary, just using the dot operator was sufficient.\r\n"}}
{"actor":{"display_login":"TimNN"}}