Commit Graph

135 Commits

Author SHA1 Message Date
Sergei Trofimovich
094b2891aa gdb: enable debuginfod support only on platforms with elfutils support 2023-04-28 10:08:37 +01:00
github-actions[bot]
a851087ffa
Merge staging-next into staging 2023-04-18 00:02:42 +00:00
Yureka
cb2d5a2fa9
gdbHostCpuOnly: init (#226134)
Closure size 843.9M -> 212.3M
2023-04-17 23:06:16 +02:00
Guillaume Girol
b7bad825f7 elfutils: enable debuginfod support
most reverse dependencies are debuggers which benefit from this support,
plus systemd which already depends on half the additional
depenendencies.
2023-04-09 12:00:00 +00:00
Sergei Trofimovich
10f10a3d6a
Merge pull request #217884 from trofi/gdb-update
gdb: 12.1 -> 13.1
2023-02-28 20:38:24 +00:00
github-actions[bot]
3cdd771820
Merge staging-next into staging 2023-02-23 18:01:49 +00:00
Sergei Trofimovich
ab3ec09c66 gdb: 12.1 -> 13.1
Notable change: new `zstd` dependency to support zstd-compressed
sections.

Changes: https://sourceware.org/pipermail/gdb/2023-February/050607.html
2023-02-23 17:56:57 +00:00
Artturin
f9fdf2d402 treewide: move NIX_CFLAGS_COMPILE to the env attrset
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper

this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
2023-02-22 21:23:04 +02:00
Guillaume Girol
86f398dfc4 gdb: add system-wide configuration file
paths are copied from debian and arch.
2023-01-28 12:00:00 +00:00
Martin Weinelt
c1e6c6af69 Merge remote-tracking branch 'origin/master' into staging-next 2023-01-11 03:51:33 +01:00
Sergei Trofimovich
3f5d99e914 gdb: backport readline-8.2 fix
Without the change gdb fails build on `readline-8.2` as:

    ../../gdb/completer.c: In function 'char* gdb_completion_word_break_characters_throw()':
    ../../gdb/completer.c:2014:10: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
     2014 |   return rl_completer_word_break_characters;
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |          |
          |          const char*
2022-12-30 00:50:12 +00:00
David Zmick
ad651f02dd mark gdb as unsupported on aarch64-darwin
As of Nov 2022, gdb does not support aarch64-darwin
2022-11-27 18:00:51 -06:00
Ryan Burns
ac2909a8eb gdb: disable werror
-Werror should not be used when packaging.

Fixes build for some cross-compilation scenarios,
such as darwin -> i686-linux
2022-10-14 17:07:44 -07:00
Robert Kovacsics
0f456ce627 pkgsStatic.gdb: Fix compile
Fixes the following issue:

        [host@user:/nix/pkgs]$ nix build .\#pkgsStatic.gdb
        checking size of unsigned long long...   CXXLD  libinproctrace.so
        /nix/store/gzms61swp55fg5qbvshyqv5jfsnfvybz-x86_64-unknown-linux-musl-binutils-2.38/bin/x86_64-unknown-linux-musl-ld: /nix/store/dnmh1aj0kd60qz8yl4srak8kn2bspbxc-x86_64-unknown-linux-musl-stage-final-gcc-11.3.0/lib/gcc/x86_64-unknown-linux-musl/11.3.0/crtbeginT.o: relocation R_X86_64_32 against hidden symbol `__TMC_END__' can not be used when making a shared object
        /nix/store/gzms61swp55fg5qbvshyqv5jfsnfvybz-x86_64-unknown-linux-musl-binutils-2.38/bin/x86_64-unknown-linux-musl-ld: failed to set dynamic section sizes: bad value
        collect2: error: ld returned 1 exit status
        make[2]: *** [Makefile:383: libinproctrace.so] Error 1
        make[2]: *** Waiting for unfinished jobs....
        8
        checking size of unsigned long... make[2]: Leaving directory '/build/gdb-12.1/_build/gdbserver'
        make[1]: *** [Makefile:11064: all-gdbserver] Error 2

as the inprocess library can only be compiled as a shared library
2022-08-09 14:13:10 +00:00
Sergei Trofimovich
63d81ddf9f pkgsi686Linux.gdb: fix formatting for 32-bit systems
A few rare targets don't have clean format strings on 32-bit systems:
https://github.com/NixOS/nixpkgs/pull/171216#issuecomment-1133541978

    /build/gdb-12.1/_build/sim/../../sim/cris/sim-if.c:575:28:
      error: format '%lx' expects argument of type 'long unsigned int',
        but argument 4 has type 'bfd_size_type' {aka 'long long unsigned int'} [-Werror=format=]

We pull in patch pending upstream inclusion.
2022-05-21 21:18:21 +01:00
Will Dietz
cd1d65cfc1 gdb: fix w/musl, touchup postPatch expr
Take advantage of the bump and drop the if/null construct for optionalString.
2022-05-04 19:39:45 +01:00
Sergei Trofimovich
e6491be4e3 gdb: 11.2 -> 12.1
Added trivial updater script.
Refreshed nix-specific patch with path to debug symbols.
Dropped upstreamed patches for gcc-12 support and musl support.

Changes: https://www.sourceware.org/gdb/download/ANNOUNCEMENT
2022-05-04 19:39:45 +01:00
Will Dietz
47363ef04f
gdb: fix w/musl (#164766)
* gdb: fix on musl, sys/termios.h -> termios.h

* gdb: grab upstream patch to fix w/musl

Fixes instances of PAGESIZE/PAGE_SIZE that conflict
with header-provided definitions.

I was concerned about stability (IIRC version in these can change?)
but already risking that with the gcc-12 patch, so this is probably
okay.

Stale/unstable URL's are especially important to avoid on less
commonly used combinations such as w/musl, but also don't
want to bloat the tree :).

Risk is low, as this will be included in next update.
2022-03-21 12:33:01 -05:00
Lancelot SIX
4c7208b46e
gdb: 11.1 -> 11.2
See https://sourceware.org/pipermail/gdb/2022-January/049848.html for
release announcement.
2022-01-16 15:50:48 +00:00
Sergei Trofimovich
53e928ed5f gdb: pull upstream fix for gcc-12
Without the change the build fails as:

    sim/cr16/interp.c: In function 'lookup_hash':
    sim/cr16/interp.c:89:25: error:
      the comparison will always evaluate as 'true'
      for the address of 'mnimonic' will never be NULL [-Werror=address]
       89 |   if ((h->ops->mnimonic != NULL) &&
          |                         ^~
2021-11-26 17:57:18 +00:00
Ryan Burns
f609e8290d
Merge pull request #112455 from baloo/baloo/gdb/debuginfod
gdb: add support for debuginfod
2021-10-07 01:04:37 -07:00
lsix
43b96f66ef
gdb: 10.2 -> 11.1 (#137628)
See https://sourceware.org/pipermail/gdb/2021-September/049719.html for
release information.
2021-09-20 18:08:36 +01:00
Arthur Gautier
581cff2136 gdb: adds support for debuginfod
Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
2021-08-27 04:11:38 +00:00
Lancelot SIX
8a859eca1f gdb: Add source-highlight dependency. 2021-08-12 18:13:48 +01:00
Lancelot SIX
279192c950 gdb: 10.1 -> 10.2
See https://sourceware.org/pipermail/gdb/2021-April/049400.html for
release announcement
2021-04-27 10:06:24 +01:00
sternenseemann
e75c5353bb gdb: always set --program-prefix and pass --target
This makes the targetPrefix always conform to nixpkgs' expectations
instead of relying on the autotools build system to figure it out
correctly (which is also inconsistent across versions).

See also ca9be0511b.
2021-04-16 22:56:39 +02:00
Jörg Thalheim
aaae419aac
gdb: fix musl build
fixes #104133

Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
2021-02-24 09:05:34 +01:00
Ben Siraphob
c522fec274 pkgs/development/tools: stdenv.lib -> lib 2021-01-23 20:30:03 +07:00
Jonathan Ringer
9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00
Lancelot SIX
6d2cad8a4e
gdb: 9.2 -> 10.1
See https://lists.gnu.org/archive/html/info-gnu/2020-10/msg00009.html
for release announcement
2020-10-24 19:22:36 +01:00
Pamplemousse
91aed208f5 gdb: Give it a pname
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
2020-08-21 11:06:13 -07:00
Lancelot SIX
3d2010311f gdb: 9.1 -> 9.2
See https://lists.gnu.org/archive/html/info-gnu/2020-05/msg00008.html
for release information
2020-06-04 18:19:40 +02:00
Michael Reilly
84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
Lancelot SIX
4e08586690 gdb: 8.3.1 -> 9.1
See https://www.gnu.org/software/gdb/download/ANNOUNCEMENT for release
information
2020-03-06 07:04:07 +01:00
tollb
ad337f7f3a
gdb: Fix abort w/NIX_DEBUG_INFO_DIRS patch (#80929)
The current gdb patch to support NIX_DEBUG_INFO_DIRS fails if
the user attempts to change the debug file directory to a
value other than the default. For instance:

(gdb) set debug-file-directory /run/booted-system/sw/lib/debug

results in:

munmap_chunk(): invalid pointer
Aborted (core dumped)

To fix this issue, the debug_file_directory is allocated
with xstrdup so that a subsequent call to xfree will succeed.
2020-02-25 01:18:09 +00:00
John Ericson
7ee98d8bb3 gdb: Fix safe path for cross 2019-12-01 17:13:24 -05:00
Viktor Vilhelm Sonesten
2c50bd3984
gdb: prepend default safe paths
Co-Authored-By: Jörg Thalheim <Mic92@users.noreply.github.com>
2019-11-25 20:48:28 +01:00
Tmplt
75348fafae gdb: use a safePaths parameter instead 2019-11-20 18:14:54 +01:00
Tmplt
a3e008420e gdb: configure a safe path instead of wrapping 2019-11-19 21:40:16 +01:00
Tmplt
6cff4ce58b gdb: don't propagate unwrapped gdb 2019-11-19 16:48:40 +01:00
Tmplt
800f280696 gdb: wrap, making libstdc++ plugin safe to load 2019-11-17 18:51:54 +01:00
Orivej Desh
e675e2763e gdb: build with libipt
This adds support for "record btrace pt" command.
2019-09-22 21:34:32 +00:00
Will Dietz
d1f7bb2ad9
gdb: 8.3 -> 8.3.1
https://lists.gnu.org/archive/html/info-gnu/2019-09/msg00006.html
2019-09-21 02:51:02 -05:00
Robin Gloster
4e60b0efae
treewide: update globin's maintained drvs 2019-08-20 19:36:05 +02:00
volth
f3282c8d1e treewide: remove unused variables (#63177)
* treewide: remove unused variables

* making ofborg happy
2019-06-16 19:59:05 +00:00
Matthew Bauer
80b51d983a gdb: patch to use mach-o.h instead of bfd/mach-o.h
For unclear reasons, this doesn’t seem to work anymore. bfd/mach-o.h
is not accessible but mach-o.h is.

https://hydra.nixos.org/build/94542582
2019-06-09 23:56:08 -04:00
Matthew Bauer
cb385daf95 gdb: remove applied patch for darwin
This patch is no longer needed. The commit was included in this
release.

https://hydra.nixos.org/build/94447561
2019-06-07 15:52:14 -04:00
jhaasdijk
78bd2e82cc gdb: 8.2.1 -> 8.3 2019-05-15 17:46:14 +02:00
Will Dietz
dcfabd82e2
Merge pull request #52730 from dtzWill/update/gdb-8.2.1
gdb: 8.2 -> 8.2.1
2018-12-29 15:47:07 -06:00
Will Dietz
617ac0403c gdb: 8.2 -> 8.2.1
https://lists.gnu.org/archive/html/info-gnu/2018-12/msg00013.html
2018-12-23 11:01:08 -06:00