{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/15539","repository_url":"https://api.github.com/repos/NixOS/nixpkgs","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/15539/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/15539/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/15539/events","html_url":"https://github.com/NixOS/nixpkgs/pull/15539","id":155531368,"number":15539,"title":"Make using separate debugging info easier.","user":{"login":"kevincox","id":494012,"avatar_url":"https://avatars.githubusercontent.com/u/494012?v=3","gravatar_id":"","url":"https://api.github.com/users/kevincox","html_url":"https://github.com/kevincox","followers_url":"https://api.github.com/users/kevincox/followers","following_url":"https://api.github.com/users/kevincox/following{/other_user}","gists_url":"https://api.github.com/users/kevincox/gists{/gist_id}","starred_url":"https://api.github.com/users/kevincox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevincox/subscriptions","organizations_url":"https://api.github.com/users/kevincox/orgs","repos_url":"https://api.github.com/users/kevincox/repos","events_url":"https://api.github.com/users/kevincox/events{/privacy}","received_events_url":"https://api.github.com/users/kevincox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-05-18T15:27:05Z","updated_at":"2016-05-19T11:01:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/15539","html_url":"https://github.com/NixOS/nixpkgs/pull/15539","diff_url":"https://github.com/NixOS/nixpkgs/pull/15539.diff","patch_url":"https://github.com/NixOS/nixpkgs/pull/15539.patch"},"body":"###### Things done\r\n\r\n- [ ] Tested using sandboxing\r\n  ([nix.useSandbox](http://nixos.org/nixos/manual/options.html#opt-nix.useSandbox) on NixOS,\r\n    or option `build-use-sandbox` in [`nix.conf`](http://nixos.org/nix/manual/#sec-conf-file)\r\n    on non-NixOS)\r\n- Built on platform(s)\r\n   - [x] NixOS\r\n   - [ ] OS X\r\n   - [x] Linux\r\n- [ ] Tested compilation of all pkgs that depend on this change using `nix-shell -p nox --run \"nox-review wip\"`\r\n- [ ] Tested execution of all binary files (usually in `./result/bin/`)\r\n- [ ] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md).\r\n\r\n---\r\n\r\n\r\nThe previous iteration of debug info required that all of the packages\r\nwere \"installed\". This is suboptimal because \"installing\" all of the\r\nprograms you want to debug as well as the libraries that they use.\r\n\r\nThis method enables debug symbols for all loaded files as long as those\r\nsymbols are present in the nix store, as well as a command to download\r\nthose symbols from binary caches for all loaded object files.\r\n\r\nThis is implemented by adding a new section to the executable witch\r\ncontains the path to the debug symbols. An extension that is auto-loaded\r\nby GDB then uses this information to automatically load these symbols\r\nwhenever the object file is loaded.\r\n\r\nFuture work:\r\n- [ ] Find a way to make all packages build with debug symbols by default.\r\n- [ ] Find a better way to \"attach\" debug symbols to packages (weak references?)\r\n- [ ] Make source files available."},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/220292933","html_url":"https://github.com/NixOS/nixpkgs/pull/15539#issuecomment-220292933","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/15539","id":220292933,"user":{"login":"kevincox","id":494012,"avatar_url":"https://avatars.githubusercontent.com/u/494012?v=3","gravatar_id":"","url":"https://api.github.com/users/kevincox","html_url":"https://github.com/kevincox","followers_url":"https://api.github.com/users/kevincox/followers","following_url":"https://api.github.com/users/kevincox/following{/other_user}","gists_url":"https://api.github.com/users/kevincox/gists{/gist_id}","starred_url":"https://api.github.com/users/kevincox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevincox/subscriptions","organizations_url":"https://api.github.com/users/kevincox/orgs","repos_url":"https://api.github.com/users/kevincox/repos","events_url":"https://api.github.com/users/kevincox/events{/privacy}","received_events_url":"https://api.github.com/users/kevincox/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T11:01:51Z","updated_at":"2016-05-19T11:01:51Z","body":"@edolstra Yes. This is currently worked around by adding a space in the middle of the hash portion of the store path. This has downsides because now the debug packages don't automatically get pushed to a cache with `nix-push`. This might be a legitimate use case for weak references as @bjornfor mentions.\r\n\r\nOn a vaguely similar note. Because the debug info is compressed any references it holds are not recognized. This isn't a big deal right now because it appears that the only thing that gets referenced is the package it came from but if we discover a solution for embedding proper source paths it will become a nuisance. Is there any support for handling references that get mangled in some way?"}}