rpms/gdb/devel gdb-6.3-step-thread-exit-20050211.patch, 1.2, 1.3 gdb-6.3-threaded-watchpoints2-20050225.patch, 1.3, 1.4 gdb.spec, 1.189, 1.190

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Jul 12 07:04:35 UTC 2006


Author: aoliva

Update of /cvs/dist/rpms/gdb/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv22788

Modified Files:
	gdb-6.3-step-thread-exit-20050211.patch 
	gdb-6.3-threaded-watchpoints2-20050225.patch gdb.spec 
Log Message:
* Wed Jul 12 2006 Alexandre Oliva <aoliva at 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.


gdb-6.3-step-thread-exit-20050211.patch:
 infrun.c                                   |   22 ++++-
 linux-nat.c                                |   98 ++++++++++++++++++++-----
 target.h                                   |    1 
 testsuite/gdb.threads/step-thread-exit.c   |   50 ++++++++++++
 testsuite/gdb.threads/step-thread-exit.exp |  113 +++++++++++++++++++++++++++++
 5 files changed, 261 insertions(+), 23 deletions(-)

Index: gdb-6.3-step-thread-exit-20050211.patch
===================================================================
RCS file: /cvs/dist/rpms/gdb/devel/gdb-6.3-step-thread-exit-20050211.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gdb-6.3-step-thread-exit-20050211.patch	11 Jul 2006 06:33:02 -0000	1.2
+++ gdb-6.3-step-thread-exit-20050211.patch	12 Jul 2006 07:04:21 -0000	1.3
@@ -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 @@
 +  printf("In thread_function, *x is %d\n", *x);
 +} /* thread_function_end */
 +
++volatile int repeat = 0;
++
 +main()
 +{
 +  int ret;
@@ -62,8 +64,13 @@
 +  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.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 @@
 +     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 @@
 +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 @@
 +     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/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 @@
    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 @@
  /* 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 @@
      }
  
    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 @@
  }
  
  /* 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 @@
  	    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 @@
    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 @@
    }
  
    /* 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 @@
  	      && 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 @@
  	  /* 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 @@
    /* 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/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
    {

gdb-6.3-threaded-watchpoints2-20050225.patch:
 amd64-linux-nat.c                       |  155 +++++++++++++++++++++++++++++---
 config/i386/nm-linux.h                  |   54 +++++++++--
 config/i386/nm-linux64.h                |   53 +++++++++-
 i386-linux-nat.c                        |  155 +++++++++++++++++++++++++++++---
 i386-nat.c                              |    1 
 testsuite/gdb.threads/watchthreads.c    |    2 
 testsuite/gdb.threads/watchthreads2.c   |   66 +++++++++++++
 testsuite/gdb.threads/watchthreads2.exp |  133 +++++++++++++++++++++++++++
 8 files changed, 574 insertions(+), 45 deletions(-)

Index: gdb-6.3-threaded-watchpoints2-20050225.patch
===================================================================
RCS file: /cvs/dist/rpms/gdb/devel/gdb-6.3-threaded-watchpoints2-20050225.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- gdb-6.3-threaded-watchpoints2-20050225.patch	11 Jul 2006 08:25:57 -0000	1.3
+++ gdb-6.3-threaded-watchpoints2-20050225.patch	12 Jul 2006 07:04:22 -0000	1.4
@@ -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 @@
  #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/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/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 @@
 +    /* 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.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/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/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 @@
 +
 +  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);


Index: gdb.spec
===================================================================
RCS file: /cvs/dist/rpms/gdb/devel/gdb.spec,v
retrieving revision 1.189
retrieving revision 1.190
diff -u -r1.189 -r1.190
--- gdb.spec	11 Jul 2006 08:06:56 -0000	1.189
+++ gdb.spec	12 Jul 2006 07:04:22 -0000	1.190
@@ -11,7 +11,7 @@
 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 @@
 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 @@
 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 @@
 %patch164 -p1
 %patch165 -p1
 %patch166 -p1
-%patch168 -p1
 %patch169 -p1
 %patch170 -p1
 %patch173 -p1
@@ -374,7 +379,7 @@
 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 @@
 # don't include the files in include, they are part of binutils
 
 %changelog
+* Wed Jul 12 2006 Alexandre Oliva <aoliva at 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 at 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 at redhat.com> - 6.3.0.0-1.132
 - Require flex and bison at build time.




More information about the fedora-cvs-commits mailing list