Package: gdb
Version: 7.4.1-3
Severity: normal
Tags: patch

Dear Maintainer,

I noticed that when debugging threaded programs on debian-kfreebsd-amd64, gdb 
would
sometimes hang after a LinuxThreads signal was supposed to be delivered.

I believe the attached patch improves things, though it is still not ideal
because it is not possible to direct gdb not to stop or print these two signals.


-- System Information:
Debian Release: 7.0
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental')
Architecture: kfreebsd-amd64 (x86_64)

Kernel: kFreeBSD 9.0-2-amd64
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages gdb depends on:
ii  libc0.1       2.13-37
ii  libexpat1     2.1.0-1
ii  libkvm0       9.0+ds1-4
ii  libncurses5   5.9-10
ii  libpython2.7  2.7.3~rc2-2.1
ii  libreadline6  6.2-8
ii  libtinfo5     5.9-10
ii  zlib1g        1:1.2.7.dfsg-13

gdb recommends no packages.

Versions of packages gdb suggests:
pn  gdb-doc  <none>

-- no debconf information
diff -Nru gdb-7.4.1/debian/changelog gdb-7.4.1/debian/changelog
--- gdb-7.4.1/debian/changelog	2012-10-05 03:59:20.000000000 -0500
+++ gdb-7.4.1/debian/changelog	2013-01-14 21:15:19.000000000 -0600
@@ -1,3 +1,10 @@
+gdb (7.4.1-3.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Fix gdb lockup when debugging pthread programs on kfreebsd-amd64
+
+ -- Jeff Epler <jepler@localhost>  Mon, 14 Jan 2013 21:14:59 -0600
+
 gdb (7.4.1-3) unstable; urgency=low
 
   * Fix typo: replace mutliarch by multiarch.
diff -Nru gdb-7.4.1/debian/patches/linuxthreads-kfreebsd.patch gdb-7.4.1/debian/patches/linuxthreads-kfreebsd.patch
--- gdb-7.4.1/debian/patches/linuxthreads-kfreebsd.patch	1969-12-31 18:00:00.000000000 -0600
+++ gdb-7.4.1/debian/patches/linuxthreads-kfreebsd.patch	2013-01-14 21:15:26.000000000 -0600
@@ -0,0 +1,18 @@
+--- a/gdb/common/signals.c
++++ b/gdb/common/signals.c
+@@ -600,6 +600,15 @@
+       return SIGINFO;
+ #endif
+ 
++#if defined(__GLIBC__) && defined(__FreeBSD_kernel__)
++    case TARGET_SIGNAL_LINUXTHREADS_RESTART:
++      return 32;
++    case TARGET_SIGNAL_LINUXTHREADS_CANCEL:
++      return 33;
++    case TARGET_SIGNAL_LINUXTHREADS_DEBUG:
++      return 34;
++#endif
++
+     default:
+ #if defined (REALTIME_LO)
+       retsig = 0;
diff -Nru gdb-7.4.1/debian/patches/series gdb-7.4.1/debian/patches/series
--- gdb-7.4.1/debian/patches/series	2012-09-19 17:01:13.000000000 -0500
+++ gdb-7.4.1/debian/patches/series	2013-01-14 21:05:40.000000000 -0600
@@ -12,3 +12,4 @@
 #renesas-sh-native-support.patch
 linuxthreads_signal_handling.patch
 m68k-thread-debugging.patch
+linuxthreads-kfreebsd.patch

Reply via email to