Mark testsuite/gdb.hp/gdb.threads-hp/ as obsolete.

This commit is contained in:
Andrew Cagney 2002-01-19 03:48:21 +00:00
parent 0a65a603d3
commit b4ceaee622
9 changed files with 651 additions and 636 deletions

View File

@ -1,3 +1,8 @@
2002-01-18 Andrew Cagney <ac131313@redhat.com>
* NEWS: Document that testsuite/gdb.hp/gdb.threads-hp/ is
obsolete.
2002-01-18 Andrew Cagney <ac131313@redhat.com> 2002-01-18 Andrew Cagney <ac131313@redhat.com>
* infptrace.c: Remove ATTRIBUTE_UNUSED. Update copyright. * infptrace.c: Remove ATTRIBUTE_UNUSED. Update copyright.

View File

@ -41,6 +41,7 @@ AMD 29000 embedded, using EBMON a29k-none-none
AMD 29000 embedded with COFF a29k-none-coff AMD 29000 embedded with COFF a29k-none-coff
AMD 29000 embedded with a.out a29k-none-aout AMD 29000 embedded with a.out a29k-none-aout
testsuite/gdb.hp/gdb.threads-hp/ directory
* REMOVED configurations and files * REMOVED configurations and files

View File

@ -1,3 +1,12 @@
2002-01-18 Andrew Cagney <ac131313@redhat.com>
* gdb.hp/gdb.threads-hp/usrthfork.exp: Mark as obsolete.
* gdb.hp/gdb.threads-hp/usrthcore.exp: Ditto.
* gdb.hp/gdb.threads-hp/usrthbasic.exp: Ditto.
* gdb.hp/gdb.threads-hp/usrthfork.c: Ditto.
* gdb.hp/gdb.threads-hp/usrthbasic.c: Ditto.
* gdb.hp/gdb.threads-hp/usrthcore.c: Ditto.
2002-01-17 Jim Blandy <jimb@redhat.com> 2002-01-17 Jim Blandy <jimb@redhat.com>
* gdb.asm/asm-source.exp (info symbol): Take another shot at * gdb.asm/asm-source.exp (info symbol): Take another shot at

View File

