Your message dated Sun, 15 Jul 2018 10:34:12 +0000
with message-id <[email protected]>
and subject line Bug#881569: fixed in gdb 8.1-1
has caused the Debian Bug report #881569,
regarding gdb: FTBFS on hurd-i386
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
881569: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=881569
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: gdb
Version: 8.0-1
Severity: important
Tags: patch
User: [email protected]
Usertags: hurd, experimental

Hi,

gdb FTBFS on GNU/Hurd due to three reasons:

- Usage of PATH_MAX in gdb/remote.c

- Recent changes in Hurd failing the build of gdb/gnu-nat.c

- A name clash of struct thread_info and the kernel function thread_info()
included in gdb/thread.c and gdb/python/py-record-btrace.c.

Include paths:
1) defs.h: #include "gdbarch.h": struct thread_info

2) defs.h: #include "nm.h":#include <mach.h>:#include <mach/mach_interface.h>
where the function thread_info() is defined:

extern kern_return_t thread_info
(
 mach_port_t target_thread,
 int flavor,
 thread_info_t thread_info_out,
 mach_msg_type_number_t *thread_info_outCnt
);

The attached patches fixes these issues:
gdb-PATH_MAX.patch
gnu-nat.c.patch
struct-thread_info.patch

Thanks :)
Index: gdb-8.0/gdb/remote.c
===================================================================
--- gdb-8.0.orig/gdb/remote.c
+++ gdb-8.0/gdb/remote.c
@@ -6939,7 +6939,7 @@ Packet: '%s'\n"),
 	  else if (strprefix (p, p1, "exec"))
 	    {
 	      ULONGEST ignored;
-	      char pathname[PATH_MAX];
+	      char *pathname = NULL;
 	      int pathlen;
 
 	      /* Determine the length of the execd pathname.  */
@@ -6948,12 +6948,14 @@ Packet: '%s'\n"),
 
 	      /* Save the pathname for event reporting and for
 		 the next run command.  */
+	      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.kind = TARGET_WAITKIND_EXECD;
+	      xfree (pathname);
 
 	      /* Skip the registers included in this packet, since
 		 they may be for an architecture different from the
Index: gdb-8.0/gdb/gnu-nat.c
===================================================================
--- gdb-8.0.orig/gdb/gnu-nat.c
+++ gdb-8.0/gdb/gnu-nat.c
@@ -1869,22 +1869,28 @@ S_proc_wait_reply (mach_port_t reply, ke
   return 0;
 }
 
+/* Note: The third argument to S_proc_getmsgport_reply, S_proc_task2proc_reply and
+   S_proc_pid2proc_reply is of type mach_port_poly_t. Look at gdb/process_reply_S.h
+   derived from process_reply.defs to find out the fourth argument */
+
 ILL_RPC (S_proc_setmsgport_reply,
 	 mach_port_t reply_port, kern_return_t return_code,
 	 mach_port_t oldmsgport)
 ILL_RPC (S_proc_getmsgport_reply,
 	 mach_port_t reply_port, kern_return_t return_code,
-	 mach_port_t msgports)
+	 mach_port_t msgports, mach_msg_type_name_t msgportsPoly)
 ILL_RPC (S_proc_pid2task_reply,
 	 mach_port_t reply_port, kern_return_t return_code, mach_port_t task)
 ILL_RPC (S_proc_task2pid_reply,
 	 mach_port_t reply_port, kern_return_t return_code, pid_t pid)
 ILL_RPC (S_proc_task2proc_reply,
-	 mach_port_t reply_port, kern_return_t return_code, mach_port_t proc)
+	 mach_port_t reply_port, kern_return_t return_code, mach_port_t proc,
+	 mach_msg_type_name_t procPoly)
 ILL_RPC (S_proc_proc2task_reply,
 	 mach_port_t reply_port, kern_return_t return_code, mach_port_t task)
 ILL_RPC (S_proc_pid2proc_reply,
-	 mach_port_t reply_port, kern_return_t return_code, mach_port_t proc)
+	 mach_port_t reply_port, kern_return_t return_code, mach_port_t proc,
+	 mach_msg_type_name_t procPoly)
 ILL_RPC (S_proc_getprocinfo_reply,
 	 mach_port_t reply_port, kern_return_t return_code,
 	 int flags, procinfo_t procinfo, mach_msg_type_number_t procinfoCnt,
@@ -2356,7 +2362,7 @@ gnu_write_inferior (task_t task, CORE_AD
   mach_msg_type_number_t copy_count;
   int deallocate = 0;
 
-  char *errstr = "Bug in gnu_write_inferior";
+  const char *errstr = "Bug in gnu_write_inferior";
 
   struct vm_region_list *region_element;
   struct vm_region_list *region_head = NULL;
@@ -2743,7 +2749,7 @@ show_thread_default_cmd (char *args, int
 }
 
 static int
-parse_int_arg (char *args, char *cmd_prefix)
+parse_int_arg (const char *args, const char *cmd_prefix)
 {
   if (args)
     {
@@ -2758,7 +2764,7 @@ parse_int_arg (char *args, char *cmd_pre
 }
 
 static int
-_parse_bool_arg (char *args, char *t_val, char *f_val, char *cmd_prefix)
+_parse_bool_arg (const char *args, const char *t_val, const char *f_val, const char *cmd_prefix)
 {
   if (!args || strcmp (args, t_val) == 0)
     return 1;
@@ -2774,7 +2780,7 @@ _parse_bool_arg (char *args, char *t_val
   _parse_bool_arg (args, "on", "off", cmd_prefix)
 
 static void
-check_empty (char *args, char *cmd_prefix)
+check_empty (const char *args, const char *cmd_prefix)
 {
   if (args)
     error (_("Garbage after \"%s\" command: `%s'"), cmd_prefix, args);
Index: gdb-8.0/gdb/thread.c
===================================================================
--- gdb-8.0.orig/gdb/thread.c
+++ gdb-8.0/gdb/thread.c
@@ -76,21 +76,21 @@ static void restore_current_thread (ptid
 class scoped_inc_dec_ref
 {
 public:
-  explicit scoped_inc_dec_ref (const std::vector<thread_info *> &thrds)
+  explicit scoped_inc_dec_ref (const std::vector<struct thread_info *> &thrds)
     : m_thrds (thrds)
   {
-    for (thread_info *thr : m_thrds)
+    for (struct thread_info *thr : m_thrds)
       thr->incref ();
   }
 
   ~scoped_inc_dec_ref ()
   {
-    for (thread_info *thr : m_thrds)
+    for (struct thread_info *thr : m_thrds)
       thr->decref ();
   }
 
 private:
-  const std::vector<thread_info *> &m_thrds;
+  const std::vector<struct thread_info *> &m_thrds;
 };
 
 
@@ -207,7 +207,7 @@ clear_thread_inferior_resources (struct
 /* Set the TP's state as exited.  */
 
 static void
-set_thread_exited (thread_info *tp, int silent)
+set_thread_exited (struct thread_info *tp, int silent)
 {
   /* Dead threads don't need to step-over.  Remove from queue.  */
   if (tp->step_over_next != NULL)
@@ -254,7 +254,7 @@ init_thread_list (void)
 static struct thread_info *
 new_thread (struct inferior *inf, ptid_t ptid)
 {
-  thread_info *tp = new thread_info (inf, ptid);
+  struct thread_info *tp = new struct thread_info (inf, ptid);
 
   if (thread_list == NULL)
     thread_list = tp;
@@ -1574,7 +1574,7 @@ restore_selected_frame (struct frame_id
 
 struct current_thread_cleanup
 {
-  thread_info *thread;
+  struct thread_info *thread;
   struct frame_id selected_frame_id;
   int selected_frame_level;
   int was_stopped;
@@ -1716,7 +1716,7 @@ static bool tp_array_compar_ascending;
    order is determined by TP_ARRAY_COMPAR_ASCENDING.  */
 
 static bool
-tp_array_compar (const thread_info *a, const thread_info *b)
+tp_array_compar (const struct thread_info *a, const struct thread_info *b)
 {
   if (a->inf->num != b->inf->num)
     {
@@ -1774,11 +1774,11 @@ thread_apply_all_command (char *cmd, int
 	 thread, in case the command is one that wipes threads.  E.g.,
 	 detach, kill, disconnect, etc., or even normally continuing
 	 over an inferior or thread exit.  */
-      std::vector<thread_info *> thr_list_cpy;
+      std::vector<struct thread_info *> thr_list_cpy;
       thr_list_cpy.reserve (tc);
 
       {
-	thread_info *tp;
+	struct thread_info *tp;
 
 	ALL_NON_EXITED_THREADS (tp)
 	  {
@@ -1794,7 +1794,7 @@ thread_apply_all_command (char *cmd, int
 
       std::sort (thr_list_cpy.begin (), thr_list_cpy.end (), tp_array_compar);
 
-      for (thread_info *thr : thr_list_cpy)
+      for (struct thread_info *thr : thr_list_cpy)
 	if (thread_alive (thr))
 	  {
 	    switch_to_thread (thr->ptid);
Index: gdb-8.0/gdb/python/py-record-btrace.c
===================================================================
--- gdb-8.0.orig/gdb/python/py-record-btrace.c
+++ gdb-8.0/gdb/python/py-record-btrace.c
@@ -71,7 +71,7 @@ btrace_insn_from_recpy_insn (const PyObj
 {
   const btrace_insn *insn;
   const recpy_element_object *obj;
-  thread_info *tinfo;
+  struct thread_info *tinfo;
   btrace_insn_iterator iter;
 
   if (Py_TYPE (pyobject) != &recpy_insn_type)
@@ -114,7 +114,7 @@ btrace_func_from_recpy_func (const PyObj
 {
   const btrace_function *func;
   const recpy_element_object *obj;
-  thread_info *tinfo;
+  struct thread_info *tinfo;
   btrace_call_iterator iter;
 
   if (Py_TYPE (pyobject) != &recpy_func_type)
@@ -152,7 +152,7 @@ btrace_func_from_recpy_func (const PyObj
    gdb.RecordInstruction or gdb.RecordGap object for it accordingly.  */
 
 static PyObject *
-btpy_insn_or_gap_new (const thread_info *tinfo, Py_ssize_t number)
+btpy_insn_or_gap_new (const struct thread_info *tinfo, Py_ssize_t number)
 {
   btrace_insn_iterator iter;
   int err_code;
@@ -338,7 +338,7 @@ PyObject *
 recpy_bt_func_level (PyObject *self, void *closure)
 {
   const btrace_function * const func = btrace_func_from_recpy_func (self);
-  thread_info *tinfo;
+  struct thread_info *tinfo;
 
   if (func == NULL)
     return NULL;

--- End Message ---
--- Begin Message ---
Source: gdb
Source-Version: 8.1-1

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 [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Héctor Orón Martínez <[email protected]> (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 [email protected])


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

Format: 1.8
Date: Wed, 11 Jul 2018 19:59:33 +0200
Source: gdb
Binary: gdb gdb-python2 gdb-minimal gdb-multiarch gdbserver gdb-source
Architecture: source
Version: 8.1-1
Distribution: unstable
Urgency: medium
Maintainer: Héctor Orón Martínez <[email protected]>
Changed-By: Héctor Orón Martínez <[email protected]>
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: 872800 881569 883814 884105 886658 894702
Changes:
 gdb (8.1-1) unstable; urgency=medium
 .
   [ Héctor Orón Martínez ]
   * Imported Upstream version 8.1, changes in this release:
     - Breakpoints on C++ functions are now set on all scopes by default
       ("wild" matching);
     - Support for inserting breakpoints on functions marked with C++ ABI tags;
     - Target floating-point arithmetic emulation during expression evaluation
       (requires MPFR 3.1 or later);
     - Various Python Scripting enhancements;
     - Improved Rust support; in particular, Trait objects can now be inspected
       when debugging Rust code;
     - GDB no longer makes assumptions about the type of symbols without
       debugging information to avoid producing erroneous and often confusing
       results;
     - The 'enable' and 'disable' commands now accept a range of breakpoint
       locations;
     - New 'starti' command to start the program at the first instruction;
     - New 'rbreak' command to insert a number of breakpoints via a regular
       expression pattern (requires Python);
     - The 'ptype' command now supports printing the offset and size of
       the fields in a struct;
     - The 'gcore' command now supports dumping all the memory mappings
       ('-a' command-line option);
     - New shortcuts for TUI Single-Key mode: 'i' for stepi, and 'o' for nexti;
     - GDBserver enhancements:
       + Support for transmitting environment variables to GDBserver;
       + Support for starting inferior processes with a specified initial
          working directory;
       + On Unix systems, support for globbing expansion and variable
          substitution of inferior command-line arguments;
     - Various completion enhancements;
     - The command used to compile and inject code with the 'compile' command
       is now configurable;
     - New '--readnever' command-line option to speed the GDB startup when
       debugging information is not needed;
     - Support for the following new native configurations:
       + FreeBSD/aarch64 (aarch64*-*-freebsd*);
       + FreeBSD/arm (arm*-*-freebsd*);
     - Support for the following new targets:
       + FreeBSD/aarch64 (aarch64*-*-freebsd*);
       + FreeBSD/arm (arm*-*-freebsd*);
       + OpenRISC ELF (or1k*-*-elf)
     - Removed support for the following targets and native configurations:
       + Solaris2/x86 (i?86-*-solaris2.[0-9]);
       + Solaris2/sparc (sparc*-*-solaris2.[0-9]);
     (Closes: #886658, #881569, #894702)
   * debian/patches: refresh series
   * debian/copyright: use https instead http
   * debian/control.in: set Rules-Requires-Root to no
   * debian/control.in: bump standards version
   * debian/control.in: thanks Samuel Bronson for past work
     (Closes: #883814)
   * debian/control.in: thanks Luca Bruno for past work
   * debian/control: sync to debian/control.in
 .
   [ James Clarke ]
   * Use unversioned libunwind-dev build dependency on ia64
     (Closes: #884105)
 .
   [ Jack Henschel ]
   * Enable Intel PT
     (Closes: #872800)
Checksums-Sha1:
 915fb9b8ebfc71b4502d5235c45f0cfa329d57ec 2778 gdb_8.1-1.dsc
 a522f55136099bb14718caf46d1d9e31b0b4a996 20717592 gdb_8.1.orig.tar.xz
 41e41a468369df462389c82ecaa6ac5dd9474e94 47004 gdb_8.1-1.debian.tar.xz
 8b9deb2f8515499cb75c6856a9ca59f73c751c3f 9385 gdb_8.1-1_source.buildinfo
Checksums-Sha256:
 5ab9d772ce776fed552f363db35d45c622da2ba69f21b4ab60f547d68ea97811 2778 
gdb_8.1-1.dsc
 704ed04a48f89f8bc90b31fc425d699a89f3d9647d98af4c3b0555c84cdd4ce0 20717592 
gdb_8.1.orig.tar.xz
 9b582f1b13e3a755ff7324de863e32c2f4b30e6b27a0dd0f477d2f49723474e0 47004 
gdb_8.1-1.debian.tar.xz
 b0468a1fdd0f113b482d3fca7d66cac7cb34db7042e2cb175f81d4b48e4858be 9385 
gdb_8.1-1_source.buildinfo
Files:
 0f97cabd8e3dc98020a6f199a77b11d4 2778 devel optional gdb_8.1-1.dsc
 bf767d083d3c87dd5df7754cb7277158 20717592 devel optional gdb_8.1.orig.tar.xz
 cd01a2531037336c2db034c5cf8b4bbf 47004 devel optional gdb_8.1-1.debian.tar.xz
 abd44fb258ef4757f9a2b4dc84da2b5c 9385 devel optional gdb_8.1-1_source.buildinfo

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

iQIzBAEBCgAdFiEE6Q8IiVReeMgqnedOryKDqnbirHsFAltLHWwACgkQryKDqnbi
rHtu5RAAgTc/1vr8JtYWEhv2SYk+WlH3uqzawt0tXZ8VDg3STS3rzgiAQpg0YMbO
yOPyhfX/9w73mePJ7zI9M6YH5npOBdzw4X49HuIm+7qBkTl3d1R5k4HQQ/ogRdWM
OgBKkrUOCf2FwFqR+98u3WOVz4PUcJQqg0rqEc6kcRzCqu9JDez1BUWIyjUIvTRi
6U2IPjXkBtR0rRsCMOWIFw23HpNPa4ZxnXcMgwt9XDNrAERBek7lHAfITPGXca/Y
iQDQWfKppIDuOtYi+2A3nRhrKgIxrDkWHvJYlui8D9OfuTO/p7S+17Qe3wd8BSRc
NuAvtrviq4VV6Bg/d92WJx1Fr3J/bc5s1+uMcF2HhM2QOR+z2xAcFJ4PXBcdOn2M
z1ofq700AErFMYwCP5YM487LZD+R0z2kb4cE1OWr0jPmXcxL76nivSSt1UjbIUx/
4mUrgPncxmzGpqOXRNhET2CqLBidifI2ZCGxsAnM2Rxe7l8oAxOkK2t0niRhs4Yo
jmG8mAgQBoEF69UA9GH002yO//Qk57qt8ADfZh0J4PeTk1TOC+T6AGmgO88RkzkQ
aZep+w2zK6C4bShMl2qyo71n/oc3ZRqB12WhqEr7IMcSOF6KJnND4juR+2FTzviH
ajExvuRbh8Z+CtWRoWgrMRdVF6X8B2O9Pt2CSvVeJBrkZk0AzwQ=
=FUb+
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to