about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-09-17 15:45:10 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-09-17 15:56:37 +0200
commite636e0a5329f546ebcc603d56bb99a0d016370f8 (patch)
tree51b4185565f56b993a5ee71a4454871415170ed0
parentec5b66eb4add9d494d8fb16f6899028750d317a2 (diff)
downloadnixlib-e636e0a5329f546ebcc603d56bb99a0d016370f8.tar
nixlib-e636e0a5329f546ebcc603d56bb99a0d016370f8.tar.gz
nixlib-e636e0a5329f546ebcc603d56bb99a0d016370f8.tar.bz2
nixlib-e636e0a5329f546ebcc603d56bb99a0d016370f8.tar.lz
nixlib-e636e0a5329f546ebcc603d56bb99a0d016370f8.tar.xz
nixlib-e636e0a5329f546ebcc603d56bb99a0d016370f8.tar.zst
nixlib-e636e0a5329f546ebcc603d56bb99a0d016370f8.zip
gdb: Look for debug info in /run/current-system/sw/lib/debug
The previous default was $out/lib/debug, which wasn't very useful.

This ensures that you can do

  environment.systemPackages = [ pkgs.hello.debug ];

to install debug info.
-rw-r--r--nixos/modules/config/system-path.nix3
-rw-r--r--pkgs/development/tools/misc/gdb/default.nix1
2 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/config/system-path.nix b/nixos/modules/config/system-path.nix
index 3241780a3a71..748ada99be69 100644
--- a/nixos/modules/config/system-path.nix
+++ b/nixos/modules/config/system-path.nix
@@ -103,7 +103,8 @@ in
       [ "/bin"
         "/etc/xdg"
         "/info"
-        "/lib"
+        "/lib" # FIXME: remove
+        #"/lib/debug/.build-id" # enables GDB to find separated debug info
         "/man"
         "/sbin"
         "/share/applications"
diff --git a/pkgs/development/tools/misc/gdb/default.nix b/pkgs/development/tools/misc/gdb/default.nix
index d50822d49491..ee7f0595a1fd 100644
--- a/pkgs/development/tools/misc/gdb/default.nix
+++ b/pkgs/development/tools/misc/gdb/default.nix
@@ -44,6 +44,7 @@ stdenv.mkDerivation rec {
   configureFlags = with stdenv.lib;
     '' --with-gmp=${gmp} --with-mpfr=${mpfr} --with-system-readline
        --with-expat --with-libexpat-prefix=${expat}
+       --with-separate-debug-dir=/run/current-system/sw/lib/debug
     ''
     + optionalString (target != null) " --target=${target.config}"
     + optionalString (elem stdenv.system platforms.cygwin) "  --without-python";