@ -1,171 +1,171 @@
#include <stdio.h> /* OBSOLETE #include <stdio.h> */
/* OBSOLETE */
/* #include "config.h" */ /* OBSOLETE /* #include "config.h" */ */
#define HAVE_PTHREAD_H /* OBSOLETE #define HAVE_PTHREAD_H */
#define __hpux__ /* OBSOLETE #define __hpux__ */
#define __osf__ /* OBSOLETE #define __osf__ */
/* OBSOLETE */
#ifndef HAVE_PTHREAD_H /* OBSOLETE #ifndef HAVE_PTHREAD_H */
/* OBSOLETE */
/* Don't even try to compile. In fact, cause a syntax error that we can /* OBSOLETE /* Don't even try to compile. In fact, cause a syntax error that we can */
look for as a compiler error message and know that we have no pthread /* OBSOLETE look for as a compiler error message and know that we have no pthread */
support. In that case we can just suppress the test completely. */ /* OBSOLETE support. In that case we can just suppress the test completely. */ */
/* OBSOLETE */
#error "no posix threads support" /* OBSOLETE #error "no posix threads support" */
/* OBSOLETE */
#else /* OBSOLETE #else */
/* OBSOLETE */
/* OK. We have the right header. If we try to compile this and fail, then /* OBSOLETE /* OK. We have the right header. If we try to compile this and fail, then */
there is something wrong and the user should know about it so the testsuite /* OBSOLETE there is something wrong and the user should know about it so the testsuite */
should issue an ERROR result.. */ /* OBSOLETE should issue an ERROR result.. */ */
/* OBSOLETE */
#ifdef __linux__ /* OBSOLETE #ifdef __linux__ */
#define _MIT_POSIX_THREADS 1 /* Linux (or at least RedHat 4.0) needs this */ /* OBSOLETE #define _MIT_POSIX_THREADS 1 /* Linux (or at least RedHat 4.0) needs this */ */
#endif /* OBSOLETE #endif */
/* OBSOLETE */
#include <pthread.h> /* OBSOLETE #include <pthread.h> */
/* OBSOLETE */
/* Under OSF 2.0 & 3.0 and HPUX 10, the second arg of pthread_create /* OBSOLETE /* Under OSF 2.0 & 3.0 and HPUX 10, the second arg of pthread_create */
is prototyped to be just a "pthread_attr_t", while under Solaris it /* OBSOLETE is prototyped to be just a "pthread_attr_t", while under Solaris it */
is a "pthread_attr_t *". Arg! */ /* OBSOLETE is a "pthread_attr_t *". Arg! */ */
/* OBSOLETE */
#if defined (__osf__) || defined (__hpux__) /* OBSOLETE #if defined (__osf__) || defined (__hpux__) */
#define PTHREAD_CREATE_ARG2(arg) arg /* OBSOLETE #define PTHREAD_CREATE_ARG2(arg) arg */
#define PTHREAD_CREATE_NULL_ARG2 null_attr /* OBSOLETE #define PTHREAD_CREATE_NULL_ARG2 null_attr */
static pthread_attr_t null_attr; /* OBSOLETE static pthread_attr_t null_attr; */
#else /* OBSOLETE #else */
#define PTHREAD_CREATE_ARG2(arg) &arg /* OBSOLETE #define PTHREAD_CREATE_ARG2(arg) &arg */
#define PTHREAD_CREATE_NULL_ARG2 NULL /* OBSOLETE #define PTHREAD_CREATE_NULL_ARG2 NULL */
#endif /* OBSOLETE #endif */
/* OBSOLETE */
static int verbose = 0; /* OBSOLETE static int verbose = 0; */
/* OBSOLETE */
static void /* OBSOLETE static void */
common_routine (arg) /* OBSOLETE common_routine (arg) */
int arg; /* OBSOLETE int arg; */
{ /* OBSOLETE { */
static int from_thread1; /* OBSOLETE static int from_thread1; */
static int from_thread2; /* OBSOLETE static int from_thread2; */
static int from_main; /* OBSOLETE static int from_main; */
static int hits; /* OBSOLETE static int hits; */
static int full_coverage; /* OBSOLETE static int full_coverage; */
/* OBSOLETE */
if (verbose) printf("common_routine (%d)\n", arg); /* OBSOLETE if (verbose) printf("common_routine (%d)\n", arg); */
hits++; /* OBSOLETE hits++; */
switch (arg) /* OBSOLETE switch (arg) */
{ /* OBSOLETE { */
case 0: /* OBSOLETE case 0: */
from_main++; /* OBSOLETE from_main++; */
break; /* OBSOLETE break; */
case 1: /* OBSOLETE case 1: */
from_thread1++; /* OBSOLETE from_thread1++; */
break; /* OBSOLETE break; */
case 2: /* OBSOLETE case 2: */
from_thread2++; /* OBSOLETE from_thread2++; */
break; /* OBSOLETE break; */
} /* OBSOLETE } */
if (from_main && from_thread1 && from_thread2) /* OBSOLETE if (from_main && from_thread1 && from_thread2) */
full_coverage = 1; /* OBSOLETE full_coverage = 1; */
} /* OBSOLETE } */
/* OBSOLETE */
static void * /* OBSOLETE static void * */
thread1 (void *arg) /* OBSOLETE thread1 (void *arg) */
{ /* OBSOLETE { */
int i; /* OBSOLETE int i; */
int z = 0; /* OBSOLETE int z = 0; */
/* OBSOLETE */
if (verbose) printf ("thread1 (%0x) ; pid = %d\n", arg, getpid ()); /* OBSOLETE if (verbose) printf ("thread1 (%0x) ; pid = %d\n", arg, getpid ()); */
for (i=1; i <= 10000000; i++) /* OBSOLETE for (i=1; i <= 10000000; i++) */
{ /* OBSOLETE { */
if (verbose) printf("thread1 %d\n", pthread_self ()); /* OBSOLETE if (verbose) printf("thread1 %d\n", pthread_self ()); */
z += i; /* OBSOLETE z += i; */
common_routine (1); /* OBSOLETE common_routine (1); */
sleep(1); /* OBSOLETE sleep(1); */
} /* OBSOLETE } */
} /* OBSOLETE } */
/* OBSOLETE */
static void * /* OBSOLETE static void * */
thread2 (void * arg) /* OBSOLETE thread2 (void * arg) */
{ /* OBSOLETE { */
int i; /* OBSOLETE int i; */
int k = 0; /* OBSOLETE int k = 0; */
/* OBSOLETE */
if (verbose) printf ("thread2 (%0x) ; pid = %d\n", arg, getpid ()); /* OBSOLETE if (verbose) printf ("thread2 (%0x) ; pid = %d\n", arg, getpid ()); */
for (i=1; i <= 10000000; i++) /* OBSOLETE for (i=1; i <= 10000000; i++) */
{ /* OBSOLETE { */
if (verbose) printf("thread2 %d\n", pthread_self ()); /* OBSOLETE if (verbose) printf("thread2 %d\n", pthread_self ()); */
k += i; /* OBSOLETE k += i; */
common_routine (2); /* OBSOLETE common_routine (2); */
sleep(1); /* OBSOLETE sleep(1); */
} /* OBSOLETE } */
sleep(100); /* OBSOLETE sleep(100); */
} /* OBSOLETE } */
/* OBSOLETE */
int /* OBSOLETE int */
foo (a, b, c) /* OBSOLETE foo (a, b, c) */
int a, b, c; /* OBSOLETE int a, b, c; */
{ /* OBSOLETE { */
int d, e, f; /* OBSOLETE int d, e, f; */
/* OBSOLETE */
if (verbose) printf("a=%d\n", a); /* OBSOLETE if (verbose) printf("a=%d\n", a); */
} /* OBSOLETE } */
/* OBSOLETE */
main(argc, argv) /* OBSOLETE main(argc, argv) */
int argc; /* OBSOLETE int argc; */
char **argv; /* OBSOLETE char **argv; */
{ /* OBSOLETE { */
pthread_t tid1, tid2; /* OBSOLETE pthread_t tid1, tid2; */
int j; /* OBSOLETE int j; */
int t = 0; /* OBSOLETE int t = 0; */
void (*xxx) (); /* OBSOLETE void (*xxx) (); */
pthread_attr_t attr; /* OBSOLETE pthread_attr_t attr; */
/* OBSOLETE */
if (verbose) printf ("pid = %d\n", getpid()); /* OBSOLETE if (verbose) printf ("pid = %d\n", getpid()); */
/* OBSOLETE */
foo (1, 2, 3); /* OBSOLETE foo (1, 2, 3); */
/* OBSOLETE */
#ifndef __osf__ /* OBSOLETE #ifndef __osf__ */
if (pthread_attr_init (&attr)) /* OBSOLETE if (pthread_attr_init (&attr)) */
{ /* OBSOLETE { */
perror ("pthread_attr_init 1"); /* OBSOLETE perror ("pthread_attr_init 1"); */
exit (1); /* OBSOLETE exit (1); */
} /* OBSOLETE } */
#endif /* OBSOLETE #endif */
/* OBSOLETE */
#ifdef PTHREAD_SCOPE_SYSTEM /* OBSOLETE #ifdef PTHREAD_SCOPE_SYSTEM */
if (pthread_attr_setscope (&attr, PTHREAD_SCOPE_SYSTEM)) /* OBSOLETE if (pthread_attr_setscope (&attr, PTHREAD_SCOPE_SYSTEM)) */
{ /* OBSOLETE { */
perror ("pthread_attr_setscope 1"); /* OBSOLETE perror ("pthread_attr_setscope 1"); */
exit (1); /* OBSOLETE exit (1); */
} /* OBSOLETE } */
#endif /* OBSOLETE #endif */
/* OBSOLETE */
if (pthread_create (&tid1, pthread_attr_default, thread1, (void *) 0xfeedface)) /* OBSOLETE if (pthread_create (&tid1, pthread_attr_default, thread1, (void *) 0xfeedface)) */
{ /* OBSOLETE { */
perror ("pthread_create 1"); /* OBSOLETE perror ("pthread_create 1"); */
exit (1); /* OBSOLETE exit (1); */
} /* OBSOLETE } */
if (verbose) printf ("Made thread %d\n", tid1); /* OBSOLETE if (verbose) printf ("Made thread %d\n", tid1); */
sleep (1); /* OBSOLETE sleep (1); */
/* OBSOLETE */
if (pthread_create (&tid2, null_attr, thread2, (void *) 0xdeadbeef)) /* OBSOLETE if (pthread_create (&tid2, null_attr, thread2, (void *) 0xdeadbeef)) */
{ /* OBSOLETE { */
perror ("pthread_create 2"); /* OBSOLETE perror ("pthread_create 2"); */
exit (1); /* OBSOLETE exit (1); */
} /* OBSOLETE } */
if (verbose) printf("Made thread %d\n", tid2); /* OBSOLETE if (verbose) printf("Made thread %d\n", tid2); */
/* OBSOLETE */
sleep (1); /* OBSOLETE sleep (1); */
/* OBSOLETE */
for (j = 1; j <= 10000000; j++) /* OBSOLETE for (j = 1; j <= 10000000; j++) */
{ /* OBSOLETE { */
if (verbose) printf("top %d\n", pthread_self ()); /* OBSOLETE if (verbose) printf("top %d\n", pthread_self ()); */
common_routine (0); /* OBSOLETE common_routine (0); */
sleep(1); /* OBSOLETE sleep(1); */
t += j; /* OBSOLETE t += j; */
} /* OBSOLETE } */
/* OBSOLETE */
exit(0); /* OBSOLETE exit(0); */
} /* OBSOLETE } */
/* OBSOLETE */
#endif /* ifndef HAVE_PTHREAD_H */ /* OBSOLETE #endif /* ifndef HAVE_PTHREAD_H */ */

