diff --git a/gdb-upstream.patch b/gdb-upstream.patch index 8a4d076..b643ad6 100644 --- a/gdb-upstream.patch +++ b/gdb-upstream.patch @@ -1023,3 +1023,157 @@ http://sourceware.org/ml/gdb-cvs/2010-04/msg00240.html + } +} +gdb_test "info sharedlibrary" "warning: Corrupted shared library list\r\n.*" "corrupted list" + + + +Re: [patch] Fix crash on /proc/PID/stat race +http://sourceware.org/ml/gdb-patches/2010-05/msg00685.html +http://sourceware.org/ml/gdb-cvs/2010-05/msg00244.html + +### src/gdb/ChangeLog 2010/05/28 18:00:41 1.11855 +### src/gdb/ChangeLog 2010/05/28 18:23:13 1.11856 +## -1,5 +1,10 @@ + 2010-05-28 Jan Kratochvil + ++ * linux-nat.c (linux_nat_core_of_thread_1): Fix crash on invalid ++ CONTENT. ++ ++2010-05-28 Jan Kratochvil ++ + * linux-nat.c (linux_nat_wait_1): Do not call + linux_nat_core_of_thread_1 on TARGET_WAITKIND_EXITED or + TARGET_WAITKIND_SIGNALLED. +--- src/gdb/linux-nat.c 2010/05/28 18:00:46 1.169 ++++ src/gdb/linux-nat.c 2010/05/28 18:23:15 1.170 +@@ -5509,15 +5509,21 @@ + make_cleanup (xfree, content); + + p = strchr (content, '('); +- p = strchr (p, ')') + 2; /* skip ")" and a whitespace. */ ++ ++ /* Skip ")". */ ++ if (p != NULL) ++ p = strchr (p, ')'); ++ if (p != NULL) ++ p++; + + /* If the first field after program name has index 0, then core number is + the field with index 36. There's no constant for that anywhere. */ +- p = strtok_r (p, " ", &ts); +- for (i = 0; i != 36; ++i) ++ if (p != NULL) ++ p = strtok_r (p, " ", &ts); ++ for (i = 0; p != NULL && i != 36; ++i) + p = strtok_r (NULL, " ", &ts); + +- if (sscanf (p, "%d", &core) == 0) ++ if (p == NULL || sscanf (p, "%d", &core) == 0) + core = -1; + + do_cleanups (back_to); +### src/gdb/gdbserver/ChangeLog 2010/05/26 22:40:22 1.386 +### src/gdb/gdbserver/ChangeLog 2010/05/28 18:23:15 1.387 +## -1,3 +1,8 @@ ++2010-05-28 Jan Kratochvil ++ ++ * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT. ++ New comment. ++ + 2010-05-26 Ozkan Sezer + + * gdbreplay.c (remote_open): Check error return from socket() call by +--- src/gdb/gdbserver/linux-low.c 2010/05/03 04:02:20 1.148 ++++ src/gdb/gdbserver/linux-low.c 2010/05/28 18:23:15 1.149 +@@ -4346,13 +4346,21 @@ + } + + p = strchr (content, '('); +- p = strchr (p, ')') + 2; /* skip ")" and a whitespace. */ + +- p = strtok_r (p, " ", &ts); +- for (i = 0; i != 36; ++i) ++ /* Skip ")". */ ++ if (p != NULL) ++ p = strchr (p, ')'); ++ if (p != NULL) ++ p++; ++ ++ /* If the first field after program name has index 0, then core number is ++ the field with index 36. There's no constant for that anywhere. */ ++ if (p != NULL) ++ p = strtok_r (p, " ", &ts); ++ for (i = 0; p != NULL && i != 36; ++i) + p = strtok_r (NULL, " ", &ts); + +- if (sscanf (p, "%d", &core) == 0) ++ if (p == NULL || sscanf (p, "%d", &core) == 0) + core = -1; + + free (content); + + + +Re: [patch] testsuite: watchthreads-reorder: Linux kernel compat. +http://sourceware.org/ml/gdb-patches/2010-05/msg00696.html +http://sourceware.org/ml/gdb-cvs/2010-05/msg00255.html + +### src/gdb/testsuite/ChangeLog 2010/05/28 23:47:40 1.2293 +### src/gdb/testsuite/ChangeLog 2010/05/31 03:31:16 1.2294 +## -1,3 +1,11 @@ ++2010-05-31 Jan Kratochvil ++ ++ Accept the new Linux kernel "t (tracing stop)" string. ++ * gdb.threads/watchthreads-reorder.c (thread1_func, thread2_func): ++ Update comment. ++ (state_wait) : New. ++ (main): Update the state_wait expect string. ++ + 2010-05-28 Pedro Alves + + * limits.c, limits.exp: Delete files. +--- src/gdb/testsuite/gdb.threads/watchthreads-reorder.c 2010/01/20 21:09:30 1.3 ++++ src/gdb/testsuite/gdb.threads/watchthreads-reorder.c 2010/05/31 03:31:17 1.4 +@@ -99,7 +99,7 @@ + + rwatch_store = thread1_rwatch; + +- /* Be sure the "T (tracing stop)" test can proceed for both threads. */ ++ /* Be sure the "t (tracing stop)" test can proceed for both threads. */ + timed_mutex_lock (&terminate_mutex); + i = pthread_mutex_unlock (&terminate_mutex); + assert (i == 0); +@@ -125,7 +125,7 @@ + + rwatch_store = thread2_rwatch; + +- /* Be sure the "T (tracing stop)" test can proceed for both threads. */ ++ /* Be sure the "t (tracing stop)" test can proceed for both threads. */ + timed_mutex_lock (&terminate_mutex); + i = pthread_mutex_unlock (&terminate_mutex); + assert (i == 0); +@@ -211,6 +211,13 @@ + do + { + state = proc_string (filename, "State:\t"); ++ ++ /* torvalds/linux-2.6.git 464763cf1c6df632dccc8f2f4c7e50163154a2c0 ++ has changed "T (tracing stop)" to "t (tracing stop)". Make the GDB ++ testcase backward compatible with older Linux kernels. */ ++ if (strcmp (state, "T (tracing stop)") == 0) ++ state = "t (tracing stop)"; ++ + if (strcmp (state, wanted) == 0) + { + free (filename); +@@ -336,9 +343,9 @@ + { + /* s390x-unknown-linux-gnu will fail with "R (running)". */ + +- state_wait (thread1_tid, "T (tracing stop)"); ++ state_wait (thread1_tid, "t (tracing stop)"); + +- state_wait (thread2_tid, "T (tracing stop)"); ++ state_wait (thread2_tid, "t (tracing stop)"); + } + + cleanup (); diff --git a/gdb.spec b/gdb.spec index cfb04c7..efde5e6 100644 --- a/gdb.spec +++ b/gdb.spec @@ -36,7 +36,7 @@ Version: 7.1 # The release always contains a leading reserved number, start it at 1. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing. -Release: 23%{?_with_upstream:.upstream}%{dist} +Release: 24%{?_with_upstream:.upstream}%{dist} License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and GFDL and BSD and Public Domain Group: Development/Debuggers @@ -1117,6 +1117,10 @@ fi %endif %changelog +* Tue Jun 1 2010 Jan Kratochvil - 7.1-24.fc13 +- Fix crash on /proc/PID/stat race during inferior exit (BZ 596751). +- testsuite: gdb.threads/watchthreads-reorder.exp kernel-2.6.33 compat. fix. + * Sun May 30 2010 Jan Kratochvil - 7.1-23.fc13 - Fix and support DW_OP_*piece (Tom Tromey, BZ 589467). - Fix follow-exec for C++ programs (bugreported by Martin Stransky).