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.
This commit is contained in:
Eelco Dolstra 2015-09-17 15:45:10 +02:00
parent ec5b66eb4a
commit e636e0a532
2 changed files with 3 additions and 1 deletions

View File

@ -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"

View File

@ -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";