[Pkg-gdb-logs] [gdb] 01/01: Fix FTBFS on Hurd
Samuel Bronson
naesten-guest at moszumanska.debian.org
Wed Jun 25 03:07:21 UTC 2014
This is an automated email from the git hooks/post-receive script.
naesten-guest pushed a commit to branch master
in repository gdb.
commit a942f02a4c92ca8405534200655200d441b9ee41
Author: Gabriele Giacone <1o5g4r8o at gmail.com>
Date: Tue Jun 24 21:59:51 2014 +0200
Fix FTBFS on Hurd
Please consider attached debdiff fixing FTBFS on Hurd.
It applies four patches cherry-picked from upstream as pointed out by
Thomas Schwinge at
https://sourceware.org/ml/gdb-patches/2014-05/msg00056.html
Closes: #752574
---
debian/changelog | 11 ++
.../patches/hurd-adapt-to-changed-MIG-output.patch | 22 +++
...hurd-adjust-to-startup-with-shell-changes.patch | 69 +++++++++
.../hurd-make-MIG-output-parsing-more-robust.patch | 23 +++
.../hurd-new-RPC-reply-stub-functions.patch | 165 +++++++++++++++++++++
debian/patches/series | 4 +
6 files changed, 294 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 0ca07aa..f8b6349 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+gdb (7.7.1-3) UNRELEASED; urgency=medium
+
+ * Fix FTBFS on Hurd.
+ + Cherry-pick from upstream:
+ hurd-new-RPC-reply-stub-functions.patch
+ hurd-adapt-to-changed-MIG-output.patch
+ hurd-adjust-to-startup-with-shell-changes.patch
+ hurd-make-MIG-output-parsing-more-robust.patch
+
+ -- Gabriele Giacone <1o5g4r8o at gmail.com> Tue, 24 Jun 2014 16:41:28 +0000
+
gdb (7.7.1-2) unstable; urgency=medium
[ Samuel Bronson ]
diff --git a/debian/patches/hurd-adapt-to-changed-MIG-output.patch b/debian/patches/hurd-adapt-to-changed-MIG-output.patch
new file mode 100644
index 0000000..8b249fd
--- /dev/null
+++ b/debian/patches/hurd-adapt-to-changed-MIG-output.patch
@@ -0,0 +1,22 @@
+Description: Fix FTBFS on Hurd.
+ Adapt to changed MIG output.
+ Based on a patch by David Michael <fedora.dm0 at gmail.com>.
+Author: Thomas Schwinge <thomas at codesourcery.com>
+Origin: upstream, https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=bae8023e39868ab2065ff05be61e151b3c082492
+
+diff --git a/gdb/reply_mig_hack.awk b/gdb/reply_mig_hack.awk
+index 075ab02..6d27685 100644
+--- a/gdb/reply_mig_hack.awk
++++ b/gdb/reply_mig_hack.awk
+@@ -78,9 +78,9 @@ parse_phase == 4 {
+ print; next;
+ }
+
+-parse_phase == 5 && /^[ \t]*(auto|static) const mach_msg_type_t/ {
++parse_phase == 5 && /^[ \t]*(auto |static |)const mach_msg_type_t/ {
+ # The type check structure for an argument.
+- arg_check_name[num_checks] = $4;
++ arg_check_name[num_checks] = $(NF - 2);
+ num_checks++;
+ print; next;
+ }
diff --git a/debian/patches/hurd-adjust-to-startup-with-shell-changes.patch b/debian/patches/hurd-adjust-to-startup-with-shell-changes.patch
new file mode 100644
index 0000000..5340360
--- /dev/null
+++ b/debian/patches/hurd-adjust-to-startup-with-shell-changes.patch
@@ -0,0 +1,69 @@
+Description: Fix FTBFS on Hurd.
+ Adjust to startup-with-shell changes.
+Author: Thomas Schwinge <thomas at codesourcery.com>
+Origin: upstream, https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=c82f56d9d760a9b4034eeaac44f2f0fa5779ff69
+
+diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
+index a3ed0e0..b66a7f0 100644
+--- a/gdb/gnu-nat.c
++++ b/gdb/gnu-nat.c
+@@ -210,9 +210,9 @@ struct inf
+ unsigned int no_wait:1;
+
+ /* When starting a new inferior, we don't try to validate threads until all
+- the proper execs have been done. This is a count of how many execs we
++ the proper execs have been done, which this flag states we still
+ expect to happen. */
+- unsigned pending_execs;
++ unsigned int pending_execs:1;
+
+ /* Fields describing global state. */
+
+@@ -1568,26 +1568,14 @@ rewait:
+ while execing. */
+ {
+ w->suppress = 1;
+- inf_debug (inf, "pending_execs = %d, ignoring minor event",
+- inf->pending_execs);
++ inf_debug (inf, "pending_execs, ignoring minor event");
+ }
+ else if (kind == TARGET_WAITKIND_STOPPED
+ && w->status.value.sig == GDB_SIGNAL_TRAP)
+ /* Ah hah! A SIGTRAP from the inferior while starting up probably
+ means we've succesfully completed an exec! */
+ {
+- if (--inf->pending_execs == 0)
+- /* We're done! */
+- {
+-#if 0 /* do we need this? */
+- prune_threads (1); /* Get rid of the old shell
+- threads. */
+- renumber_threads (0); /* Give our threads reasonable
+- names. */
+-#endif
+- }
+- inf_debug (inf, "pending exec completed, pending_execs => %d",
+- inf->pending_execs);
++ inf_debug (inf, "one pending exec completed");
+ }
+ else if (kind == TARGET_WAITKIND_STOPPED)
+ /* It's possible that this signal is because of a crashed process
+@@ -2146,7 +2134,7 @@ gnu_create_inferior (struct target_ops *ops,
+
+ push_target (ops);
+
+- inf->pending_execs = 2;
++ inf->pending_execs = 1;
+ inf->nomsg = 1;
+ inf->traced = 1;
+
+@@ -2158,7 +2146,8 @@ gnu_create_inferior (struct target_ops *ops,
+ thread_change_ptid (inferior_ptid,
+ ptid_build (inf->pid, inf_pick_first_thread (), 0));
+
+- startup_inferior (inf->pending_execs);
++ startup_inferior (START_INFERIOR_TRAPS_EXPECTED);
++ inf->pending_execs = 0;
+
+ inf_validate_procinfo (inf);
+ inf_update_signal_thread (inf);
diff --git a/debian/patches/hurd-make-MIG-output-parsing-more-robust.patch b/debian/patches/hurd-make-MIG-output-parsing-more-robust.patch
new file mode 100644
index 0000000..ed151a7
--- /dev/null
+++ b/debian/patches/hurd-make-MIG-output-parsing-more-robust.patch
@@ -0,0 +1,23 @@
+Description: Fix FTBFS on Hurd.
+ Make MIG output parsing more robust.
+ Based on a patch by David Michael <fedora.dm0 at gmail.com>.
+Author: Thomas Schwinge <thomas at codesourcery.com>
+Origin: upstream, https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=d47642c93dda6344af12458e4e26587f3353fb44
+
+diff --git a/gdb/reply_mig_hack.awk b/gdb/reply_mig_hack.awk
+index 6d27685..15bfdfb 100644
+--- a/gdb/reply_mig_hack.awk
++++ b/gdb/reply_mig_hack.awk
+@@ -92,6 +92,12 @@ parse_phase == 5 && /^[ \t]*mig_external kern_return_t/ {
+ }
+
+ parse_phase == 5 && /^#if[ \t]TypeCheck/ {
++ # Keep going if we have not yet collected the type check structures.
++ if (num_checks == 0)
++ {
++ print; next;
++ }
++
+ # The first args type checking statement; we need to insert our chunk of
+ # code that bypasses all the type checks if this is an error return, after
+ # which we're done until we get to the next function. Handily, the size
diff --git a/debian/patches/hurd-new-RPC-reply-stub-functions.patch b/debian/patches/hurd-new-RPC-reply-stub-functions.patch
new file mode 100644
index 0000000..8442d28
--- /dev/null
+++ b/debian/patches/hurd-new-RPC-reply-stub-functions.patch
@@ -0,0 +1,165 @@
+Description: Fix FTBFS on hurd.
+ New RPC reply stub functions.
+ Based on a patch by David Michael <fedora.dm0 at gmail.com>.
+Author: Thomas Schwinge <thomas at codesourcery.com>
+Origin: upstream, https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=3398af6aa352b0611bc9d66aed72080a876e42d4
+
+diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
+index efafc35..a3ed0e0 100644
+--- a/gdb/gnu-nat.c
++++ b/gdb/gnu-nat.c
+@@ -1794,43 +1794,23 @@ do_mach_notify_dead_name (mach_port_t notify, mach_port_t dead_port)
+ }
+
+
+-static error_t
+-ill_rpc (char *fun)
+-{
+- warning (_("illegal rpc: %s"), fun);
+- return 0;
+-}
+-
+-error_t
+-do_mach_notify_no_senders (mach_port_t notify, mach_port_mscount_t count)
+-{
+- return ill_rpc ("do_mach_notify_no_senders");
+-}
+-
+-error_t
+-do_mach_notify_port_deleted (mach_port_t notify, mach_port_t name)
+-{
+- return ill_rpc ("do_mach_notify_port_deleted");
+-}
+-
+-error_t
+-do_mach_notify_msg_accepted (mach_port_t notify, mach_port_t name)
+-{
+- return ill_rpc ("do_mach_notify_msg_accepted");
+-}
+-
+-error_t
+-do_mach_notify_port_destroyed (mach_port_t notify, mach_port_t name)
+-{
+- return ill_rpc ("do_mach_notify_port_destroyed");
+-}
+-
+-error_t
+-do_mach_notify_send_once (mach_port_t notify)
+-{
+- return ill_rpc ("do_mach_notify_send_once");
+-}
++#define ILL_RPC(fun, ...) \
++ kern_return_t fun (__VA_ARGS__) \
++ { \
++ warning (_("illegal rpc: %s"), #fun); \
++ return 0; \
++ }
+
++ILL_RPC (do_mach_notify_no_senders,
++ mach_port_t notify, mach_port_mscount_t count)
++ILL_RPC (do_mach_notify_port_deleted,
++ mach_port_t notify, mach_port_t name)
++ILL_RPC (do_mach_notify_msg_accepted,
++ mach_port_t notify, mach_port_t name)
++ILL_RPC (do_mach_notify_port_destroyed,
++ mach_port_t notify, mach_port_t name)
++ILL_RPC (do_mach_notify_send_once,
++ mach_port_t notify)
+
+ /* Process_reply server routines. We only use process_wait_reply. */
+
+@@ -1887,19 +1867,66 @@ S_proc_wait_reply (mach_port_t reply, error_t err,
+ return 0;
+ }
+
+-error_t
+-S_proc_setmsgport_reply (mach_port_t reply, error_t err,
+- mach_port_t old_msg_port)
+-{
+- return ill_rpc ("S_proc_setmsgport_reply");
+-}
+-
+-error_t
+-S_proc_getmsgport_reply (mach_port_t reply, error_t err, mach_port_t msg_port)
+-{
+- return ill_rpc ("S_proc_getmsgport_reply");
+-}
+-
++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)
++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)
++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)
++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,
++ data_t threadwaits, mach_msg_type_number_t threadwaitsCnt)
++ILL_RPC (S_proc_getprocargs_reply,
++ mach_port_t reply_port, kern_return_t return_code,
++ data_t procargs, mach_msg_type_number_t procargsCnt)
++ILL_RPC (S_proc_getprocenv_reply,
++ mach_port_t reply_port, kern_return_t return_code,
++ data_t procenv, mach_msg_type_number_t procenvCnt)
++ILL_RPC (S_proc_getloginid_reply,
++ mach_port_t reply_port, kern_return_t return_code, pid_t login_id)
++ILL_RPC (S_proc_getloginpids_reply,
++ mach_port_t reply_port, kern_return_t return_code,
++ pidarray_t pids, mach_msg_type_number_t pidsCnt)
++ILL_RPC (S_proc_getlogin_reply,
++ mach_port_t reply_port, kern_return_t return_code, string_t logname)
++ILL_RPC (S_proc_getsid_reply,
++ mach_port_t reply_port, kern_return_t return_code, pid_t sid)
++ILL_RPC (S_proc_getsessionpgids_reply,
++ mach_port_t reply_port, kern_return_t return_code,
++ pidarray_t pgidset, mach_msg_type_number_t pgidsetCnt)
++ILL_RPC (S_proc_getsessionpids_reply,
++ mach_port_t reply_port, kern_return_t return_code,
++ pidarray_t pidset, mach_msg_type_number_t pidsetCnt)
++ILL_RPC (S_proc_getsidport_reply,
++ mach_port_t reply_port, kern_return_t return_code,
++ mach_port_t sessport)
++ILL_RPC (S_proc_getpgrp_reply,
++ mach_port_t reply_port, kern_return_t return_code, pid_t pgrp)
++ILL_RPC (S_proc_getpgrppids_reply,
++ mach_port_t reply_port, kern_return_t return_code,
++ pidarray_t pidset, mach_msg_type_number_t pidsetCnt)
++ILL_RPC (S_proc_get_tty_reply,
++ mach_port_t reply_port, kern_return_t return_code, mach_port_t tty)
++ILL_RPC (S_proc_getnports_reply,
++ mach_port_t reply_port, kern_return_t return_code,
++ mach_msg_type_number_t nports)
++ILL_RPC (S_proc_is_important_reply,
++ mach_port_t reply_port, kern_return_t return_code,
++ boolean_t essential)
++ILL_RPC (S_proc_get_code_reply,
++ mach_port_t reply_port, kern_return_t return_code,
++ vm_address_t start_code, vm_address_t end_code)
+
+ /* Msg_reply server routines. We only use msg_sig_post_untraced_reply. */
+
+@@ -1933,12 +1960,8 @@ S_msg_sig_post_untraced_reply (mach_port_t reply, error_t err)
+ return 0;
+ }
+
+-error_t
+-S_msg_sig_post_reply (mach_port_t reply, error_t err)
+-{
+- return ill_rpc ("S_msg_sig_post_reply");
+-}
+-
++ILL_RPC (S_msg_sig_post_reply,
++ mach_port_t reply, error_t err)
+
+ /* Returns the number of messages queued for the receive right PORT. */
+ static mach_port_msgcount_t
diff --git a/debian/patches/series b/debian/patches/series
index 2782b55..b72b255 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,7 @@ gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
python-config.patch
ppc64le.diff
gdb-glibc-vdso-workaround.patch
+hurd-new-RPC-reply-stub-functions.patch
+hurd-adapt-to-changed-MIG-output.patch
+hurd-adjust-to-startup-with-shell-changes.patch
+hurd-make-MIG-output-parsing-more-robust.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gdb/gdb.git
More information about the Pkg-gdb-logs
mailing list