View File

@ -1,110 +1,110 @@
# usrthbasic.exp -- Expect script to test gdb with user threads # OBSOLETE # usrthbasic.exp -- Expect script to test gdb with user threads
# Copyright (C) 1992 Free Software Foundation, Inc. # OBSOLETE # Copyright (C) 1992 Free Software Foundation, Inc.
# OBSOLETE
# This program is free software; you can redistribute it and/or modify # OBSOLETE # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # OBSOLETE # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or # OBSOLETE # the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. # OBSOLETE # (at your option) any later version.
# # OBSOLETE #
# This program is distributed in the hope that it will be useful, # OBSOLETE # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # OBSOLETE # GNU General Public License for more details.
# # OBSOLETE #
# You should have received a copy of the GNU General Public License # OBSOLETE # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # OBSOLETE # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
# OBSOLETE
# Please email any bugs, comments, and/or additions to this file to: # OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
# bug-gdb@prep.ai.mit.edu # OBSOLETE # bug-gdb@prep.ai.mit.edu
# OBSOLETE
# use this to debug: # OBSOLETE # use this to debug:
# # OBSOLETE #
#log_user 1 # OBSOLETE #log_user 1
# OBSOLETE
verbose "HP's thread tests are broken beyond repair right now." verbose "HP's thread tests are broken beyond repair right now."
return 0 return 0
# OBSOLETE
if $tracelevel { # OBSOLETE if $tracelevel {
strace $tracelevel # OBSOLETE strace $tracelevel
} # OBSOLETE }
# OBSOLETE
if { [skip_hp_tests] } { continue } # OBSOLETE if { [skip_hp_tests] } { continue }
# OBSOLETE
if { ![istarget "hppa*-*-hpux*"] || [istarget "hppa64-*-*"] } { # OBSOLETE if { ![istarget "hppa*-*-hpux*"] || [istarget "hppa64-*-*"] } {
verbose "HPUX thread test ignored for non-hppa or PA64 targets." # OBSOLETE verbose "HPUX thread test ignored for non-hppa or PA64 targets."
return 0 # OBSOLETE return 0
} # OBSOLETE }
# OBSOLETE
set testfile usrthbasic # OBSOLETE set testfile usrthbasic
set srcfile ${srcdir}/${subdir}/${testfile}.c # OBSOLETE set srcfile ${srcdir}/${subdir}/${testfile}.c
set binfile ${srcdir}/${subdir}/${testfile} # OBSOLETE set binfile ${srcdir}/${subdir}/${testfile}
# OBSOLETE
# To build the executable we need to link against the thread library. # OBSOLETE # To build the executable we need to link against the thread library.
# # OBSOLETE #
# /opt/ansic/bin/cc -Ae +DAportable -g -o usrthbasic -lcma usrthbasic.c # OBSOLETE # /opt/ansic/bin/cc -Ae +DAportable -g -o usrthbasic -lcma usrthbasic.c
# # OBSOLETE #
## we have trouble building it on 11.0, so we use the prebuilt # OBSOLETE ## we have trouble building it on 11.0, so we use the prebuilt
## executable instead. # OBSOLETE ## executable instead.
## # OBSOLETE ##
##if { [gdb_compile "${srcdir}/${subdir}/${testfile}.c" "${binfile}" executable {debug additional_flags=-Ae ldflags=-lcma}] != "" } { # OBSOLETE ##if { [gdb_compile "${srcdir}/${subdir}/${testfile}.c" "${binfile}" executable {debug additional_flags=-Ae ldflags=-lcma}] != "" } {
## gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." # OBSOLETE ## gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
##} # OBSOLETE ##}
# OBSOLETE
# We don't really seem to need longer waits. # OBSOLETE # We don't really seem to need longer waits.
# # OBSOLETE #
##set oldtimeout $timeout # OBSOLETE ##set oldtimeout $timeout
##set timeout [expr "$timeout + 0"] # OBSOLETE ##set timeout [expr "$timeout + 0"]
##set oldverbose $verbose # OBSOLETE ##set oldverbose $verbose
##set verbose 40 # OBSOLETE ##set verbose 40
# OBSOLETE
#========================= # OBSOLETE #=========================
# # OBSOLETE #
# Test looking at threads. # OBSOLETE # Test looking at threads.
# # OBSOLETE #
gdb_exit # OBSOLETE gdb_exit
gdb_start # OBSOLETE gdb_start
gdb_reinitialize_dir $srcdir/$subdir # OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile} # OBSOLETE gdb_load ${binfile}
# OBSOLETE
gdb_test "b main" ".*Breakpoint 1.*" "b main" # OBSOLETE gdb_test "b main" ".*Breakpoint 1.*" "b main"
gdb_test "run" "Breakpoint 1, main.*:119.*" "run to main" # OBSOLETE gdb_test "run" "Breakpoint 1, main.*:119.*" "run to main"
gdb_test "b thread1" ".*Breakpoint 2.*" "b thread1" # OBSOLETE gdb_test "b thread1" ".*Breakpoint 2.*" "b thread1"
gdb_test "info threads" "\\* 1 system thread.*:119\[^(\]*" \ # OBSOLETE gdb_test "info threads" "\\* 1 system thread.*:119\[^(\]*" \
"info threads at main" # OBSOLETE "info threads at main"
gdb_test "c" "Breakpoint 2, thread1.*" "continue to thread1" # OBSOLETE gdb_test "c" "Breakpoint 2, thread1.*" "continue to thread1"
gdb_test "info threads" \ # OBSOLETE gdb_test "info threads" \
"\\* 3 system thread.*thread1.*libcma.1.*libcma.1\[^(\]*" \ # OBSOLETE "\\* 3 system thread.*thread1.*libcma.1.*libcma.1\[^(\]*" \
"info threads at main" # OBSOLETE "info threads at main"
gdb_test "b 165" "Breakpoint 3.*165.*" "break at main counter" # OBSOLETE gdb_test "b 165" "Breakpoint 3.*165.*" "break at main counter"
gdb_test "c" "Breakpoint 3, main.*" "continue to main counter" # OBSOLETE gdb_test "c" "Breakpoint 3, main.*" "continue to main counter"
gdb_test "info threads" " 4 system thread.*\\* 1 system thread.*main.*" \ # OBSOLETE gdb_test "info threads" " 4 system thread.*\\* 1 system thread.*main.*" \
"info threads at main counter" # OBSOLETE "info threads at main counter"
gdb_test "b 97" "Breakpoint 4.*97.*" "break at thread2 counter" # OBSOLETE gdb_test "b 97" "Breakpoint 4.*97.*" "break at thread2 counter"
gdb_test "b 81" "Breakpoint 5.*81.*" "break at thread1 counter" # OBSOLETE gdb_test "b 81" "Breakpoint 5.*81.*" "break at thread1 counter"
gdb_test "bt" "#0 main.* at \[^(\]*" "backtrace at main counter" # OBSOLETE gdb_test "bt" "#0 main.* at \[^(\]*" "backtrace at main counter"
# OBSOLETE
# After switching to thread 4, the cma scheduler should schedule it next # OBSOLETE # After switching to thread 4, the cma scheduler should schedule it next
# and we should hit its breakpoint in thread2. # OBSOLETE # and we should hit its breakpoint in thread2.
gdb_test "thread 4" ".Switching to thread 4.*cma__dispatch.*" \ # OBSOLETE gdb_test "thread 4" ".Switching to thread 4.*cma__dispatch.*" \
"switch to thread 4" # OBSOLETE "switch to thread 4"
gdb_test "bt" "#0 .*thread2.*" "backtrace at thread 4" # OBSOLETE gdb_test "bt" "#0 .*thread2.*" "backtrace at thread 4"
sleep 1 # OBSOLETE sleep 1
gdb_test "c" ".*Breakpoint 4, thread2.*" "continue and get to thread 4" # OBSOLETE gdb_test "c" ".*Breakpoint 4, thread2.*" "continue and get to thread 4"
# OBSOLETE
# After switching to thread 1, the cma scheduler should schedule it next # OBSOLETE # After switching to thread 1, the cma scheduler should schedule it next
# and we should hit its breakpoint (in main). # OBSOLETE # and we should hit its breakpoint (in main).
gdb_test "thread 1" ".*Switching to thread 1.*cma__dispatch.*" \ # OBSOLETE gdb_test "thread 1" ".*Switching to thread 1.*cma__dispatch.*" \
"switch to thread 1" # OBSOLETE "switch to thread 1"
sleep 1 # OBSOLETE sleep 1
gdb_test "c" ".*Breakpoint 3, main.*usrthbasic.c:165.*" \ # OBSOLETE gdb_test "c" ".*Breakpoint 3, main.*usrthbasic.c:165.*" \
"continue and get to thread 1" # OBSOLETE "continue and get to thread 1"
# OBSOLETE
# Done! # OBSOLETE # Done!
# # OBSOLETE #
gdb_exit # OBSOLETE gdb_exit
# OBSOLETE
##set timeout $oldtimeout # OBSOLETE ##set timeout $oldtimeout
##set verbose $oldverbose # OBSOLETE ##set verbose $oldverbose
# OBSOLETE
return 0 # OBSOLETE return 0

