File: linuxthreads_signal_handling.patch

package info (click to toggle)
gdb 7.7.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 188,040 kB
  • ctags: 285,193
  • sloc: ansic: 1,961,235; asm: 319,930; exp: 109,483; makefile: 53,373; sh: 22,635; yacc: 10,891; cpp: 10,169; xml: 6,135; perl: 4,960; python: 3,452; ada: 1,998; pascal: 1,436; lex: 622; lisp: 536; sed: 228; f90: 164; awk: 140; objc: 134; java: 73; fortran: 43
file content (45 lines) | stat: -rw-r--r-- 1,845 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Description: Temporary support for LinuxThreads signal handling on GNU/kFreeBSD

Author: Robert Millan <rmh@debian.org>
Bug-Debian: http://bugs.debian.org/550361
Bug-Debian: http://bugs.debian.org/669043
Bug-Debian: http://bugs.debian.org/698200
Origin: vendor, http://bugs.debian.org/669043

Index: gdb/gdb/common/signals.c
===================================================================
--- gdb.orig/gdb/common/signals.c	2014-05-04 22:13:56.000000000 -0400
+++ gdb/gdb/common/signals.c	2014-05-04 22:13:56.000000000 -0400
@@ -343,6 +343,15 @@
     return GDB_SIGNAL_INFO;
 #endif
 
+#if defined(__GLIBC__) && defined(__FreeBSD_kernel__)
+  if (hostsig == 32)
+    return TARGET_SIGNAL_LINUXTHREADS_RESTART;
+  if (hostsig == 33)
+    return TARGET_SIGNAL_LINUXTHREADS_CANCEL;
+  if (hostsig == 34)
+    return TARGET_SIGNAL_LINUXTHREADS_DEBUG;
+#endif
+
 #if defined (REALTIME_LO)
   if (hostsig >= REALTIME_LO && hostsig < REALTIME_HI)
     {
Index: gdb/include/gdb/signals.def
===================================================================
--- gdb.orig/include/gdb/signals.def	2014-05-04 22:13:56.000000000 -0400
+++ gdb/include/gdb/signals.def	2014-05-04 22:13:56.000000000 -0400
@@ -194,7 +194,11 @@
 SET (GDB_EXC_SOFTWARE, 149, "EXC_SOFTWARE", "Software generated exception")
 SET (GDB_EXC_BREAKPOINT, 150, "EXC_BREAKPOINT", "Breakpoint")
 
+SET (TARGET_SIGNAL_LINUXTHREADS_RESTART, 151, "32", "LinuxThreads restart signal")
+SET (TARGET_SIGNAL_LINUXTHREADS_CANCEL, 152, "33", "LinuxThreads cancel signal")
+SET (TARGET_SIGNAL_LINUXTHREADS_DEBUG, 153, "34", "LinuxThreads debug signal")
+
 /* If you are adding a new signal, add it just above this comment.  */
 
 /* Last and unused enum value, for sizing arrays, etc.  */
-SET (GDB_SIGNAL_LAST, 151, NULL, "GDB_SIGNAL_LAST")
+SET (GDB_SIGNAL_LAST, 154, NULL, "GDB_SIGNAL_LAST")