- BuildReq uuencode, prelink and, on multilib systems, 32-bit glibc-devel.

- Drop obsolete attach-stop patch.
- Fix testcases in threaded-watchpoints2 and step-thread-exit patches.
- Re-enable attach-pie.exp, asm-source.exp and sigstep.exp tests.
This commit is contained in:
aoliva 2006-07-12 07:04:22 +00:00
parent 21721b8b21
commit fef19e0df6
3 changed files with 88 additions and 44 deletions

View File

@ -23,8 +23,8 @@
Index: gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.c 2006-07-07 02:26:54.000000000 -0300
@@ -0,0 +1,43 @@
+++ gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.c 2006-07-12 03:18:47.000000000 -0300
@@ -0,0 +1,50 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2005 Free Software Foundation, Inc.
@ -55,6 +55,8 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.c
+ printf("In thread_function, *x is %d\n", *x);
+} /* thread_function_end */
+
+volatile int repeat = 0;
+
+main()
+{
+ int ret;
@ -62,8 +64,13 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.c
+ int i = 3;
+
+ ret = pthread_create (&th, NULL, thread_function, &i);
+ do
+ {
+ repeat = 0;
+ sleep (3); /* sleep */
+ }
+ while (repeat);
+ pthread_join (th, NULL);
+ sleep (3); /* sleep */
+ return 0;
+}
+
@ -71,8 +78,8 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.c
Index: gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.exp 2006-07-07 02:26:54.000000000 -0300
@@ -0,0 +1,100 @@
+++ gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.exp 2006-07-12 03:22:30.000000000 -0300
@@ -0,0 +1,113 @@
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 2005 Free Software Foundation, Inc.
@ -138,8 +145,8 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.exp
+ send_gdb "next\n"
+ exp_continue
+ }
+ -re "Thread.*exited.*Stepped over thread exit.*Program received signal SIGSTOP.*$gdb_prompt $" {
+ pass $test
+ -re "Stepped over thread exit.*Program received signal SIGSTOP.*$gdb_prompt $" {
+ pass "$test"
+ }
+ -re "start_thread.*$gdb_prompt $" {
+ send_gdb "next\n"
@ -152,7 +159,17 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.exp
+runto_main
+gdb_breakpoint "$sleep_line"
+gdb_breakpoint "$end_line"
+gdb_test "continue" "Break.*thread_function.*" "continue to thread_function 2"
+set test "continue to thread_function 2"
+gdb_test_multiple "continue" "$test" {
+ -re "Break.*thread_function.*$gdb_prompt $" {
+ pass $test
+ }
+ -re "Break.*$sleep_line.*$gdb_prompt $" {
+ gdb_test "set repeat=1" "" ""
+ send_gdb "continue\n"
+ exp_continue
+ }
+}
+
+# Keep nexting until we cause the thread to exit. In this case, we
+# expect the breakpoint in the main thread to have already triggered
@ -164,8 +181,11 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.exp
+ send_gdb "next\n"
+ exp_continue
+ }
+ -re "Thread.*exited.*Stepped over thread exit.*Break.*$sleep_line.*" {
+ pass $test
+ -re "Stepped over thread exit.*Break.*$sleep_line.*$gdb_prompt $" {
+ pass "$test (breakpoint hit)"
+ }
+ -re "Stepped over thread exit.*$gdb_prompt $" {
+ pass "$test (breakpoint not hit)"
+ }
+ -re "start_thread.*$gdb_prompt $" {
+ send_gdb "next\n"
@ -175,8 +195,8 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/step-thread-exit.exp
+
Index: gdb-6.5/gdb/infrun.c
===================================================================
--- gdb-6.5.orig/gdb/infrun.c 2006-07-07 01:17:35.000000000 -0300
+++ gdb-6.5/gdb/infrun.c 2006-07-07 02:26:54.000000000 -0300
--- gdb-6.5.orig/gdb/infrun.c 2006-07-12 01:54:29.000000000 -0300
+++ gdb-6.5/gdb/infrun.c 2006-07-12 03:22:41.000000000 -0300
@@ -1088,6 +1088,7 @@ init_execution_control_state (struct exe
ecs->current_symtab = ecs->sal.symtab;
ecs->infwait_state = infwait_normal_state;
@ -202,7 +222,7 @@ Index: gdb-6.5/gdb/infrun.c
switch (ecs->ws.kind)
{
case TARGET_WAITKIND_LOADED:
@@ -2651,11 +2662,12 @@ process_event_stop_test:
@@ -2697,11 +2708,12 @@ process_event_stop_test:
static int
currently_stepping (struct execution_control_state *ecs)
{
@ -222,9 +242,9 @@ Index: gdb-6.5/gdb/infrun.c
/* Subroutine call with source code we should not step over. Do step
Index: gdb-6.5/gdb/linux-nat.c
===================================================================
--- gdb-6.5.orig/gdb/linux-nat.c 2006-07-07 02:24:51.000000000 -0300
+++ gdb-6.5/gdb/linux-nat.c 2006-07-07 02:29:12.000000000 -0300
@@ -1121,18 +1121,21 @@ linux_nat_detach (char *args, int from_t
--- gdb-6.5.orig/gdb/linux-nat.c 2006-07-12 01:54:29.000000000 -0300
+++ gdb-6.5/gdb/linux-nat.c 2006-07-12 03:22:42.000000000 -0300
@@ -1137,18 +1137,21 @@ linux_nat_detach (char *args, int from_t
static int
resume_callback (struct lwp_info *lp, void *data)
{
@ -249,7 +269,7 @@ Index: gdb-6.5/gdb/linux-nat.c
}
return 0;
@@ -1243,13 +1246,17 @@ linux_nat_resume (ptid_t ptid, int step,
@@ -1259,13 +1262,17 @@ linux_nat_resume (ptid_t ptid, int step,
if (resume_all)
iterate_over_lwps (resume_callback, NULL);
@ -274,7 +294,7 @@ Index: gdb-6.5/gdb/linux-nat.c
}
/* Issue kill to specified lwp. */
@@ -1840,7 +1847,7 @@ stop_and_resume_callback (struct lwp_inf
@@ -1863,7 +1870,7 @@ stop_and_resume_callback (struct lwp_inf
for (ptr = lwp_list; ptr; ptr = ptr->next)
if (lp == ptr)
{
@ -283,7 +303,7 @@ Index: gdb-6.5/gdb/linux-nat.c
resume_set_callback (lp, NULL);
}
}
@@ -1851,8 +1858,10 @@ static ptid_t
@@ -1874,8 +1881,10 @@ static ptid_t
linux_nat_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
{
struct lwp_info *lp = NULL;
@ -294,7 +314,7 @@ Index: gdb-6.5/gdb/linux-nat.c
pid_t pid = PIDGET (ptid);
sigset_t flush_mask;
@@ -1890,14 +1899,12 @@ retry:
@@ -1913,14 +1922,12 @@ retry:
gets the expected trap so we don't want to wait on any LWP.
This has ramifications when adjustment of the PC is required which can be
different after a breakpoint vs a step (e.g. x86). */
@ -312,7 +332,7 @@ Index: gdb-6.5/gdb/linux-nat.c
}
/* If any pid, check if there is a LWP with a wait status pending. */
@@ -2130,8 +2137,9 @@ retry:
@@ -2161,8 +2168,9 @@ retry:
}
/* Make sure we don't report a SIGSTOP that we sent
@ -324,7 +344,7 @@ Index: gdb-6.5/gdb/linux-nat.c
&& WIFSTOPPED (status) && WSTOPSIG (status) == SIGSTOP)
{
if (debug_linux_nat)
@@ -2165,6 +2173,20 @@ retry:
@@ -2196,6 +2204,20 @@ retry:
if (pid == -1)
{
@ -345,7 +365,7 @@ Index: gdb-6.5/gdb/linux-nat.c
/* Alternate between checking cloned and uncloned processes. */
options ^= __WCLONE;
@@ -2237,6 +2259,42 @@ retry:
@@ -2268,6 +2290,42 @@ retry:
fprintf_unfiltered (gdb_stdlog, "LLW: Candidate event %s in %s.\n",
status_to_str (status), target_pid_to_str (lp->ptid));
@ -388,7 +408,7 @@ Index: gdb-6.5/gdb/linux-nat.c
/* Now stop all other LWP's ... */
iterate_over_lwps (stop_callback, NULL);
@@ -2275,6 +2333,10 @@ retry:
@@ -2306,6 +2364,10 @@ retry:
else
store_waitstatus (ourstatus, status);
@ -401,8 +421,8 @@ Index: gdb-6.5/gdb/linux-nat.c
Index: gdb-6.5/gdb/target.h
===================================================================
--- gdb-6.5.orig/gdb/target.h 2006-05-05 17:08:45.000000000 -0300
+++ gdb-6.5/gdb/target.h 2006-07-07 02:26:54.000000000 -0300
--- gdb-6.5.orig/gdb/target.h 2006-07-12 01:54:29.000000000 -0300
+++ gdb-6.5/gdb/target.h 2006-07-12 03:22:40.000000000 -0300
@@ -136,6 +136,7 @@ enum target_waitkind
struct target_waitstatus
{

View File

@ -37,8 +37,8 @@
Index: gdb-6.5/gdb/config/i386/nm-linux64.h
===================================================================
--- gdb-6.5.orig/gdb/config/i386/nm-linux64.h 2006-07-11 05:20:42.000000000 -0300
+++ gdb-6.5/gdb/config/i386/nm-linux64.h 2006-07-11 05:20:44.000000000 -0300
--- gdb-6.5.orig/gdb/config/i386/nm-linux64.h 2006-07-12 01:54:10.000000000 -0300
+++ gdb-6.5/gdb/config/i386/nm-linux64.h 2006-07-12 01:54:29.000000000 -0300
@@ -35,22 +35,59 @@
/* Provide access to the i386 hardware debugging registers. */
@ -109,8 +109,8 @@ Index: gdb-6.5/gdb/config/i386/nm-linux64.h
#define FETCH_INFERIOR_REGISTERS
Index: gdb-6.5/gdb/config/i386/nm-linux.h
===================================================================
--- gdb-6.5.orig/gdb/config/i386/nm-linux.h 2006-07-11 05:20:42.000000000 -0300
+++ gdb-6.5/gdb/config/i386/nm-linux.h 2006-07-11 05:20:44.000000000 -0300
--- gdb-6.5.orig/gdb/config/i386/nm-linux.h 2006-07-12 01:54:10.000000000 -0300
+++ gdb-6.5/gdb/config/i386/nm-linux.h 2006-07-12 01:54:29.000000000 -0300
@@ -46,23 +46,61 @@ extern CORE_ADDR register_u_addr (CORE_A
/* Provide access to the i386 hardware debugging registers. */
@ -183,8 +183,8 @@ Index: gdb-6.5/gdb/config/i386/nm-linux.h
Index: gdb-6.5/gdb/i386-nat.c
===================================================================
--- gdb-6.5.orig/gdb/i386-nat.c 2006-07-11 05:20:42.000000000 -0300
+++ gdb-6.5/gdb/i386-nat.c 2006-07-11 05:20:44.000000000 -0300
--- gdb-6.5.orig/gdb/i386-nat.c 2006-07-12 01:54:10.000000000 -0300
+++ gdb-6.5/gdb/i386-nat.c 2006-07-12 01:54:29.000000000 -0300
@@ -21,6 +21,7 @@
#include "defs.h"
@ -196,7 +196,7 @@ Index: gdb-6.5/gdb/i386-nat.c
Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.c 2006-07-11 05:20:44.000000000 -0300
+++ gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.c 2006-07-12 01:54:29.000000000 -0300
@@ -0,0 +1,66 @@
+/* This testcase is part of GDB, the GNU debugger.
+
@ -258,7 +258,7 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.c
+ /* Don't run forever. Run just short of it :) */
+ while (*myp > 0)
+ {
+ (*myp) ++; /* Loop increment. */
+ (*myp) ++; usleep (1); /* Loop increment. */
+ }
+
+ pthread_exit(NULL);
@ -267,7 +267,7 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.c
Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.exp 2006-07-11 05:20:44.000000000 -0300
+++ gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.exp 2006-07-12 01:54:29.000000000 -0300
@@ -0,0 +1,133 @@
+# This testcase is part of GDB, the GNU debugger.
+
@ -404,8 +404,8 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.exp
+}
Index: gdb-6.5/gdb/i386-linux-nat.c
===================================================================
--- gdb-6.5.orig/gdb/i386-linux-nat.c 2006-07-11 05:20:42.000000000 -0300
+++ gdb-6.5/gdb/i386-linux-nat.c 2006-07-11 05:21:58.000000000 -0300
--- gdb-6.5.orig/gdb/i386-linux-nat.c 2006-07-12 01:54:28.000000000 -0300
+++ gdb-6.5/gdb/i386-linux-nat.c 2006-07-12 01:57:19.000000000 -0300
@@ -24,6 +24,7 @@
#include "inferior.h"
#include "gdbcore.h"
@ -625,8 +625,8 @@ Index: gdb-6.5/gdb/i386-linux-nat.c
}
Index: gdb-6.5/gdb/amd64-linux-nat.c
===================================================================
--- gdb-6.5.orig/gdb/amd64-linux-nat.c 2006-07-11 05:20:42.000000000 -0300
+++ gdb-6.5/gdb/amd64-linux-nat.c 2006-07-11 05:20:44.000000000 -0300
--- gdb-6.5.orig/gdb/amd64-linux-nat.c 2006-07-12 01:54:28.000000000 -0300
+++ gdb-6.5/gdb/amd64-linux-nat.c 2006-07-12 01:54:29.000000000 -0300
@@ -25,6 +25,7 @@
#include "inferior.h"
#include "gdbcore.h"
@ -844,3 +844,16 @@ Index: gdb-6.5/gdb/amd64-linux-nat.c
+
+ observer_attach_linux_new_thread (amd64_linux_new_thread);
}
Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads.c
===================================================================
--- gdb-6.5.orig/gdb/testsuite/gdb.threads/watchthreads.c 2006-07-12 01:55:19.000000000 -0300
+++ gdb-6.5/gdb/testsuite/gdb.threads/watchthreads.c 2006-07-12 01:56:51.000000000 -0300
@@ -58,7 +58,7 @@ void *thread_function(void *arg) {
/* Don't run forever. Run just short of it :) */
while (*myp > 0)
{
- (*myp) ++; /* Loop increment. */
+ (*myp) ++; usleep (1); /* Loop increment. */
}
pthread_exit(NULL);

View File

@ -11,7 +11,7 @@ Name: gdb
Version: 6.5
# The release always contains a leading reserved number, start it at 0.
Release: 1%{?dist}
Release: 2%{?dist}
License: GPL
Group: Development/Debuggers
@ -187,6 +187,7 @@ Patch165: gdb-6.3-xfree-20050922.patch
Patch166: gdb-6.3-ia64-sigtramp-fp-20050926.patch
# Support gdb attaching to a stopped process
# Appears to be obsolete, not applied. -aoliva
Patch168: gdb-6.3-attach-stop-20051011.patch
# Fix ia64 gdb problem with user-specified SIGILL handling
@ -216,7 +217,12 @@ Patch178: gdb-6.3-catch-debug-registers-error-20060527.patch
Patch179: gdb-6.3-ia32el-fix-waitpid-20060615.patch
BuildRequires: ncurses-devel glibc-devel gcc make gzip texinfo dejagnu gettext
BuildRequires: flex bison
BuildRequires: flex bison uuencode prelink
%ifarch %{multilib_64_archs} sparc ppc
# Ensure glibc{,-devel} is installed for both multilib arches
BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so
%endif
%ifarch ia64
BuildRequires: libunwind >= 0.96-3
@ -289,7 +295,6 @@ and printing their data.
%patch164 -p1
%patch165 -p1
%patch166 -p1
%patch168 -p1
%patch169 -p1
%patch170 -p1
%patch173 -p1
@ -374,7 +379,7 @@ ld -v
echo ====================TESTING=========================
cd gdb/testsuite
# Need to use a single --ignore option, second use overrides first.
make -k check RUNTESTFLAGS='--ignore bigcore.exp\ attach-pie.exp\ asm-source.exp\ sigstep.exp' || :
make -k check RUNTESTFLAGS='--ignore bigcore.exp' || :
for t in sum log; do
ln gdb.$t gdb-%{_target_platform}.$t || :
done
@ -458,9 +463,15 @@ fi
# don't include the files in include, they are part of binutils
%changelog
* Wed Jul 12 2006 Alexandre Oliva <aoliva@redhat.com> - 6.5-2
- BuildReq uuencode, prelink and, on multilib systems, 32-bit glibc-devel.
- Drop obsolete attach-stop patch.
- Fix testcases in threaded-watchpoints2 and step-thread-exit patches.
- Re-enable attach-pie.exp, asm-source.exp and sigstep.exp tests.
* Tue Jul 11 2006 Alexandre Oliva <aoliva@redhat.com> - 6.5-1
- Upgrade to GDB 6.5. Drop redundant patches, forward-port remaining
ones.
ones. Re-enable ada and objc testsuites.
* Thu Jun 15 2006 Alexandre Oliva <aoliva@redhat.com> - 6.3.0.0-1.132
- Require flex and bison at build time.