diff options
author | Arthur Gautier <baloo@superbaloo.net> | 2021-02-09 00:29:57 +0000 |
---|---|---|
committer | Arthur Gautier <baloo@superbaloo.net> | 2021-08-27 04:11:38 +0000 |
commit | 581cff21364ad23d46cff1fe790976e19c2ed7a6 (patch) | |
tree | 9d103b9b128a6c39683b6f408fbd061b62222f54 /pkgs/development/tools/misc/gdb | |
parent | be5900461963d38fc5eb0e12b40e7db112902b72 (diff) |
gdb: adds support for debuginfod
Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
Diffstat (limited to 'pkgs/development/tools/misc/gdb')
-rw-r--r-- | pkgs/development/tools/misc/gdb/default.nix | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pkgs/development/tools/misc/gdb/default.nix b/pkgs/development/tools/misc/gdb/default.nix index ea0002d78c0ac..fd34704a2ab1a 100644 --- a/pkgs/development/tools/misc/gdb/default.nix +++ b/pkgs/development/tools/misc/gdb/default.nix @@ -7,6 +7,7 @@ , ncurses, readline, gmp, mpfr, expat, libipt, zlib, dejagnu, sourceHighlight , pythonSupport ? stdenv.hostPlatform == stdenv.buildPlatform && !stdenv.hostPlatform.isCygwin, python3 ? null +, enableDebuginfod ? false, elfutils , guile ? null , safePaths ? [ # $debugdir:$datadir/auto-load are whitelisted by default by GDB @@ -48,7 +49,8 @@ stdenv.mkDerivation rec { buildInputs = [ ncurses readline gmp mpfr expat libipt zlib guile sourceHighlight ] ++ lib.optional pythonSupport python3 - ++ lib.optional doCheck dejagnu; + ++ lib.optional doCheck dejagnu + ++ lib.optional enableDebuginfod (elfutils.override { enableDebuginfod = true; }); propagatedNativeBuildInputs = [ setupDebugInfoDirs ]; @@ -89,7 +91,8 @@ stdenv.mkDerivation rec { "--with-expat" "--with-libexpat-prefix=${expat.dev}" "--with-auto-load-safe-path=${builtins.concatStringsSep ":" safePaths}" ] ++ lib.optional (!pythonSupport) "--without-python" - ++ lib.optional stdenv.hostPlatform.isMusl "--disable-nls"; + ++ lib.optional stdenv.hostPlatform.isMusl "--disable-nls" + ++ lib.optional enableDebuginfod "--with-debuginfod=yes"; postInstall = '' # Remove Info files already provided by Binutils and other packages. |