]> git.pld-linux.org Git - packages/gdb.git/blame - gdb-rhel5-compat.patch
- release 4
[packages/gdb.git] / gdb-rhel5-compat.patch
CommitLineData
6ed6bacf
AM
1gdb/linux-nat.c:
2- Workaround RHEL-5 kernels for detaching SIGSTOPped processes (BZ 498595).
3
4Index: gdb-7.2.50.20110328/gdb/elfread.c
5===================================================================
6--- gdb-7.2.50.20110328.orig/gdb/elfread.c 2011-03-28 18:46:16.000000000 +0200
7+++ gdb-7.2.50.20110328/gdb/elfread.c 2011-03-28 18:48:19.000000000 +0200
8@@ -1083,7 +1083,7 @@ elf_gnu_ifunc_resolver_return_stop (stru
9 #define BUILD_ID_VERBOSE_NONE 0
10 #define BUILD_ID_VERBOSE_FILENAMES 1
11 #define BUILD_ID_VERBOSE_BINARY_PARSE 2
12-static int build_id_verbose = BUILD_ID_VERBOSE_FILENAMES;
13+static int build_id_verbose = BUILD_ID_VERBOSE_NONE;
14 static void
15 show_build_id_verbose (struct ui_file *file, int from_tty,
16 struct cmd_list_element *c, const char *value)
17@@ -2173,8 +2173,10 @@ find_separate_debug_file_by_buildid (str
18 if (build_id_name != NULL
19 && filename_cmp (build_id_name, objfile->name) == 0)
20 {
21+#if 0 /* RHEL-5 backward behavior compatibility. */
22 warning (_("\"%s\": separate debug info file has no debug info"),
23 build_id_name);
24+#endif
25 xfree (build_id_name);
26 }
27 else if (build_id_name != NULL)
28Index: gdb-7.2.50.20110328/gdb/corelow.c
29===================================================================
30--- gdb-7.2.50.20110328.orig/gdb/corelow.c 2011-03-28 18:46:16.000000000 +0200
31+++ gdb-7.2.50.20110328/gdb/corelow.c 2011-03-28 18:47:56.000000000 +0200
32@@ -282,7 +282,7 @@ add_to_thread_list (bfd *abfd, asection
33 inferior_ptid = ptid; /* Yes, make it current. */
34 }
35
36-static int build_id_core_loads = 1;
37+static int build_id_core_loads = 0;
38
39 static void
40 build_id_locate_exec (int from_tty)
41Index: gdb-7.2.50.20110328/gdb/linux-nat.c
42===================================================================
43--- gdb-7.2.50.20110328.orig/gdb/linux-nat.c 2011-03-28 18:46:16.000000000 +0200
44+++ gdb-7.2.50.20110328/gdb/linux-nat.c 2011-03-28 18:47:56.000000000 +0200
45@@ -1774,8 +1774,22 @@ get_pending_status (struct lwp_info *lp,
46 target_signal_to_string (signo));
47 }
48
49- if (*status == 0 && GET_PID (lp->ptid) == pid_was_stopped)
50- *status = W_STOPCODE (SIGSTOP);
51+ /* Workaround RHEL-5 kernel which has unreliable PTRACE_DETACH, SIGSTOP (that
52+ many TIDs are left unstopped). See RH Bug 496732. */
53+ if (GET_PID (lp->ptid) == pid_was_stopped)
54+ {
55+ int err;
56+
57+ errno = 0;
58+ err = kill_lwp (GET_LWP (lp->ptid), SIGSTOP);
59+ if (debug_linux_nat)
60+ {
61+ fprintf_unfiltered (gdb_stdlog,
62+ "SC: lwp kill %d %s\n",
63+ err,
64+ errno ? safe_strerror (errno) : "ERRNO-OK");
65+ }
66+ }
67
68 return 0;
69 }
This page took 0.060944 seconds and 4 git commands to generate.