View File

@ -1,177 +1,177 @@
#include <stdio.h> /* OBSOLETE #include <stdio.h> */
/* OBSOLETE */
/* #include "config.h" */ /* OBSOLETE /* #include "config.h" */ */
#define HAVE_PTHREAD_H /* OBSOLETE #define HAVE_PTHREAD_H */
#define __hpux__ /* OBSOLETE #define __hpux__ */
#define __osf__ /* OBSOLETE #define __osf__ */
/* OBSOLETE */
#ifndef HAVE_PTHREAD_H /* OBSOLETE #ifndef HAVE_PTHREAD_H */
/* OBSOLETE */
/* Don't even try to compile. In fact, cause a syntax error that we can /* OBSOLETE /* Don't even try to compile. In fact, cause a syntax error that we can */
look for as a compiler error message and know that we have no pthread /* OBSOLETE look for as a compiler error message and know that we have no pthread */
support. In that case we can just suppress the test completely. */ /* OBSOLETE support. In that case we can just suppress the test completely. */ */
/* OBSOLETE */
#error "no posix threads support" /* OBSOLETE #error "no posix threads support" */
/* OBSOLETE */
#else /* OBSOLETE #else */
/* OBSOLETE */
/* OK. We have the right header. If we try to compile this and fail, then /* OBSOLETE /* OK. We have the right header. If we try to compile this and fail, then */
there is something wrong and the user should know about it so the testsuite /* OBSOLETE there is something wrong and the user should know about it so the testsuite */
should issue an ERROR result.. */ /* OBSOLETE should issue an ERROR result.. */ */
/* OBSOLETE */
#ifdef __linux__ /* OBSOLETE #ifdef __linux__ */
#define _MIT_POSIX_THREADS 1 /* Linux (or at least RedHat 4.0) needs this */ /* OBSOLETE #define _MIT_POSIX_THREADS 1 /* Linux (or at least RedHat 4.0) needs this */ */
#endif /* OBSOLETE #endif */
/* OBSOLETE */
#include <pthread.h> /* OBSOLETE #include <pthread.h> */
/* OBSOLETE */
/* Under OSF 2.0 & 3.0 and HPUX 10, the second arg of pthread_create /* OBSOLETE /* Under OSF 2.0 & 3.0 and HPUX 10, the second arg of pthread_create */
is prototyped to be just a "pthread_attr_t", while under Solaris it /* OBSOLETE is prototyped to be just a "pthread_attr_t", while under Solaris it */
is a "pthread_attr_t *". Arg! */ /* OBSOLETE is a "pthread_attr_t *". Arg! */ */
/* OBSOLETE */
#if defined (__osf__) || defined (__hpux__) /* OBSOLETE #if defined (__osf__) || defined (__hpux__) */
#define PTHREAD_CREATE_ARG2(arg) arg /* OBSOLETE #define PTHREAD_CREATE_ARG2(arg) arg */
#define PTHREAD_CREATE_NULL_ARG2 null_attr /* OBSOLETE #define PTHREAD_CREATE_NULL_ARG2 null_attr */
static pthread_attr_t null_attr; /* OBSOLETE static pthread_attr_t null_attr; */
#else /* OBSOLETE #else */
#define PTHREAD_CREATE_ARG2(arg) &arg /* OBSOLETE #define PTHREAD_CREATE_ARG2(arg) &arg */
#define PTHREAD_CREATE_NULL_ARG2 NULL /* OBSOLETE #define PTHREAD_CREATE_NULL_ARG2 NULL */
#endif /* OBSOLETE #endif */
/* OBSOLETE */
static int verbose = 0; /* OBSOLETE static int verbose = 0; */
/* OBSOLETE */
static void /* OBSOLETE static void */
common_routine (arg) /* OBSOLETE common_routine (arg) */
int arg; /* OBSOLETE int arg; */
{ /* OBSOLETE { */
static int from_thread1; /* OBSOLETE static int from_thread1; */
static int from_thread2; /* OBSOLETE static int from_thread2; */
static int from_main; /* OBSOLETE static int from_main; */
static int hits; /* OBSOLETE static int hits; */
static int full_coverage; /* OBSOLETE static int full_coverage; */
/* OBSOLETE */
if (verbose) printf("common_routine (%d)\n", arg); /* OBSOLETE if (verbose) printf("common_routine (%d)\n", arg); */
hits++; /* OBSOLETE hits++; */
switch (arg) /* OBSOLETE switch (arg) */
{ /* OBSOLETE { */
case 0: /* OBSOLETE case 0: */
from_main++; /* OBSOLETE from_main++; */
break; /* OBSOLETE break; */
case 1: /* OBSOLETE case 1: */
from_thread1++; /* OBSOLETE from_thread1++; */
break; /* OBSOLETE break; */
case 2: /* OBSOLETE case 2: */
from_thread2++; /* OBSOLETE from_thread2++; */
break; /* OBSOLETE break; */
} /* OBSOLETE } */
if (from_main && from_thread1 && from_thread2) /* OBSOLETE if (from_main && from_thread1 && from_thread2) */
full_coverage = 1; /* OBSOLETE full_coverage = 1; */
} /* OBSOLETE } */
/* OBSOLETE */
static void * /* OBSOLETE static void * */
thread1 (void *arg) /* OBSOLETE thread1 (void *arg) */
{ /* OBSOLETE { */
int i; /* OBSOLETE int i; */
int z = 0; /* OBSOLETE int z = 0; */
/* OBSOLETE */
if (verbose) printf ("thread1 (%0x) ; pid = %d\n", arg, getpid ()); /* OBSOLETE if (verbose) printf ("thread1 (%0x) ; pid = %d\n", arg, getpid ()); */
for (i=1; i <= 10000000; i++) /* OBSOLETE for (i=1; i <= 10000000; i++) */
{ /* OBSOLETE { */
if (verbose) printf("thread1 %d\n", pthread_self ()); /* OBSOLETE if (verbose) printf("thread1 %d\n", pthread_self ()); */
z += i; /* OBSOLETE z += i; */
common_routine (1); /* OBSOLETE common_routine (1); */
sleep(1); /* OBSOLETE sleep(1); */
} /* OBSOLETE } */
} /* OBSOLETE } */
/* OBSOLETE */
static void * /* OBSOLETE static void * */
thread2 (void * arg) /* OBSOLETE thread2 (void * arg) */
{ /* OBSOLETE { */
int i; /* OBSOLETE int i; */
int k = 0; /* OBSOLETE int k = 0; */
/* OBSOLETE */
if (verbose) printf ("thread2 (%0x) ; pid = %d\n", arg, getpid ()); /* OBSOLETE if (verbose) printf ("thread2 (%0x) ; pid = %d\n", arg, getpid ()); */
for (i=1; i <= 10000000; i++) /* OBSOLETE for (i=1; i <= 10000000; i++) */
{ /* OBSOLETE { */
if (verbose) printf("thread2 %d\n", pthread_self ()); /* OBSOLETE if (verbose) printf("thread2 %d\n", pthread_self ()); */
k += i; /* OBSOLETE k += i; */
common_routine (2); /* OBSOLETE common_routine (2); */
sleep(1); /* OBSOLETE sleep(1); */
} /* OBSOLETE } */
sleep(100); /* OBSOLETE sleep(100); */
} /* OBSOLETE } */
/* OBSOLETE */
int /* OBSOLETE int */
foo (a, b, c) /* OBSOLETE foo (a, b, c) */
int a, b, c; /* OBSOLETE int a, b, c; */
{ /* OBSOLETE { */
int d, e, f; /* OBSOLETE int d, e, f; */
/* OBSOLETE */
if (verbose) printf("a=%d\n", a); /* OBSOLETE if (verbose) printf("a=%d\n", a); */
} /* OBSOLETE } */
/* OBSOLETE */
main(argc, argv) /* OBSOLETE main(argc, argv) */
int argc; /* OBSOLETE int argc; */
char **argv; /* OBSOLETE char **argv; */
{ /* OBSOLETE { */
pthread_t tid1, tid2; /* OBSOLETE pthread_t tid1, tid2; */
int j; /* OBSOLETE int j; */
int t = 0; /* OBSOLETE int t = 0; */
void (*xxx) (); /* OBSOLETE void (*xxx) (); */
pthread_attr_t attr; /* OBSOLETE pthread_attr_t attr; */
/* OBSOLETE */
if (verbose) printf ("pid = %d\n", getpid()); /* OBSOLETE if (verbose) printf ("pid = %d\n", getpid()); */
/* OBSOLETE */
foo (1, 2, 3); /* OBSOLETE foo (1, 2, 3); */
/* OBSOLETE */
#ifndef __osf__ /* OBSOLETE #ifndef __osf__ */
if (pthread_attr_init (&attr)) /* OBSOLETE if (pthread_attr_init (&attr)) */
{ /* OBSOLETE { */
perror ("pthread_attr_init 1"); /* OBSOLETE perror ("pthread_attr_init 1"); */
exit (1); /* OBSOLETE exit (1); */
} /* OBSOLETE } */
#endif /* OBSOLETE #endif */
/* OBSOLETE */
#ifdef PTHREAD_SCOPE_SYSTEM /* OBSOLETE #ifdef PTHREAD_SCOPE_SYSTEM */
if (pthread_attr_setscope (&attr, PTHREAD_SCOPE_SYSTEM)) /* OBSOLETE if (pthread_attr_setscope (&attr, PTHREAD_SCOPE_SYSTEM)) */
{ /* OBSOLETE { */
perror ("pthread_attr_setscope 1"); /* OBSOLETE perror ("pthread_attr_setscope 1"); */
exit (1); /* OBSOLETE exit (1); */
} /* OBSOLETE } */
#endif /* OBSOLETE #endif */
/* OBSOLETE */
if (pthread_create (&tid1, pthread_attr_default, thread1, (void *) 0xfeedface)) /* OBSOLETE if (pthread_create (&tid1, pthread_attr_default, thread1, (void *) 0xfeedface)) */
{ /* OBSOLETE { */
perror ("pthread_create 1"); /* OBSOLETE perror ("pthread_create 1"); */
exit (1); /* OBSOLETE exit (1); */
} /* OBSOLETE } */
if (verbose) printf ("Made thread %d\n", tid1); /* OBSOLETE if (verbose) printf ("Made thread %d\n", tid1); */
sleep (1); /* OBSOLETE sleep (1); */
/* OBSOLETE */
if (pthread_create (&tid2, null_attr, thread2, (void *) 0xdeadbeef)) /* OBSOLETE if (pthread_create (&tid2, null_attr, thread2, (void *) 0xdeadbeef)) */
{ /* OBSOLETE { */
perror ("pthread_create 2"); /* OBSOLETE perror ("pthread_create 2"); */
exit (1); /* OBSOLETE exit (1); */
} /* OBSOLETE } */
if (verbose) printf("Made thread %d\n", tid2); /* OBSOLETE if (verbose) printf("Made thread %d\n", tid2); */
/* OBSOLETE */
sleep (1); /* OBSOLETE sleep (1); */
/* OBSOLETE */
for (j = 1; j <= 10000000; j++) /* OBSOLETE for (j = 1; j <= 10000000; j++) */
{ /* OBSOLETE { */
if (verbose) printf("top %d\n", pthread_self ()); /* OBSOLETE if (verbose) printf("top %d\n", pthread_self ()); */
common_routine (0); /* OBSOLETE common_routine (0); */
sleep(1); /* OBSOLETE sleep(1); */
t += j; /* OBSOLETE t += j; */
if (j > 3) /* OBSOLETE if (j > 3) */
{ /* OBSOLETE { */
int* int_p; /* OBSOLETE int* int_p; */
int_p = 0; /* OBSOLETE int_p = 0; */
*int_p = 1; /* OBSOLETE *int_p = 1; */
} /* OBSOLETE } */
} /* OBSOLETE } */
/* OBSOLETE */
exit(0); /* OBSOLETE exit(0); */
} /* OBSOLETE } */
/* OBSOLETE */
#endif /* ifndef HAVE_PTHREAD_H */ /* OBSOLETE #endif /* ifndef HAVE_PTHREAD_H */ */

