Debian Bug report logs - #834575
gdb: FTBFS on hurd-i386

version graph

Package: src:gdb; Maintainer for src:gdb is Héctor Orón Martínez <zumbi@debian.org>;

Reported by: svante.signell@gmail.com

Date: Wed, 17 Aug 2016 07:54:06 UTC

Severity: important

Tags: patch

Found in versions gdb/7.12-1, gdb/7.11.1-2, gdb/7.12-2

Fixed in version gdb/7.12-3

Done: Héctor Orón Martínez <zumbi@debian.org>

Bug is archived. No further changes may be made.

Forwarded to Don Breazeal <donb@codesourcery.com>, <gdb-patches@sourceware.org>

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Héctor Orón Martínez <zumbi@debian.org>:
Bug#834575; Package src:gdb. (Wed, 17 Aug 2016 07:54:09 GMT) (full text, mbox, link).


Acknowledgement sent to svante.signell@gmail.com:
New Bug report received and forwarded. Copy sent to Héctor Orón Martínez <zumbi@debian.org>. (Wed, 17 Aug 2016 07:54:09 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Svante Signell <svante.signell@gmail.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: gdb: FTBFS on hurd-i386
Date: Wed, 17 Aug 2016 09:52:14 +0200
[Message part 1 (text/plain, inline)]
Source: gdb
Version: 7.11.1-2
Severity: important
Tags: patch
User: debian-hurd@lists.debian.org
Usertags: hurd

Hi,

gdb fails to build on GNU/Hurd due to a missing rename of "thread_id_to_pid" to
"global_thread_id_to_ptid" in gdb/gnu-nat.c and a PATH_MAX issue in
gdb/remote.c. The two attached patches fixes these problems. These patches can
probably be forwarded upstream for review.

Thanks!
[gdb-missing_rename.patch (text/x-patch, attachment)]
[gdb-PATH_MAX.patch (text/x-patch, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Héctor Orón Martínez <zumbi@debian.org>:
Bug#834575; Package src:gdb. (Thu, 08 Dec 2016 12:12:02 GMT) (full text, mbox, link).


Acknowledgement sent to Thomas Schwinge <thomas@codesourcery.com>:
Extra info received and forwarded to list. Copy sent to Héctor Orón Martínez <zumbi@debian.org>. (Thu, 08 Dec 2016 12:12:02 GMT) (full text, mbox, link).


Message #10 received at 834575@bugs.debian.org (full text, mbox, reply):

From: Thomas Schwinge <thomas@codesourcery.com>
To: Don Breazeal <donb@codesourcery.com>, <gdb-patches@sourceware.org>
Cc: <bug-hurd@gnu.org>, <834575@bugs.debian.org>, <834575-forwarded@bugs.debian.org>, <svante.signell@gmail.com>
Subject: Re: [pushed][PATCH v3 1/4] Extended-remote follow exec
Date: Thu, 8 Dec 2016 12:54:36 +0100
Hi!

On Fri, 11 Sep 2015 11:38:15 -0700, Don Breazeal <donb@codesourcery.com> wrote:
> Here is what I pushed.

> --- a/gdb/remote.c
> +++ b/gdb/remote.c

> @@ -6089,11 +6178,42 @@ Packet: '%s'\n"),
>  	      event->ws.kind = TARGET_WAITKIND_VFORK_DONE;
>  	      p = skip_to_semicolon (p1 + 1);
>  	    }
> +	  else if (strncmp (p, "exec", p1 - p) == 0)
> +	    {
> +	      ULONGEST ignored;
> +	      char pathname[PATH_MAX];
> +	      int pathlen;
> +
> +	      /* Determine the length of the execd pathname.  */
> +	      p = unpack_varlen_hex (++p1, &ignored);
> +	      pathlen = (p - p1) / 2;
> +
> +	      /* Save the pathname for event reporting and for
> +		 the next run command.  */
> +	      hex2bin (p1, (gdb_byte *) pathname, pathlen);
> +	      pathname[pathlen] = '\0';
> +
> +	      /* This is freed during event handling.  */
> +	      event->ws.value.execd_pathname = xstrdup (pathname);
> +	      event->ws.kind = TARGET_WAITKIND_EXECD;
> +
> +	      /* Skip the registers included in this packet, since
> +		 they may be for an architecture different from the
> +		 one used by the original program.  */
> +	      skipregs = 1;
> +	    }

On GNU/Hurd, there is no "#define PATH_MAX", so this fails to build.
(I'm aware that there is other PATH_MAX usage in GDB sources, which we
ought to fix at some point, for example in gdbserver -- which is not yet
enabled for GNU/Hurd.)

OK to push the following?  (Similar to Svante's patch in
<https://bugs.debian.org/834575>.)

--- gdb/remote.c
+++ gdb/remote.c
@@ -6927,7 +6927,6 @@ Packet: '%s'\n"),
 	  else if (strprefix (p, p1, "exec"))
 	    {
 	      ULONGEST ignored;
-	      char pathname[PATH_MAX];
 	      int pathlen;
 
 	      /* Determine the length of the execd pathname.  */
@@ -6936,11 +6935,12 @@ Packet: '%s'\n"),
 
 	      /* Save the pathname for event reporting and for
 		 the next run command.  */
+	      char *pathname = (char *) xmalloc (pathlen + 1);
 	      hex2bin (p1, (gdb_byte *) pathname, pathlen);
 	      pathname[pathlen] = '\0';
 
 	      /* This is freed during event handling.  */
-	      event->ws.value.execd_pathname = xstrdup (pathname);
+	      event->ws.value.execd_pathname = pathname;
 	      event->ws.kind = TARGET_WAITKIND_EXECD;
 
 	      /* Skip the registers included in this packet, since


Grüße
 Thomas



Reply sent to Thomas Schwinge <thomas@codesourcery.com>:
You have marked Bug as forwarded. (Thu, 08 Dec 2016 12:12:11 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Héctor Orón Martínez <zumbi@debian.org>:
Bug#834575; Package src:gdb. (Tue, 13 Dec 2016 15:42:06 GMT) (full text, mbox, link).


Acknowledgement sent to Hector Oron <zumbi@debian.org>:
Extra info received and forwarded to list. Copy sent to Héctor Orón Martínez <zumbi@debian.org>. (Tue, 13 Dec 2016 15:42:06 GMT) (full text, mbox, link).


Message #18 received at 834575@bugs.debian.org (full text, mbox, reply):

From: Hector Oron <zumbi@debian.org>
To: svante.signell@gmail.com, 834575@bugs.debian.org, thomas@codesourcery.com
Subject: Re: Bug#834575: gdb: FTBFS on hurd-i386
Date: Tue, 13 Dec 2016 16:39:00 +0100
[Message part 1 (text/plain, inline)]
On Wed, Aug 17, 2016 at 09:52:14AM +0200, Svante Signell wrote:
> Source: gdb
> Version: 7.11.1-2
> Severity: important
> Tags: patch
> User: debian-hurd@lists.debian.org
> Usertags: hurd

Hello,

  I have applied your patches on top of 7.12-1 and attempt to build on
  hurd-i386 porterbox, but the build end up failing for me.

  Could you please attempt to build GDB under hurd and submit a patch, so we
  can apply that before release.

Thanks,
-- 
  Hector Oron
[signature.asc (application/pgp-signature, inline)]

Marked as found in versions gdb/7.12-1. Request was from Hector Oron <zumbi@debian.org> to control@bugs.debian.org. (Wed, 14 Dec 2016 15:39:02 GMT) (full text, mbox, link).


Marked as found in versions gdb/7.12-2. Request was from Hector Oron <zumbi@debian.org> to control@bugs.debian.org. (Wed, 14 Dec 2016 15:39:04 GMT) (full text, mbox, link).


Reply sent to Héctor Orón Martínez <zumbi@debian.org>:
You have taken responsibility. (Thu, 15 Dec 2016 01:21:04 GMT) (full text, mbox, link).


Notification sent to svante.signell@gmail.com:
Bug acknowledged by developer. (Thu, 15 Dec 2016 01:21:04 GMT) (full text, mbox, link).


Message #27 received at 834575-close@bugs.debian.org (full text, mbox, reply):

From: Héctor Orón Martínez <zumbi@debian.org>
To: 834575-close@bugs.debian.org
Subject: Bug#834575: fixed in gdb 7.12-3
Date: Thu, 15 Dec 2016 01:18:34 +0000
Source: gdb
Source-Version: 7.12-3

We believe that the bug you reported is fixed in the latest version of
gdb, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 834575@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Héctor Orón Martínez <zumbi@debian.org> (supplier of updated gdb package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 15 Dec 2016 01:50:31 +0100
Source: gdb
Binary: gdb gdb-python2 gdb-minimal gdb-multiarch gdbserver gdb-source
Architecture: source
Version: 7.12-3
Distribution: unstable
Urgency: medium
Maintainer: Héctor Orón Martínez <zumbi@debian.org>
Changed-By: Héctor Orón Martínez <zumbi@debian.org>
Description:
 gdb        - GNU Debugger
 gdb-minimal - GNU Debugger (minimal version)
 gdb-multiarch - GNU Debugger (with support for multiple architectures)
 gdb-python2 - GNU Debugger (linked against python2)
 gdb-source - GNU Debugger (source)
 gdbserver  - GNU Debugger (remote server)
Closes: 834575
Changes:
 gdb (7.12-3) unstable; urgency=medium
 .
   * debian/patches:
     - backport build fixes for Hurd.
     (Closes: #834575)
   * debian/rules: clean target, remove debian/files.
Checksums-Sha1:
 bf302887d860d4b7e2cbe253afc1871831b698dc 2846 gdb_7.12-3.dsc
 8f82be8a04fa8cd4793fc063b2f026e526c0c455 60444 gdb_7.12-3.debian.tar.xz
Checksums-Sha256:
 d6d43198e04cb753dc9b867df5490a46d1f4c7e80e778988f846041ad135e375 2846 gdb_7.12-3.dsc
 2ca9f1f3fdc4dc67eecc9fffd698ba6b5042be9eef6212942f4ea7af56be299b 60444 gdb_7.12-3.debian.tar.xz
Files:
 d518417de06d3a5c39d6a5e99a483d7d 2846 devel optional gdb_7.12-3.dsc
 c5841cd083b25df103f9fa8bd62c4f42 60444 devel optional gdb_7.12-3.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE6Q8IiVReeMgqnedOryKDqnbirHsFAlhR6X0ACgkQryKDqnbi
rHv4fg/+L/RsiDn0tv9m/qtHwi6OMlRCtXwyeTkbwzYq8H3wzLnkdbIzWTplBJ/4
g/wS11lf29qoHdHNFAjATfujIHWxtsH44nHwRDEG6R6lhJZWR+l4xhET3WJFTBKf
jiUafSqCiMqNr8ww2zFMxqPStRLUxGp91Z22tbd/iw0G5bQM54o2WYacCS8Id28Y
9JIKqU8eEciFpvc0z40ZTsh+lQwsV3juKCCQATYuwE+NyydkB4cTGp6RgznQ9FGN
dVIyGPJ0TmlxUjn26y9WsjwFsjH+Kf6sDMfgxFwsrMmvc4Guc1zfQpqZitWPM1EG
MLWnCWWbxLpNKYGTg92wpXU4OphYEXqQvqjvHnVAbenyqVpAmzOgQDriVGQM91wo
fBrvKYYub44VC1YN1AVLSUnXsg8jvccZS2yqZXUIi21VMGXLDObOMcBs16eipQfb
fzl4Nkh/AU4WYgcy8yEHbooFKGokSa8MeTSHYnkxnJQsjrNrv40UqlR5rsnTu8Q9
futck22ASCbmk9cMbT+B9VIfAiWGj+H8ekAukM3CPOIHE00qI0tsE/6T5EwDjIgb
QFFyYGvoQBnbY2i893+MjM4WEXJlPz0q7S6XDXd41N3hTT59AiuePghhpQpFJqp+
X6o38K0B/cR0JLkPch+D9oEVFT+ZP2G0VT/fsieEI79ZvnkMDhE=
=Q/wU
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Fri, 27 Jan 2017 11:04:04 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Dec 6 12:11:58 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.