View File

@ -1,92 +1,92 @@
# usrthcore.exp -- Expect script to test gdb with user threads # OBSOLETE # usrthcore.exp -- Expect script to test gdb with user threads
# Copyright (C) 1992 Free Software Foundation, Inc. # OBSOLETE # Copyright (C) 1992 Free Software Foundation, Inc.
# OBSOLETE
# This program is free software; you can redistribute it and/or modify # OBSOLETE # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # OBSOLETE # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or # OBSOLETE # the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. # OBSOLETE # (at your option) any later version.
# # OBSOLETE #
# This program is distributed in the hope that it will be useful, # OBSOLETE # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # OBSOLETE # GNU General Public License for more details.
# # OBSOLETE #
# You should have received a copy of the GNU General Public License # OBSOLETE # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # OBSOLETE # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
# OBSOLETE
# Please email any bugs, comments, and/or additions to this file to: # OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
# bug-gdb@prep.ai.mit.edu # OBSOLETE # bug-gdb@prep.ai.mit.edu
# OBSOLETE
# use this to debug: # OBSOLETE # use this to debug:
# # OBSOLETE #
#log_user 1 # OBSOLETE #log_user 1
# OBSOLETE
verbose "HP's thread tests are broken beyond repair right now." verbose "HP's thread tests are broken beyond repair right now."
return 0 return 0
# OBSOLETE
if $tracelevel { # OBSOLETE if $tracelevel {
strace $tracelevel # OBSOLETE strace $tracelevel
} # OBSOLETE }
# OBSOLETE
if { [skip_hp_tests] } { continue } # OBSOLETE if { [skip_hp_tests] } { continue }
# OBSOLETE
if { ![istarget "hppa*-*-hpux*"] || [istarget "hppa64-*-*"] } { # OBSOLETE if { ![istarget "hppa*-*-hpux*"] || [istarget "hppa64-*-*"] } {
verbose "HPUX thread test ignored for non-hppa or PA64 targets." # OBSOLETE verbose "HPUX thread test ignored for non-hppa or PA64 targets."
return 0 # OBSOLETE return 0
} # OBSOLETE }
# OBSOLETE
set testfile usrthcore # OBSOLETE set testfile usrthcore
set srcfile ${srcdir}/${subdir}/${testfile}.c # OBSOLETE set srcfile ${srcdir}/${subdir}/${testfile}.c
set binfile ${srcdir}/${subdir}/${testfile} # OBSOLETE set binfile ${srcdir}/${subdir}/${testfile}
# OBSOLETE
# To build the executable we need to link against the thread library. # OBSOLETE # To build the executable we need to link against the thread library.
# # OBSOLETE #
# /opt/ansic/bin/cc -Ae +DAportable -g -o usrthcore -lcma usrthcore.c # OBSOLETE # /opt/ansic/bin/cc -Ae +DAportable -g -o usrthcore -lcma usrthcore.c
# # OBSOLETE #
## we have trouble building it on 11.0, so we use the prebuilt # OBSOLETE ## we have trouble building it on 11.0, so we use the prebuilt
## executable instead. # OBSOLETE ## executable instead.
## # OBSOLETE ##
##if { [gdb_compile "${srcdir}/${subdir}/${testfile}.c -lcma" "${binfile}" executable {debug additional_flags=-Ae ldflags=-lcma}] != "" } { # OBSOLETE ##if { [gdb_compile "${srcdir}/${subdir}/${testfile}.c -lcma" "${binfile}" executable {debug additional_flags=-Ae ldflags=-lcma}] != "" } {
## gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." # OBSOLETE ## gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
##} # OBSOLETE ##}
# OBSOLETE
#========================= # OBSOLETE #=========================
# # OBSOLETE #
# Test looking at threads in a core file # OBSOLETE # Test looking at threads in a core file
# # OBSOLETE #
# OBSOLETE
remote_exec build "rm -f core" # OBSOLETE remote_exec build "rm -f core"
remote_exec build "${binfile}" # OBSOLETE remote_exec build "${binfile}"
# OBSOLETE
gdb_exit # OBSOLETE gdb_exit
gdb_start # OBSOLETE gdb_start
gdb_reinitialize_dir $srcdir/$subdir # OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile} # OBSOLETE gdb_load ${binfile}
gdb_test "core-file core" \ # OBSOLETE gdb_test "core-file core" \
".*Core was generated by `usrthcore'.*in main.*usrthcore.c:170.*" \ # OBSOLETE ".*Core was generated by `usrthcore'.*in main.*usrthcore.c:170.*" \
"load corefile" # OBSOLETE "load corefile"
# OBSOLETE
gdb_test "info thread" \ # OBSOLETE gdb_test "info thread" \
" 4 .*cma__dispatch.*\\* 1 .*in main.*usrthcore.c:170.*" \ # OBSOLETE " 4 .*cma__dispatch.*\\* 1 .*in main.*usrthcore.c:170.*" \
"info thread on core file" # OBSOLETE "info thread on core file"
gdb_test "bt" "#0.*in main.*usrthcore.c:170" "backtrace on active thread" # OBSOLETE gdb_test "bt" "#0.*in main.*usrthcore.c:170" "backtrace on active thread"
gdb_test "thread 4" ".*Switching to thread 4.*cma__dispatch.*" \ # OBSOLETE gdb_test "thread 4" ".*Switching to thread 4.*cma__dispatch.*" \
"switch to thread 4 (thread2 procedure)" # OBSOLETE "switch to thread 4 (thread2 procedure)"
gdb_test "bt" "#0.*cma__dispatch.*thread2.*usrthcore.c:99.*" \ # OBSOLETE gdb_test "bt" "#0.*cma__dispatch.*thread2.*usrthcore.c:99.*" \
"Backtrace on inactive thread (thread2 procedure)" # OBSOLETE "Backtrace on inactive thread (thread2 procedure)"
gdb_test "b thread1" "Breakpoint 1.*usrthcore.c, line 75.*" \ # OBSOLETE gdb_test "b thread1" "Breakpoint 1.*usrthcore.c, line 75.*" \
"break on thread1" # OBSOLETE "break on thread1"
gdb_test "run" "Starting program.*Breakpoint 1, thread1.*usrthcore.c:75.*" \ # OBSOLETE gdb_test "run" "Starting program.*Breakpoint 1, thread1.*usrthcore.c:75.*" \
"run program, get to thread1 procedure" # OBSOLETE "run program, get to thread1 procedure"
gdb_test "info threads" "\\* \[23\] .*thread1.* 1 .*cma__dispatch.*" \ # OBSOLETE gdb_test "info threads" "\\* \[23\] .*thread1.* 1 .*cma__dispatch.*" \
"info threads after running core" # OBSOLETE "info threads after running core"
# OBSOLETE
# OBSOLETE
# Done! # OBSOLETE # Done!
# # OBSOLETE #
gdb_exit # OBSOLETE gdb_exit
# OBSOLETE
remote_exec build "rm -f core" # OBSOLETE remote_exec build "rm -f core"
# OBSOLETE
return 0 # OBSOLETE return 0

View File

@ -1,17 +1,17 @@
#include <stdio.h> /* OBSOLETE #include <stdio.h> */
#include <pthread.h> /* OBSOLETE #include <pthread.h> */
#include <sys/types.h> /* OBSOLETE #include <sys/types.h> */
/* OBSOLETE */
int main(void){ /* OBSOLETE int main(void){ */
pid_t pid; /* OBSOLETE pid_t pid; */
/* OBSOLETE */
switch (pid = fork()){ /* OBSOLETE switch (pid = fork()){ */
case 0: /* OBSOLETE case 0: */
printf("child\n"); /* OBSOLETE printf("child\n"); */
break; /* OBSOLETE break; */
default: /* OBSOLETE default: */
printf("parent\n"); /* OBSOLETE printf("parent\n"); */
break; /* OBSOLETE break; */
} /* OBSOLETE } */
return 0; /* OBSOLETE return 0; */
} /* OBSOLETE } */

View File

@ -1,75 +1,75 @@
# user_th_basic.exp -- Expect script to test gdb with user threads # OBSOLETE # user_th_basic.exp -- Expect script to test gdb with user threads
# Copyright (C) 1992 Free Software Foundation, Inc. # OBSOLETE # Copyright (C) 1992 Free Software Foundation, Inc.
# OBSOLETE
# This program is free software; you can redistribute it and/or modify # OBSOLETE # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # OBSOLETE # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or # OBSOLETE # the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. # OBSOLETE # (at your option) any later version.
# # OBSOLETE #
# This program is distributed in the hope that it will be useful, # OBSOLETE # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # OBSOLETE # GNU General Public License for more details.
# # OBSOLETE #
# You should have received a copy of the GNU General Public License # OBSOLETE # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # OBSOLETE # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
# OBSOLETE
# Please email any bugs, comments, and/or additions to this file to: # OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
# bug-gdb@prep.ai.mit.edu # OBSOLETE # bug-gdb@prep.ai.mit.edu
# OBSOLETE
verbose "HP's thread tests are broken beyond repair right now." verbose "HP's thread tests are broken beyond repair right now."
return 0 return 0
# OBSOLETE
if $tracelevel { # OBSOLETE if $tracelevel {
strace $tracelevel # OBSOLETE strace $tracelevel
} # OBSOLETE }
# OBSOLETE
if { ![istarget "hppa*-*-hpux*"] || [istarget "hppa64-*-*"] } { # OBSOLETE if { ![istarget "hppa*-*-hpux*"] || [istarget "hppa64-*-*"] } {
verbose "HPUX thread test ignored for non-hppa or PA64 targets." # OBSOLETE verbose "HPUX thread test ignored for non-hppa or PA64 targets."
return 0 # OBSOLETE return 0
} # OBSOLETE }
# OBSOLETE
set testfile usrthfork # OBSOLETE set testfile usrthfork
set srcfile ${srcdir}/${subdir}/${testfile}.c # OBSOLETE set srcfile ${srcdir}/${subdir}/${testfile}.c
set binfile ${srcdir}/${subdir}/${testfile} # OBSOLETE set binfile ${srcdir}/${subdir}/${testfile}
# OBSOLETE
# To build the executable we need to link against the thread library. # OBSOLETE # To build the executable we need to link against the thread library.
# # OBSOLETE #
# /opt/ansic/bin/cc -Ae -g -o usrthfork -lcma usrthfork.c # OBSOLETE # /opt/ansic/bin/cc -Ae -g -o usrthfork -lcma usrthfork.c
# # OBSOLETE #
## we have trouble building it on 11.0, so we use the prebuilt # OBSOLETE ## we have trouble building it on 11.0, so we use the prebuilt
## executable instead. # OBSOLETE ## executable instead.
## # OBSOLETE ##
##if { [gdb_compile "${srcdir}/${subdir}/${testfile}.c" "${binfile}" executable {debug additional_flags=-Ae ldflags=-lcma}] != "" } { # OBSOLETE ##if { [gdb_compile "${srcdir}/${subdir}/${testfile}.c" "${binfile}" executable {debug additional_flags=-Ae ldflags=-lcma}] != "" } {
## gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." # OBSOLETE ## gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
##} # OBSOLETE ##}
# OBSOLETE
#========================= # OBSOLETE #=========================
# # OBSOLETE #
# Test looking at threads. # OBSOLETE # Test looking at threads.
# # OBSOLETE #
gdb_exit # OBSOLETE gdb_exit
gdb_start # OBSOLETE gdb_start
gdb_reinitialize_dir $srcdir/$subdir # OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile} # OBSOLETE gdb_load ${binfile}
# OBSOLETE
gdb_test "set follow-fork-mode parent" ".*" "set follow-fork-mode parent" # OBSOLETE gdb_test "set follow-fork-mode parent" ".*" "set follow-fork-mode parent"
gdb_test "b main" "Breakpoint 1.*" "b main" # OBSOLETE gdb_test "b main" "Breakpoint 1.*" "b main"
gdb_test "run" "Breakpoint 1, main.*:8.*" "run to main" # OBSOLETE gdb_test "run" "Breakpoint 1, main.*:8.*" "run to main"
##gdb_test "next" \ # OBSOLETE ##gdb_test "next" \
## ".*New process.*Detaching after fork from process.*13.*parent.*" \ # OBSOLETE ## ".*New process.*Detaching after fork from process.*13.*parent.*" \
## "next on CMA fork" # OBSOLETE ## "next on CMA fork"
send_gdb "next\n" # OBSOLETE send_gdb "next\n"
gdb_expect { # OBSOLETE gdb_expect {
-re ".*Detaching after fork from.*$gdb_prompt $" { # OBSOLETE -re ".*Detaching after fork from.*$gdb_prompt $" {
pass "next on CMA fork" # OBSOLETE pass "next on CMA fork"
} # OBSOLETE }
-re ".*$gdb_prompt $" { fail "next on CMA fork" } # OBSOLETE -re ".*$gdb_prompt $" { fail "next on CMA fork" }
timeout { fail "(timeout) next on CMA fork" } # OBSOLETE timeout { fail "(timeout) next on CMA fork" }
} # OBSOLETE }
exec sleep 1 # OBSOLETE exec sleep 1
# OBSOLETE
gdb_exit # OBSOLETE gdb_exit
# OBSOLETE
return 0 # OBSOLETE return 0