diff -C 2 -P -r gdb-4.18.ORIG/gdb/Makefile.in gdb-4.18/gdb/Makefile.in *** gdb-4.18/gdb/Makefile.in Wed Apr 7 23:00:43 1999 --- gdb-4.18/gdb/Makefile.in Mon May 31 14:19:24 1999 *************** *** 97,101 **** # routines in libiberty. INCLUDE_DIR = $(srcdir)/../include ! INCLUDE_CFLAGS = -I$(INCLUDE_DIR) # Where is the "-liberty" library? Typically in ../libiberty. --- 97,101 ---- # routines in libiberty. INCLUDE_DIR = $(srcdir)/../include ! INCLUDE_CFLAGS = -I$(INCLUDE_DIR) -I../../include # Where is the "-liberty" library? Typically in ../libiberty. *************** *** 150,153 **** --- 150,163 ---- ENABLE_CFLAGS= @ENABLE_CFLAGS@ + # >> definitions for the Thread << + # >> Debug Interface (TDI) << + + TDI_SFILES = pthread.c + + TDI_OBS = $(TDI_SFILES:.c=.o) + + TDI_LIB = -L../../lib/ @TDI_LIB@ + + # -I. for config files. # -I$(srcdir) for gdb internal headers and possibly for gnu-regex.h also. *************** *** 176,180 **** # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros. INTERNAL_CFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \ ! $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \ $(BFD_CFLAGS) $(MMALLOC_CFLAGS) $(INCLUDE_CFLAGS) \ $(INTL_CFLAGS) $(TUI_CFLAGS) $(ENABLE_CFLAGS) $(WARN_CFLAGS) --- 186,190 ---- # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros. INTERNAL_CFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \ ! $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) $(TDI_CFLAGS)\ $(BFD_CFLAGS) $(MMALLOC_CFLAGS) $(INCLUDE_CFLAGS) \ $(INTL_CFLAGS) $(TUI_CFLAGS) $(ENABLE_CFLAGS) $(WARN_CFLAGS) *************** *** 205,211 **** --- 215,223 ---- # you can use 'CLIBS=$(INSTALLED_LIBS)' 'CDEPS=' INSTALLED_LIBS=-lbfd -lreadline -lopcodes -liberty \ + $(TDI_LIB) \ $(TERMCAP) $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \ -lmmalloc -lintl -liberty CLIBS = $(SIM) $(BFD) $(READLINE) $(OPCODES) $(INTL) $(LIBIBERTY) \ + $(TDI_LIB) \ $(TERMCAP) $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \ $(MMALLOC) $(LIBIBERTY) $(WIN32LIBS) *************** *** 370,373 **** --- 382,386 ---- typeprint.c utils.c valarith.c valops.c valprint.c values.c \ serial.c ser-unix.c mdebugread.c os9kread.c \ + $(TDI_SFILES) \ tui/tui.c tui/tui.h tui/tuiCommand.c tui/tuiCommand.h \ tui/tuiData.c tui/tuiData.h tui/tuiDataWin.c tui/tuiDataWin.h \ *************** *** 488,491 **** --- 501,505 ---- dbxread.o coffread.o elfread.o \ dwarfread.o dwarf2read.o mipsread.o stabsread.o corefile.o \ + $(TDI_OBS) \ c-lang.o ch-exp.o ch-lang.o f-lang.o \ jv-lang.o jv-valprint.o jv-typeprint.o \ diff -C 2 -P -r gdb-4.18.ORIG/gdb/acconfig.h gdb-4.18/gdb/acconfig.h *** gdb-4.18/gdb/acconfig.h Fri Mar 26 07:23:50 1999 --- gdb-4.18/gdb/acconfig.h Mon May 31 14:10:50 1999 *************** *** 49,52 **** --- 49,61 ---- /* Define on a GNU/Linux system to work around problems in sys/procfs.h. */ #undef START_INFERIOR_TRAPS_EXPECTED + + /* TDI support (thread debugging) */ + #undef TDI_SUPPORT + + + + + + #undef sys_quotactl diff -C 2 -P -r gdb-4.18.ORIG/gdb/breakpoint.c gdb-4.18/gdb/breakpoint.c *** gdb-4.18/gdb/breakpoint.c Fri Mar 26 07:23:51 1999 --- gdb-4.18/gdb/breakpoint.c Mon May 31 14:24:59 1999 *************** *** 32,35 **** --- 32,36 ---- #include "inferior.h" #include "gdbthread.h" + #include "gdbpthread.h" #include "target.h" #include "language.h" *************** *** 1363,1384 **** { struct breakpoint *b; ! int thread; ! ! thread = pid_to_thread_id (pid); ! ! ALL_BREAKPOINTS (b) if (b->enable != disabled && b->enable != shlib_disabled && b->enable != call_disabled ! && b->address == pc ! && (b->thread == -1 || b->thread == thread)) ! { if (overlay_debugging && section_is_overlay (b->section) && !section_is_mapped (b->section)) continue; /* unmapped overlay -- can't be a match */ ! else return 1; } return 0; --- 1364,1408 ---- { struct breakpoint *b; ! int test_value = 0; ! ! /* D.Schulz: the test is restructured to avoid unnecessary calls * ! * to pid_to_thread_id (expensive) */ ! ! ALL_BREAKPOINTS (b) { if (b->enable != disabled && b->enable != shlib_disabled && b->enable != call_disabled ! && b->address == pc) { ! if (overlay_debugging && section_is_overlay (b->section) && !section_is_mapped (b->section)) continue; /* unmapped overlay -- can't be a match */ ! else { ! ! /* if no thread kind is specified, match anyway */ ! if (b->thread == -1 && b->pthread == -1) return 1; + + /* if pthread is set, both of them have to match */ + if (b->thread != -1 ) { + if (b->thread == pid_to_thread_id (pid)) { + if (b->pthread!=-1) { + if (b->pthread == pid_to_pthread_id(pid)) { + return (b->pthread_complement_flag)?0:1; + } + return (b->pthread_complement_flag)?1:0; + } + else + return 1; + } + } + if (b->pthread == pid_to_pthread_id( pid)) + return (b->pthread_complement_flag)?0:1; + else + return (b->pthread_complement_flag)?1:0; } + } + } return 0; *************** *** 2873,2876 **** --- 2897,2906 ---- } + if (b->pthread != -1) + { + /* FIXME should make an annotation for this */ + printf_filtered ("\tstop only in POSIX thread %d\n", b->pthread); + } + if (show_breakpoint_hit_counts && b->hit_count) { *************** *** 3059,3062 **** --- 3089,3093 ---- b->input_radix = input_radix; b->thread = -1; + b->pthread = -1; b->line_number = sal.line; b->enable = enabled; *************** *** 3684,3687 **** --- 3715,3719 ---- int i; int thread; + int pthread; hardwareflag = flag & BP_HARDWAREFLAG; *************** *** 3749,3752 **** --- 3781,3785 ---- thread = -1; /* No specific thread yet */ + pthread = -1; /* Resolve all line numbers to PC's, and verify that conditions *************** *** 3809,3812 **** --- 3842,3858 ---- error ("Unknown thread %d\n", thread); } + else if (toklen >= 1 && strncmp (tok, "pthread", toklen) == 0) + { + char *tmptok; + + tok = end_tok + 1; + tmptok = tok; + pthread = strtol (tok, &tok, 0); + if (tok == tmptok) + error ("Junk after thread keyword."); + /* NOTE: we don't want to know, whether * + * there is a thread with the desired id * + * or not (ds) */ + } else error ("Junk at end of arguments."); *************** *** 3845,3848 **** --- 3891,3903 ---- b->thread = thread; + if (pthread == -1) { + /* if there is no thread specified, but a thread is * + * attached, we set a breakpoint there (because we * + * want to follow its control flow */ + b->pthread = gdbpthread_attached_thread(); + } + else + b->pthread = pthread; + /* If a canonical line spec is needed use that instead of the command string. */ *************** *** 5361,5364 **** --- 5416,5420 ---- b->cond = 0; b->thread = -1; + b->pthread = -1; return b; } *************** *** 5553,5558 **** for (; bs; bs = bs->next) if (bs->breakpoint_at && bs->breakpoint_at->disposition == del ! && bs->stop) ! delete_breakpoint (bs->breakpoint_at); ALL_BREAKPOINTS_SAFE (b, temp) --- 5609,5627 ---- for (; bs; bs = bs->next) if (bs->breakpoint_at && bs->breakpoint_at->disposition == del ! && bs->stop) ! { ! #ifdef TDI_SUPPORT ! /* + this is necessary for the ptattach command: ! * - a temprary breakpoint is set at NPC(attached_thread) ! * - an action is associated with that breakpoint, that ! * prints out a message ! * + the continue -cs command uses the same mechanism ! */ ! ! if (bs->commands) ! bpstat_do_actions(&bs); ! #endif ! delete_breakpoint (bs->breakpoint_at); ! } ALL_BREAKPOINTS_SAFE (b, temp) diff -C 2 -P -r gdb-4.18.ORIG/gdb/breakpoint.h gdb-4.18/gdb/breakpoint.h *** gdb-4.18/gdb/breakpoint.h Fri Mar 26 07:23:51 1999 --- gdb-4.18/gdb/breakpoint.h Mon May 31 14:10:51 1999 *************** *** 238,241 **** --- 238,250 ---- int thread; + #if 1 /* TDI_SUPPORT */ + /* POSIX thread number for a thread-specific bp (if both thread kinds * + * (kernel and user) are used, we have to handle them differently */ + + int pthread_complement_flag; /* if set, all threads except the * + * specified match */ + int pthread; + #endif + /* Count of the number of times this breakpoint was taken, dumped with the info, but not used for anything else. Useful for diff -C 2 -P -r gdb-4.18.ORIG/gdb/config/i386/nm-i386sol2.h gdb-4.18/gdb/config/i386/nm-i386sol2.h *** gdb-4.18.ORIG/gdb/config/i386/nm-i386sol2.h Sat Apr 11 07:39:46 1998 --- gdb-4.18/gdb/config/i386/nm-i386sol2.h Tue Apr 27 02:12:58 1999 *************** *** 26,35 **** #endif ! #define target_new_objfile(OBJFILE) sol_thread_new_objfile (OBJFILE) void sol_thread_new_objfile PARAMS ((struct objfile *objfile)); #define FIND_NEW_THREADS sol_find_new_threads void sol_find_new_threads PARAMS ((void)); #endif --- 26,55 ---- #endif ! #define target_new_objfile(OBJFILE) { sol_thread_new_objfile (OBJFILE); \ ! /* don't forget the TDI */ \ ! pTDI_new_objfile (OBJFILE); } void sol_thread_new_objfile PARAMS ((struct objfile *objfile)); + void pTDI_new_objfile PARAMS ((struct objfile *objfile)); + + #define FIND_NEW_THREADS sol_find_new_threads void sol_find_new_threads PARAMS ((void)); + #else + + /* if there are pure user space implementations, * + * we could support POSIX thread debugging too */ + + #ifdef __STDC__ + struct objfile; + #endif + void pTDI_new_objfile PARAMS ((struct objfile *objfile)); + #define target_new_objfile(OBJFILE) pTDI_new_objfile (OBJFILE) #endif + + + + + diff -C 2 -P -r gdb-4.18/gdb/config/i386/nm-linux.h gdb-4.18/gdb/config/i386/nm-linux.h *** gdb-4.18/gdb/config/i386/nm-linux.h Wed Aug 19 01:04:23 1998 --- gdb-4.18/gdb/config/i386/nm-linux.h Mon May 31 14:49:29 1999 *************** *** 71,73 **** --- 71,80 ---- i386_remove_watchpoint PARAMS ((int pid, CORE_ADDR addr, int len)); + #ifdef __STDC__ + struct objfile; + #endif + + void pTDI_new_objfile PARAMS ((struct objfile *objfile)); + #define target_new_objfile(OBJFILE) pTDI_new_objfile (OBJFILE) + #endif /* #ifndef NM_LINUX_H */ diff -C 2 -P -r gdb-4.18/gdb/config/pa/nm-hppah.h gdb-4.18/gdb/config/pa/nm-hppah.h *** gdb-4.18/gdb/config/pa/nm-hppah.h Fri Mar 12 16:02:14 1999 --- gdb-4.18/gdb/config/pa/nm-hppah.h Mon May 31 14:49:29 1999 *************** *** 272,281 **** void hpux_thread_new_objfile PARAMS ((struct objfile *objfile)); ! #define target_new_objfile(OBJFILE) hpux_thread_new_objfile (OBJFILE) extern char *hpux_pid_to_str PARAMS ((int pid)); #define target_pid_to_str(PID) hpux_pid_to_str (PID) ! #endif /* HAVE_HPUX_THREAD_SUPPORT */ #define HPUXHPPA --- 272,296 ---- void hpux_thread_new_objfile PARAMS ((struct objfile *objfile)); ! void pTDI_new_objfile PARAMS ((struct objfile *objfile)); ! #define target_new_objfile(OBJFILE) { hpux_thread_new_objfile (OBJFILE);\ ! /* don't forget the TDI */ \ ! pTDI_new_objfile (OBJFILE); } extern char *hpux_pid_to_str PARAMS ((int pid)); #define target_pid_to_str(PID) hpux_pid_to_str (PID) ! #else ! /* if there are pure user space implementations, * ! * we could support POSIX thread debugging too */ ! ! #ifdef __STDC__ ! struct objfile; ! #endif ! ! void pTDI_new_objfile PARAMS ((struct objfile *objfile)); ! #define target_new_objfile(OBJFILE) pTDI_new_objfile (OBJFILE) ! #endif /* HAVE_HPUX_THREAD_SUPPORT */ ! ! #define HPUXHPPA diff -C 2 -P -r gdb-4.18.ORIG/gdb/config/sparc/nm-sun4sol2.h gdb-4.18/gdb/config/sparc/nm-sun4sol2.h *** gdb-4.18.ORIG/gdb/config/sparc/nm-sun4sol2.h Fri Oct 24 23:04:39 1997 --- gdb-4.18/gdb/config/sparc/nm-sun4sol2.h Tue Apr 27 02:13:23 1999 *************** *** 36,45 **** #endif ! #define target_new_objfile(OBJFILE) sol_thread_new_objfile (OBJFILE) void sol_thread_new_objfile PARAMS ((struct objfile *objfile)); #define FIND_NEW_THREADS sol_find_new_threads void sol_find_new_threads PARAMS ((void)); #endif --- 36,63 ---- #endif ! #define target_new_objfile(OBJFILE) { sol_thread_new_objfile (OBJFILE); \ ! /* don't forget the TDI */ \ ! pTDI_new_objfile (OBJFILE);} void sol_thread_new_objfile PARAMS ((struct objfile *objfile)); + void pTDI_new_objfile PARAMS ((struct objfile *objfile)); #define FIND_NEW_THREADS sol_find_new_threads void sol_find_new_threads PARAMS ((void)); + #else + + /* if there are pure user space implementations, * + * we could support POSIX thread debugging too */ + + #ifdef __STDC__ + struct objfile; + #endif + + void pTDI_new_objfile PARAMS ((struct objfile *objfile)); + #define target_new_objfile(OBJFILE) pTDI_new_objfile (OBJFILE) + #endif + + + diff -C 2 -P -r gdb-4.18.ORIG/gdb/config.in gdb-4.18/gdb/config.in *** gdb-4.18/gdb/config.in.orig Wed Apr 7 23:04:32 1999 --- gdb-4.18/gdb/config.in Mon May 31 14:10:51 1999 *************** *** 147,150 **** --- 147,153 ---- #undef HAVE_GETCWD + /* TDI support (thread debugging) */ + #undef TDI_SUPPORT + /* Define if you have the getpagesize function. */ #undef HAVE_GETPAGESIZE diff -C 2 -P -r gdb-4.18.ORIG/gdb/configure gdb-4.18/gdb/configure *** gdb-4.18/gdb/configure.orig Wed Apr 7 23:04:34 1999 --- gdb-4.18/gdb/configure Mon May 31 14:39:42 1999 *************** *** 23,26 **** --- 23,28 ---- --enable-build-warnings Enable build-time compiler warnings if gcc is used" ac_help="$ac_help + --enable-TDI " + ac_help="$ac_help --with-mmalloc Use memory mapped malloc package" ac_help="$ac_help *************** *** 543,547 **** set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:546: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 545,549 ---- set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:548: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 573,577 **** set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:576: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 575,579 ---- set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:578: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 624,628 **** set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:627: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 626,630 ---- set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:629: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 656,660 **** echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:659: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c --- 658,662 ---- echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:661: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c *************** *** 667,676 **** cat > conftest.$ac_ext << EOF ! #line 670 "configure" #include "confdefs.h" main(){return(0);} EOF ! if { (eval echo configure:675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. --- 669,678 ---- cat > conftest.$ac_ext << EOF ! #line 672 "configure" #include "confdefs.h" main(){return(0);} EOF ! if { (eval echo configure:677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. *************** *** 698,707 **** fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ! echo "configure:701: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:706: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 700,709 ---- fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ! echo "configure:703: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:708: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 712,716 **** #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else --- 714,718 ---- #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else *************** *** 731,735 **** CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:734: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 733,737 ---- CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:736: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 763,767 **** echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ! echo "configure:766: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then --- 765,769 ---- echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ! echo "configure:768: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then *************** *** 778,782 **** # not just through cpp. cat > conftest.$ac_ext < --- 780,784 ---- # not just through cpp. cat > conftest.$ac_ext < *************** *** 784,788 **** EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 786,790 ---- EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 795,799 **** CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < --- 797,801 ---- CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < *************** *** 801,805 **** EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 803,807 ---- EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 812,816 **** CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < --- 814,818 ---- CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < *************** *** 818,822 **** EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 820,824 ---- EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 843,849 **** echo $ac_n "checking for AIX""... $ac_c" 1>&6 ! echo "configure:846: checking for AIX" >&5 cat > conftest.$ac_ext <&6 ! echo "configure:848: checking for AIX" >&5 cat > conftest.$ac_ext <&6 ! echo "configure:870: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 --- 869,873 ---- echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 ! echo "configure:872: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 *************** *** 891,895 **** echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 ! echo "configure:894: checking for ${CC-cc} option to accept ANSI C" >&5 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 893,897 ---- echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 ! echo "configure:896: checking for ${CC-cc} option to accept ANSI C" >&5 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 907,911 **** CC="$ac_save_CC $ac_arg" cat > conftest.$ac_ext < --- 909,913 ---- CC="$ac_save_CC $ac_arg" cat > conftest.$ac_ext < *************** *** 944,948 **** ; return 0; } EOF ! if { (eval echo configure:947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_prog_cc_stdc="$ac_arg"; break --- 946,950 ---- ; return 0; } EOF ! if { (eval echo configure:949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_prog_cc_stdc="$ac_arg"; break *************** *** 1015,1019 **** echo $ac_n "checking host system type""... $ac_c" 1>&6 ! echo "configure:1018: checking host system type" >&5 host_alias=$host --- 1017,1021 ---- echo $ac_n "checking host system type""... $ac_c" 1>&6 ! echo "configure:1020: checking host system type" >&5 host_alias=$host *************** *** 1036,1040 **** echo $ac_n "checking target system type""... $ac_c" 1>&6 ! echo "configure:1039: checking target system type" >&5 target_alias=$target --- 1038,1042 ---- echo $ac_n "checking target system type""... $ac_c" 1>&6 ! echo "configure:1041: checking target system type" >&5 target_alias=$target *************** *** 1054,1058 **** echo $ac_n "checking build system type""... $ac_c" 1>&6 ! echo "configure:1057: checking build system type" >&5 build_alias=$build --- 1056,1060 ---- echo $ac_n "checking build system type""... $ac_c" 1>&6 ! echo "configure:1059: checking build system type" >&5 build_alias=$build *************** *** 1079,1083 **** ALL_LINGUAS= echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:1082: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then --- 1081,1085 ---- ALL_LINGUAS= echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:1084: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then *************** *** 1108,1112 **** set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1111: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1110,1114 ---- set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1113: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1136,1145 **** echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 ! echo "configure:1139: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 1138,1147 ---- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 ! echo "configure:1141: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 1149,1153 **** EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 1151,1155 ---- EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 1166,1170 **** # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < --- 1168,1172 ---- # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < *************** *** 1184,1188 **** # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < --- 1186,1190 ---- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < *************** *** 1205,1209 **** else cat > conftest.$ac_ext < --- 1207,1211 ---- else cat > conftest.$ac_ext < *************** *** 1216,1220 **** EOF ! if { (eval echo configure:1219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : --- 1218,1222 ---- EOF ! if { (eval echo configure:1221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : *************** *** 1240,1249 **** echo $ac_n "checking for working const""... $ac_c" 1>&6 ! echo "configure:1243: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:1245: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes --- 1296,1300 ---- ; return 0; } EOF ! if { (eval echo configure:1299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes *************** *** 1315,1319 **** echo $ac_n "checking for inline""... $ac_c" 1>&6 ! echo "configure:1318: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1317,1321 ---- echo $ac_n "checking for inline""... $ac_c" 1>&6 ! echo "configure:1320: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1322,1326 **** for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break --- 1331,1335 ---- ; return 0; } EOF ! if { (eval echo configure:1334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break *************** *** 1355,1364 **** echo $ac_n "checking for off_t""... $ac_c" 1>&6 ! echo "configure:1358: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 1357,1366 ---- echo $ac_n "checking for off_t""... $ac_c" 1>&6 ! echo "configure:1360: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 1388,1397 **** echo $ac_n "checking for size_t""... $ac_c" 1>&6 ! echo "configure:1391: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 1390,1399 ---- echo $ac_n "checking for size_t""... $ac_c" 1>&6 ! echo "configure:1393: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 1423,1432 **** # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 ! echo "configure:1426: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 1425,1434 ---- # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 ! echo "configure:1428: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 1435,1439 **** ; return 0; } EOF ! if { (eval echo configure:1438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes --- 1437,1441 ---- ; return 0; } EOF ! if { (eval echo configure:1440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes *************** *** 1456,1465 **** echo $ac_n "checking for alloca""... $ac_c" 1>&6 ! echo "configure:1459: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:1461: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes --- 1491,1495 ---- ; return 0; } EOF ! if { (eval echo configure:1494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes *************** *** 1521,1530 **** echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 ! echo "configure:1524: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:1526: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:1554: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:1556: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" --- 1581,1585 ---- ; return 0; } EOF ! if { (eval echo configure:1584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" *************** *** 1606,1610 **** echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 ! echo "configure:1609: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1608,1612 ---- echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 ! echo "configure:1611: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1614,1618 **** else cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 --- 1635,1639 ---- } EOF ! if { (eval echo configure:1638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 *************** *** 1658,1672 **** ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:1661: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 1660,1674 ---- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:1663: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1673: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 1697,1706 **** do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:1700: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:1702: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" --- 1727,1731 ---- ; return 0; } EOF ! if { (eval echo configure:1730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" *************** *** 1750,1754 **** echo $ac_n "checking for working mmap""... $ac_c" 1>&6 ! echo "configure:1753: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1752,1756 ---- echo $ac_n "checking for working mmap""... $ac_c" 1>&6 ! echo "configure:1755: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1758,1762 **** else cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes --- 1900,1904 ---- EOF ! if { (eval echo configure:1903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes *************** *** 1926,1940 **** ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:1929: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 1928,1942 ---- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:1931: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 1966,1975 **** do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:1969: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:1971: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" --- 1996,2000 ---- ; return 0; } EOF ! if { (eval echo configure:1999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" *************** *** 2023,2032 **** do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:2026: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:2028: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" --- 2053,2057 ---- ; return 0; } EOF ! if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" *************** *** 2085,2094 **** if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 ! echo "configure:2088: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 2087,2096 ---- if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 ! echo "configure:2090: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 2097,2101 **** ; return 0; } EOF ! if { (eval echo configure:2100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes --- 2099,2103 ---- ; return 0; } EOF ! if { (eval echo configure:2102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes *************** *** 2118,2122 **** fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 ! echo "configure:2121: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then --- 2120,2124 ---- fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 ! echo "configure:2123: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then *************** *** 2138,2142 **** echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 ! echo "configure:2141: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then --- 2140,2144 ---- echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 ! echo "configure:2143: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then *************** *** 2157,2171 **** ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 ! echo "configure:2160: checking for libintl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 2159,2173 ---- ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 ! echo "configure:2162: checking for libintl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 2184,2193 **** echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 ! echo "configure:2187: checking for gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 2186,2195 ---- echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 ! echo "configure:2189: checking for gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 2196,2200 **** ; return 0; } EOF ! if { (eval echo configure:2199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes --- 2198,2202 ---- ; return 0; } EOF ! if { (eval echo configure:2201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes *************** *** 2212,2216 **** if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 ! echo "configure:2215: checking for bindtextdomain in -lintl" >&5 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 2214,2218 ---- if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 ! echo "configure:2217: checking for bindtextdomain in -lintl" >&5 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 2220,2224 **** LIBS="-lintl $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 2233,2237 ---- ; return 0; } EOF ! if { (eval echo configure:2236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 2247,2256 **** echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 ! echo "configure:2250: checking for gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 ! echo "configure:2252: checking for gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libintl=yes --- 2261,2265 ---- ; return 0; } EOF ! if { (eval echo configure:2264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libintl=yes *************** *** 2287,2291 **** set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2290: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2289,2293 ---- set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2292: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2321,2330 **** do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:2324: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:2326: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" --- 2351,2355 ---- ; return 0; } EOF ! if { (eval echo configure:2354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" *************** *** 2376,2380 **** set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2379: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2378,2382 ---- set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2381: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2412,2416 **** set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2415: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2414,2418 ---- set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2417: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2444,2448 **** cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo --- 2454,2458 ---- ; return 0; } EOF ! if { (eval echo configure:2457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo *************** *** 2484,2488 **** set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2487: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2486,2490 ---- set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2489: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2518,2522 **** set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2521: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2520,2524 ---- set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2523: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2554,2558 **** set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2557: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2556,2560 ---- set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2559: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2644,2648 **** else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 ! echo "configure:2647: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do --- 2646,2650 ---- else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 ! echo "configure:2649: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do *************** *** 2672,2686 **** ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 ! echo "configure:2675: checking for linux/version.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 2674,2688 ---- ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 ! echo "configure:2677: checking for linux/version.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 2769,2773 **** # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:2772: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then --- 2771,2775 ---- # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:2774: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then *************** *** 2830,2834 **** set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2833: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2832,2836 ---- set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2835: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2862,2866 **** set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2865: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2864,2868 ---- set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2867: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2894,2898 **** set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2897: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2896,2900 ---- set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2899: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2931,2935 **** set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2934: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2933,2937 ---- set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2936: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2983,2992 **** echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 ! echo "configure:2986: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 2985,2994 ---- echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 ! echo "configure:2988: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 3005,3009 **** ; return 0; } EOF ! if { (eval echo configure:3008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void --- 3007,3011 ---- ; return 0; } EOF ! if { (eval echo configure:3010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void *************** *** 3025,3034 **** echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 ! echo "configure:3028: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 3027,3036 ---- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 ! echo "configure:3030: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 3038,3042 **** EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 3040,3044 ---- EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 3055,3059 **** # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < --- 3057,3061 ---- # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < *************** *** 3073,3077 **** # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < --- 3075,3079 ---- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < *************** *** 3094,3098 **** else cat > conftest.$ac_ext < --- 3096,3100 ---- else cat > conftest.$ac_ext < *************** *** 3105,3109 **** EOF ! if { (eval echo configure:3108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : --- 3107,3111 ---- EOF ! if { (eval echo configure:3110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : *************** *** 3137,3151 **** ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:3140: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 3139,3153 ---- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:3142: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:3152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 3174,3183 **** echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 ! echo "configure:3177: checking whether stat file-mode macros are broken" >&5 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 3176,3185 ---- echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 ! echo "configure:3179: checking whether stat file-mode macros are broken" >&5 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 3231,3240 **** echo $ac_n "checking for working const""... $ac_c" 1>&6 ! echo "configure:3234: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:3236: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes --- 3287,3291 ---- ; return 0; } EOF ! if { (eval echo configure:3290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes *************** *** 3309,3318 **** do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:3312: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:3314: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" --- 3339,3343 ---- ; return 0; } EOF ! if { (eval echo configure:3342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" *************** *** 3364,3373 **** # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 ! echo "configure:3367: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 3366,3375 ---- # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 ! echo "configure:3369: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 3376,3380 **** ; return 0; } EOF ! if { (eval echo configure:3379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes --- 3378,3382 ---- ; return 0; } EOF ! if { (eval echo configure:3381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes *************** *** 3397,3406 **** echo $ac_n "checking for alloca""... $ac_c" 1>&6 ! echo "configure:3400: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:3402: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes --- 3432,3436 ---- ; return 0; } EOF ! if { (eval echo configure:3435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes *************** *** 3462,3471 **** echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 ! echo "configure:3465: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:3467: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:3495: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:3497: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" --- 3522,3526 ---- ; return 0; } EOF ! if { (eval echo configure:3525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" *************** *** 3547,3551 **** echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 ! echo "configure:3550: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 3549,3553 ---- echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 ! echo "configure:3552: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 3555,3559 **** else cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 --- 3576,3580 ---- } EOF ! if { (eval echo configure:3579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 *************** *** 3597,3606 **** echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 ! echo "configure:3600: checking whether malloc must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:3602: checking whether malloc must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_malloc=no --- 3625,3629 ---- ; return 0; } EOF ! if { (eval echo configure:3628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_malloc=no *************** *** 3644,3653 **** echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 ! echo "configure:3647: checking whether realloc must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:3649: checking whether realloc must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_realloc=no --- 3672,3676 ---- ; return 0; } EOF ! if { (eval echo configure:3675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_realloc=no *************** *** 3691,3700 **** echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 ! echo "configure:3694: checking whether free must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:3696: checking whether free must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_free=no --- 3719,3723 ---- ; return 0; } EOF ! if { (eval echo configure:3722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_free=no *************** *** 3738,3747 **** echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6 ! echo "configure:3741: checking whether strerror must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:3743: checking whether strerror must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_strerror=no --- 3766,3770 ---- ; return 0; } EOF ! if { (eval echo configure:3769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_strerror=no *************** *** 3785,3794 **** echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6 ! echo "configure:3788: checking whether strdup must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:3790: checking whether strdup must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_strdup=no --- 3813,3817 ---- ; return 0; } EOF ! if { (eval echo configure:3816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_strdup=no *************** *** 3838,3844 **** echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6 ! echo "configure:3841: checking for HPUX save_state structure" >&5 cat > conftest.$ac_ext < --- 3840,3846 ---- echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6 ! echo "configure:3843: checking for HPUX save_state structure" >&5 cat > conftest.$ac_ext < *************** *** 3855,3859 **** cat > conftest.$ac_ext < --- 3857,3861 ---- cat > conftest.$ac_ext < *************** *** 3904,3908 **** esac echo $ac_n "checking for directory proc entries""... $ac_c" 1>&6 ! echo "configure:3907: checking for directory proc entries" >&5 # The [gdb_host != sun4sol2] hack is because Solaris does provide the # multiple procfs files as of Solaris 2.6, but GDB can't use it right now. --- 3906,3910 ---- esac echo $ac_n "checking for directory proc entries""... $ac_c" 1>&6 ! echo "configure:3909: checking for directory proc entries" >&5 # The [gdb_host != sun4sol2] hack is because Solaris does provide the # multiple procfs files as of Solaris 2.6, but GDB can't use it right now. *************** *** 3925,3934 **** if test "$ac_cv_header_sys_procfs_h" = yes; then echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 ! echo "configure:3928: checking for pstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 3927,3936 ---- if test "$ac_cv_header_sys_procfs_h" = yes; then echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 ! echo "configure:3930: checking for pstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 3937,3941 **** ; return 0; } EOF ! if { (eval echo configure:3940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_pstatus_t=yes --- 3939,3943 ---- ; return 0; } EOF ! if { (eval echo configure:3942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_pstatus_t=yes *************** *** 3959,3968 **** echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 ! echo "configure:3962: checking for prrun_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 3961,3970 ---- echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6 ! echo "configure:3964: checking for prrun_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 3971,3975 **** ; return 0; } EOF ! if { (eval echo configure:3974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prrun_t=yes --- 3973,3977 ---- ; return 0; } EOF ! if { (eval echo configure:3976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prrun_t=yes *************** *** 3993,4002 **** echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 ! echo "configure:3996: checking for gregset_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 3995,4004 ---- echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6 ! echo "configure:3998: checking for gregset_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 4005,4009 **** ; return 0; } EOF ! if { (eval echo configure:4008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_gregset_t=yes --- 4007,4011 ---- ; return 0; } EOF ! if { (eval echo configure:4010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_gregset_t=yes *************** *** 4027,4036 **** echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 ! echo "configure:4030: checking for fpregset_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 4029,4038 ---- echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6 ! echo "configure:4032: checking for fpregset_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 4039,4043 **** ; return 0; } EOF ! if { (eval echo configure:4042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_fpregset_t=yes --- 4041,4045 ---- ; return 0; } EOF ! if { (eval echo configure:4044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_fpregset_t=yes *************** *** 4063,4072 **** echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 ! echo "configure:4066: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 4065,4074 ---- echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6 ! echo "configure:4068: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 4081,4085 **** ; return 0; } EOF ! if { (eval echo configure:4084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gdb_cv_have_procfs_piocset=yes --- 4083,4087 ---- ; return 0; } EOF ! if { (eval echo configure:4086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gdb_cv_have_procfs_piocset=yes *************** *** 4103,4107 **** echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 ! echo "configure:4106: checking for main in -lm" >&5 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 4105,4109 ---- echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 ! echo "configure:4108: checking for main in -lm" >&5 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 4111,4115 **** LIBS="-lm $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 4120,4124 ---- ; return 0; } EOF ! if { (eval echo configure:4123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 4147,4151 **** echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6 ! echo "configure:4150: checking for wctype in -lc" >&5 ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 4149,4153 ---- echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6 ! echo "configure:4152: checking for wctype in -lc" >&5 ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 4155,4159 **** LIBS="-lc $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 4168,4172 ---- ; return 0; } EOF ! if { (eval echo configure:4171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 4185,4189 **** echo "$ac_t""no" 1>&6 echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 ! echo "configure:4188: checking for wctype in -lw" >&5 ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 4187,4191 ---- echo "$ac_t""no" 1>&6 echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6 ! echo "configure:4190: checking for wctype in -lw" >&5 ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 4193,4197 **** LIBS="-lw $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 4206,4210 ---- ; return 0; } EOF ! if { (eval echo configure:4209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 4236,4245 **** echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6 ! echo "configure:4239: checking for long long support in compiler" >&5 if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:4241: checking for long long support in compiler" >&5 if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gdb_cv_c_long_long=yes --- 4253,4257 ---- ; return 0; } EOF ! if { (eval echo configure:4256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gdb_cv_c_long_long=yes *************** *** 4273,4277 **** echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 ! echo "configure:4276: checking for long long support in printf" >&5 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 4275,4279 ---- echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6 ! echo "configure:4278: checking for long long support in printf" >&5 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 4281,4285 **** else cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then gdb_cv_printf_has_long_long=yes --- 4297,4301 ---- } EOF ! if { (eval echo configure:4300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then gdb_cv_printf_has_long_long=yes *************** *** 4319,4328 **** echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6 ! echo "configure:4322: checking for long double support in compiler" >&5 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:4324: checking for long double support in compiler" >&5 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_long_double=yes --- 4333,4337 ---- ; return 0; } EOF ! if { (eval echo configure:4336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_long_double=yes *************** *** 4353,4357 **** echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 ! echo "configure:4356: checking for long double support in printf" >&5 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 4355,4359 ---- echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6 ! echo "configure:4358: checking for long double support in printf" >&5 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 4361,4365 **** else cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then gdb_cv_printf_has_long_double=yes --- 4373,4377 ---- } EOF ! if { (eval echo configure:4376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then gdb_cv_printf_has_long_double=yes *************** *** 4395,4399 **** echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 ! echo "configure:4398: checking for long double support in scanf" >&5 if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 4397,4401 ---- echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6 ! echo "configure:4400: checking for long double support in scanf" >&5 if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 4403,4407 **** else cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then gdb_cv_scanf_has_long_double=yes --- 4415,4419 ---- } EOF ! if { (eval echo configure:4418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then gdb_cv_scanf_has_long_double=yes *************** *** 4439,4453 **** ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:4442: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:4452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 4441,4455 ---- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:4444: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:4454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 4478,4487 **** do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:4481: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:4483: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" --- 4508,4512 ---- ; return 0; } EOF ! if { (eval echo configure:4511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" *************** *** 4531,4535 **** echo $ac_n "checking for working mmap""... $ac_c" 1>&6 ! echo "configure:4534: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 4533,4537 ---- echo $ac_n "checking for working mmap""... $ac_c" 1>&6 ! echo "configure:4536: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 4539,4543 **** else cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes --- 4681,4685 ---- EOF ! if { (eval echo configure:4684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes *************** *** 4708,4712 **** hpux*) echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 ! echo "configure:4711: checking for HPUX/OSF thread support" >&5 if test -f /usr/include/dce/cma_config.h ; then if test "$GCC" = "yes" ; then --- 4710,4714 ---- hpux*) echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6 ! echo "configure:4713: checking for HPUX/OSF thread support" >&5 if test -f /usr/include/dce/cma_config.h ; then if test "$GCC" = "yes" ; then *************** *** 4727,4731 **** solaris*) echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 ! echo "configure:4730: checking for Solaris thread debugging library" >&5 if test -f /usr/lib/libthread_db.so.1 ; then echo "$ac_t""yes" 1>&6 --- 4729,4733 ---- solaris*) echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6 ! echo "configure:4732: checking for Solaris thread debugging library" >&5 if test -f /usr/lib/libthread_db.so.1 ; then echo "$ac_t""yes" 1>&6 *************** *** 4737,4741 **** CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 ! echo "configure:4740: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 4739,4743 ---- CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 ! echo "configure:4742: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 4745,4749 **** LIBS="-ldl $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 4758,4762 ---- ; return 0; } EOF ! if { (eval echo configure:4761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 4788,4795 **** hold_ldflags=$LDFLAGS echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6 ! echo "configure:4791: checking for the ld -export-dynamic flag" >&5 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" cat > conftest.$ac_ext <&6 ! echo "configure:4793: checking for the ld -export-dynamic flag" >&5 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* found=yes --- 4800,4804 ---- ; return 0; } EOF ! if { (eval echo configure:4803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* found=yes *************** *** 4817,4821 **** # at one point. echo $ac_n "checking if is old""... $ac_c" 1>&6 ! echo "configure:4820: checking if is old" >&5 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 4819,4823 ---- # at one point. echo $ac_n "checking if is old""... $ac_c" 1>&6 ! echo "configure:4822: checking if is old" >&5 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 4823,4827 **** cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gdb_cv_proc_service_is_old=no --- 4836,4840 ---- ; return 0; } EOF ! if { (eval echo configure:4839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gdb_cv_proc_service_is_old=no *************** *** 4936,4939 **** --- 4938,4964 ---- + + # Check whether --enable-TDI or --disable-TDI was given. + if test "${enable_TDI+set}" = set; then + enableval="$enable_TDI" + case "${enableval}" in + yes) enable_TDI=yes ;; + no) enable_TDI=no ;; + *) { echo "configure: error: bad value ${enableval} given for TDI option" 1>&2; exit 1; } ;; + esac + fi + + + if test "${enable_TDI}" = "yes"; then + cat >> confdefs.h <<\EOF + #define TDI_SUPPORT 1 + EOF + + TDI_LIB=-lTDIClt + TDI_SFILES=pthread.c + + + fi + MMALLOC_CFLAGS= MMALLOC= *************** *** 4971,4975 **** TERM_LIB= echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 ! echo "configure:4974: checking for tgetent in -lncurses" >&5 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 4996,5000 ---- TERM_LIB= echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 ! echo "configure:4999: checking for tgetent in -lncurses" >&5 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 4979,4983 **** LIBS="-lncurses $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 5015,5019 ---- ; return 0; } EOF ! if { (eval echo configure:5018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 5009,5013 **** echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6 ! echo "configure:5012: checking for tgetent in -lHcurses" >&5 ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 5034,5038 ---- echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6 ! echo "configure:5037: checking for tgetent in -lHcurses" >&5 ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 5017,5021 **** LIBS="-lHcurses $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 5053,5057 ---- ; return 0; } EOF ! if { (eval echo configure:5056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 5047,5051 **** echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6 ! echo "configure:5050: checking for tgetent in -ltermlib" >&5 ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 5072,5076 ---- echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6 ! echo "configure:5075: checking for tgetent in -ltermlib" >&5 ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 5055,5059 **** LIBS="-ltermlib $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 5091,5095 ---- ; return 0; } EOF ! if { (eval echo configure:5094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 5085,5089 **** echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 ! echo "configure:5088: checking for tgetent in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 5110,5114 ---- echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 ! echo "configure:5113: checking for tgetent in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 5093,5097 **** LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 5129,5133 ---- ; return 0; } EOF ! if { (eval echo configure:5132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 5123,5127 **** echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 ! echo "configure:5126: checking for tgetent in -lcurses" >&5 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 5148,5152 ---- echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 ! echo "configure:5151: checking for tgetent in -lcurses" >&5 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 5131,5135 **** LIBS="-lcurses $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 5167,5171 ---- ; return 0; } EOF ! if { (eval echo configure:5170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 5161,5165 **** echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6 ! echo "configure:5164: checking for tgetent in -lterminfo" >&5 ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 5186,5190 ---- echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6 ! echo "configure:5189: checking for tgetent in -lterminfo" >&5 ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 5169,5173 **** LIBS="-lterminfo $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 5205,5209 ---- ; return 0; } EOF ! if { (eval echo configure:5208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 5224,5228 **** # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 ! echo "configure:5227: checking for X" >&5 # Check whether --with-x or --without-x was given. --- 5249,5253 ---- # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 ! echo "configure:5252: checking for X" >&5 # Check whether --with-x or --without-x was given. *************** *** 5286,5295 **** # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:5294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 5311,5320 ---- # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:5319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 5360,5364 **** LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" --- 5392,5396 ---- ; return 0; } EOF ! if { (eval echo configure:5395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" *************** *** 5599,5608 **** echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 ! echo "configure:5602: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:5627: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes --- 5640,5644 ---- ; return 0; } EOF ! if { (eval echo configure:5643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes *************** *** 5632,5641 **** test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 ! echo "configure:5635: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:5660: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes --- 5669,5673 ---- ; return 0; } EOF ! if { (eval echo configure:5672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes *************** *** 5663,5667 **** echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 ! echo "configure:5666: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 5688,5692 ---- echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 ! echo "configure:5691: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 5673,5680 **** echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= ! if { (eval echo configure:5676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in ! *.c | *.o | *.obj | *.ilk | *.pdb) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac --- 5698,5705 ---- echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= ! if { (eval echo configure:5701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in ! *.c | *.o | *.obj) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac *************** *** 5878,5881 **** --- 5903,5908 ---- s%@TUI_LIBRARY@%$TUI_LIBRARY%g s%@WARN_CFLAGS@%$WARN_CFLAGS%g + s%@TDI_LIB@%$TDI_LIB%g + s%@TDI_SFILES@%$TDI_SFILES%g s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g s%@MMALLOC@%$MMALLOC%g *************** *** 6161,6164 **** --- 6188,6203 ---- < Makefile > Makefile.tem mv -f Makefile.tem Makefile + + + + + + + + + + + + fi diff -C 2 -P -r gdb-4.18.ORIG/gdb/configure.in gdb-4.18/gdb/configure.in *** gdb-4.18/gdb/configure.in.orig Wed Apr 7 23:00:45 1999 --- gdb-4.18/gdb/configure.in Mon May 31 14:10:51 1999 *************** *** 386,389 **** --- 386,407 ---- AC_SUBST(WARN_CFLAGS) + dnl Thread Debug Interface (TDI) Support + + AC_ARG_ENABLE(TDI, + [ --enable-TDI ], + [case "${enableval}" in + yes) enable_TDI=yes ;; + no) enable_TDI=no ;; + *) AC_MSG_ERROR(bad value ${enableval} given for TDI option) ;; + esac]) + + if test "${enable_TDI}" = "yes"; then + AC_DEFINE(TDI_SUPPORT) + TDI_LIB=-lTDIClt + TDI_SFILES=pthread.c + AC_SUBST(TDI_LIB) + AC_SUBST(TDI_SFILES) + fi + MMALLOC_CFLAGS= MMALLOC= *************** *** 584,587 **** --- 602,617 ---- < Makefile > Makefile.tem mv -f Makefile.tem Makefile + + + + + + + + + + + + fi diff -C 2 -P -r gdb-4.18.ORIG/gdb/gdbpthread.h gdb-4.18/gdb/gdbpthread.h *** gdb-4.18.ORIG/gdb/gdbpthread.h Thu Jan 1 01:00:00 1970 --- gdb-4.18/gdb/gdbpthread.h Tue Apr 27 02:11:46 1999 *************** *** 0 **** --- 1,37 ---- + /* Thread Debugging on top of the TDI. + Copyright 1999 Daniel Schulz + + This file is part of GDB. + + 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 + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + + + /* - returns the id of the attached thread, if there is any * + * - if not, it return -1 */ + int gdbpthread_attached_thread(void); + + /* attaches a desired pthread */ + void pthread_attach_command(char*, int); + + /* detaches the current attached thread */ + void pthread_detach_command(char*, int); + + /* returns the current thread id */ + int pid_to_pthread_id(int); + + + + + diff -C 2 -P -r gdb-4.18.ORIG/gdb/infcmd.c gdb-4.18/gdb/infcmd.c *** gdb-4.18/gdb/infcmd.c.orig Wed Jan 6 04:06:21 1999 --- gdb-4.18/gdb/infcmd.c Mon May 31 14:10:51 1999 *************** *** 19,22 **** --- 19,27 ---- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + + /* configuration */ + #ifdef HAVE_CONFIG_H + #include "config.h" + #endif #include "defs.h" #include *************** *** 33,36 **** --- 38,44 ---- #include "language.h" #include "symfile.h" + #include "gdbthread.h" + #include "gdbpthread.h" + #include "objfiles.h" *************** *** 372,377 **** 0); } ! for (; count > 0; count--) { clear_proceed_status (); --- 380,389 ---- 0); } ! #if !TDI_SUPPORT for (; count > 0; count--) + #else + for (; count > 0; ) + #endif + { clear_proceed_status (); *************** *** 424,427 **** --- 436,455 ---- SHIFT_INST_REGS(); #endif + #if TDI_SUPPORT + { + int tId = -1; + /* conditional decrement of count */ + if ((tId=gdbpthread_attached_thread())==-1) + { + count--; /* the normal action */ + } + else + { + if (tId == pid_to_pthread_id(0 /* meaningless yet */)) + count--; + } + + } + #endif } *************** *** 1381,1384 **** --- 1409,1417 ---- } + #if TDI_SUPPORT + struct cmd_list_element *continue_cs_list=NULL; + #endif + + void _initialize_infcmd () *************** *** 1510,1513 **** --- 1543,1565 ---- add_com_alias("g", "g", class_run, 1); + #if TDI_SUPPORT + { + extern struct cmd_list_element *cmdlist; + + + add_prefix_cmd ("continue", class_run, continue_command, + "Continue program being debugged,after signal or breakpoint.\n\ + If proceeding from breakpoint, a number N may be used as an argument,\n\ + which means to set the ignore count of that breakpoint to N - 1 (so that\n\ + the breakpoint won't break until the Nth time it is reached).", + &continue_cs_list,"continue ",1,&cmdlist); + add_com_alias ("c", "cont", class_run, 1); + add_com_alias ("fg", "cont", class_run, 1); + + /* the -cs suffix is installed in pthread.c */ + + } + + #else /* normal behaviour */ add_com ("continue", class_run, continue_command, "Continue program being debugged, after signal or breakpoint.\n\ *************** *** 1517,1520 **** --- 1569,1575 ---- add_com_alias ("c", "cont", class_run, 1); add_com_alias ("fg", "cont", class_run, 1); + #endif + + add_com ("run", class_run, run_command, diff -C 2 -P -r gdb-4.18.ORIG/gdb/infrun.c gdb-4.18/gdb/infrun.c *** gdb-4.18/gdb/infrun.c.orig Mon Mar 1 05:51:53 1999 --- gdb-4.18/gdb/infrun.c Mon May 31 14:33:42 1999 *************** *** 33,36 **** --- 33,43 ---- #include "annotate.h" #include "symfile.h" /* for overlay functions */ + #if TDI_SUPPORT + extern int switch_off_signal_handling PARAMS ((void)); + extern int switch_on_signal_handling PARAMS ((void)); + extern int reissue_ignored_signals PARAMS ((int)); + #endif + + #include *************** *** 914,917 **** --- 921,947 ---- gdb_flush (gdb_stdout); + #if TDI_SUPPORT + /* if there is a signal based time slice scheduling done by the * + * POSIX thread implementation, we have to avoid scheduling * + * until all breakpoints are reset * + * problem: * + * - we resume to pass the breakpopint and reset it * + * - scheduling can happen between passing and resetting * + * - the new scheduled thread miss that breakpoint, because it * + * is not reset :-( * + * solution: * + * - the TDI aware POSIX thread impl has to provide a flag * + * that can be set by the debugger to avoid scheduling on * + * SIG[VT]ALRM or SIGPROF * + * - this flag is set while the breakpoint is not reset */ + + + + /* simply sets the don't-handle-schedsignal-flag */ + + switch_off_signal_handling(); + #endif + + /* Resume inferior. */ resume (oneproc || step || bpstat_should_step (), stop_signal); *************** *** 1140,1143 **** --- 1170,1195 ---- } + #if 0 /* this is for debugging */ + { + char out[100]; + + #define ON_CASE_SPRINT(out,msg) case msg: sprintf(out,#msg);break + + switch (w.kind) + { + ON_CASE_SPRINT(out,TARGET_WAITKIND_LOADED); + ON_CASE_SPRINT(out, TARGET_WAITKIND_SPURIOUS); + ON_CASE_SPRINT(out, TARGET_WAITKIND_EXITED); + ON_CASE_SPRINT(out, TARGET_WAITKIND_SIGNALLED); + ON_CASE_SPRINT(out, TARGET_WAITKIND_STOPPED); + default: + sprintf(out,"unknown"); + } + + printf_filtered("w4i: %s stop_pc: 0x%x\n",out,stop_pc); + + } + #endif + switch (w.kind) { *************** *** 1485,1488 **** --- 1537,1562 ---- remove_status = remove_breakpoints (); + + #if TDI_SUPPORT + /* if there is a signal based time slice scheduling done by the * + * POSIX thread implementation, we have to avoid scheduling * + * until all breakpoints are reset * + * problem: * + * - we resume to pass the breakpopint and reset it * + * - scheduling can happen between passing and resetting * + * - the new scheduled thread miss that breakpoint, because it * + * is not reset :-( * + * solution: * + * - the TDI aware POSIX thread impl has to provide a flag * + * that can be set by the debugger to avoid scheduling on * + * SIG[VT]ALRM or SIGPROF * + * - this flag is set while the breakpoint is not reset */ + + + + /* simply sets the don't-handle-schedsignal-flag */ + + switch_off_signal_handling(); + #endif /* Did we fail to remove breakpoints? If so, try to set the PC past the bp. (There's at least *************** *** 1509,1512 **** --- 1583,1604 ---- } + #if TDI_SUPPORT + /* the breakpoint reset should be finished */ + + /* we can switch on the signal handling in the * + * POSIX threads impl again */ + + switch_on_signal_handling(); + reissue_ignored_signals (0 /* no exception */ ); + + /* PTHREAD_TDI: * + * after calling a function in breakpoint_thread_match * + * breakpoints_inserted is set to 0, but this violates * + * breakpoints_inserted = 1 before bp_th_match */ + + /* this is always true after insert_breakpoints() */ + breakpoints_inserted = 1; + #endif /* TDI_SUPPORT */ + /* We need to restart all the threads now. */ target_resume (-1, 0, TARGET_SIGNAL_0); *************** *** 2790,2793 **** --- 2882,2902 ---- break; breakpoints_inserted = 1; + + #if TDI_SUPPORT + /* the breakpoint reset should be finished */ + + /* we can switch on the signal handling in the * + * POSIX threads impl again */ + + switch_on_signal_handling(); + reissue_ignored_signals (0 /* no exception */ ); + #endif + + + + + + + } diff -C 2 -P -r gdb-4.18.ORIG/gdb/pthread.c gdb-4.18/gdb/pthread.c *** gdb-4.18.ORIG/gdb/pthread.c Tue Nov 6 14:09:42 2000 --- gdb-4.18/gdb/pthread.c Mon Nov 6 18:42:08 2000 *************** *** 0 **** --- 1,1960 ---- + /* Thread Debugging on top of the TDI. + Copyright 1999 Daniel Schulz + + This file is part of GDB. + + 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 + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + + #include + #include + + + #if 1 /* for performance measurement */ + #include + #include + #endif + + /* configuration */ + #ifdef HAVE_CONFIG_H + #include "config.h" + #endif + + /* for command definition */ + #include "defs.h" + #include "command.h" + /* for object file searching (don't change order)*/ + #include "symtab.h" + #include "symfile.h" + #include "objfiles.h" + /* for error check macros */ + #include "target.h" + + #if TDI_SUPPORT /* is there a TDI-client library */ + + /* tdi definitions */ + #include "tdi.h" + + /* tdi usage */ + #include "tdi-client.h" + #endif /* TDI_SUPPORT */ + + /* breakpoint setting and related stuff */ + #include "breakpoint.h" + /* for stop_pc */ + #include "inferior.h" + + /* our include file */ + #include "gdbpthread.h" + + /* using gdb commands */ + #include "gdbcmd.h" + + + + + #ifndef ALL_BREAKPOINTS + #define ALL_BREAKPOINTS(b) for (b = breakpoint_chain; b; b = b->next) + #endif + + #define RETURN_IF_TDI_NOT_PRESENT { \ + if (!target_has_execution) { error("The program is not being run."); return;}\ + if (!pthread_package_installed()) { error("No POSIX thread package used.\n"); return;}\ + if (!pthread_server_installed()) { error("No TDI package linked.\n");return;}\ + } + + /* -------------- externals --------------- */ + + extern struct breakpoint * breakpoint_chain; + + /* -------------- globals ----------------- */ + + int current_attached_thread_nr=-1; + int pthread_disable_bps = 0; + + /* we only store numbers and bp's */ + struct bp_simple { + CORE_ADDR pc; + int number; + } no_simple_bp = { 0, 0}; + + #define NO_SIMPLE_BP no_simple_bp + + /* array of disabled breakpoints to hide * + * the control flow of other threads than * + * the attached thread */ + + struct bp_simple ptattach_saved_bps[BREAKPOINT_MAX]; + struct bp_simple ptcontcs_saved_bps[BREAKPOINT_MAX]; + struct bp_simple ptcontcs_bps_to_delete[BREAKPOINT_MAX]; + + /* Pthreads implementation profile: * + * - the debugger has to know about the cardinality ratio * + * between kernel an user level threads * + * - if there is an active TED thread, the debugger needs * + * it pid to signal a request */ + + struct Pthreads_Impl_Profile { + int K2UL_mapping; /* kernel level, pure user level * + * or mixed implementation */ + + pid_t TED_pid; /* the pid of the active TDI * + * thread (kernel and mixed only) */ + + int sched_signal; /* signal generated to cause a * + * user level context switch * + * (used to implement round robin)*/ + + struct minimal_symbol* SigIgnore; /* sigignore symbol * + + /* symbol for the sigset of ignored signals */ + struct minimal_symbol* IgnoredSigSet; + + } Current_Pthreads_Impl_Profile; + + + /* forward declaration */ + struct command_line* pthread_build_command_stack(char** commands); + static void print_thread_stack (char *arg,int from_tty); + + /* command implementation */ + static void TDI_info_pthreads_command (char *arg,int from_tty); + static void TDI_info_pmutex_command (char *arg,int from_tty); + static void TDI_info_pcond_command (char *arg,int from_tty); + static void TDI_raw_request (char *arg,int from_tty); + + void pthread_suspend_command(char *arg,int from_tty); + void pthread_resume_command (char *arg,int from_tty); + + /* auxiliary functions */ + char* TdiPrintState(int,char*); + char* TdiPrintEntry(int,char*,unsigned length); + + /* signal prevention and reissue functions */ + int reissue_ignored_signals(int); + int switch_on_signal_handling(void); + int switch_off_signal_handling(void); + + /* signal the TED to process our query */ + int TDI_signal(ThreadDebugInterfaceT* TdiPtr); + + /* cleanup handler for subsequent runs */ + void TDI_cleanup_at_start(); + + /* is there a TDI or pthread package installed */ + int pthread_package_installed(void); + int pthread_server_installed(void); + + + /* ----------------------------------------------- * + * function definitions * + * ----------------------------------------------- */ + + + /* attach and detach the control flow af a thread */ + void + pthread_attach_command(arg, from_tty) + char *arg; + int from_tty; + { + + #if TDI_SUPPORT + + int desired_thread_number = -1; /* given in hex or dec */ + char TDIRequest[100]; /* from TDI.receive */ + char *result=NULL; /* from TDI.receive */ + int length=0; /* from TDI.receive */ + + struct symtab_and_line sal; + int new_pc; + int saved_breaks=0; + struct breakpoint *bp, *tmp_bp; + + + RETURN_IF_TDI_NOT_PRESENT; + + #ifdef PTHREAD_TDI_DEBUG + printf_filtered("pthread_attach_command\n"); + #endif + + /* ensure a cleanup at next run */ + make_run_cleanup(pthread_detach_command,NULL); + + /* algorithm: + * i ) if the thread is attached or an error situation is given, return + * ii ) if another thread is attached, detach it + * iii) get the nextpc (NPC) of the desired thread (TDI query) + * iv ) disable all breakpoints not associated with that thread + * v ) set a temporary breakpoint at NPC for the desired thread + * vi ) attach the following commands to the breakpoint: + * - info printing + * - set global thread_specific flag + */ + + /* extract the thread number from arg */ + + if (!strlen(arg?arg:"")) { + error("Please specify a thread to attach.\n"); + } + + #ifdef PTHREAD_TDI_DEBUG + printf("arg is: \"%s\"\n",arg); + #endif + + if ((strlen(arg) > 2)?(arg[0]=='0' && arg[1]=='x'):0) { + sscanf(&arg[2],"%x",&desired_thread_number); + } + else { + desired_thread_number = atoi(arg); + } + #ifdef PTHREAD_TDI_DEBUG + printf_filtered("Attach would choose thread %d (0x%x)\n",desired_thread_number,desired_thread_number); + #endif + + if (current_attached_thread_nr == desired_thread_number) { + error ("(TDI) Thread already attached.\n"); + return; + } + + /* disable all breakpoints not associated with that thread and * + * save them for a detach */ + + ALL_BREAKPOINTS(tmp_bp) { + if ((tmp_bp->pthread != desired_thread_number) && + (tmp_bp->enable != disabled)) { + /* diasable it and push it to the stack */ + tmp_bp ->enable = disabled; + ptattach_saved_bps[saved_breaks].pc = tmp_bp->address; + ptattach_saved_bps[saved_breaks].number = tmp_bp->number; + saved_breaks++; + } + } + + /* if the desired thread is'nt the current thread, we have to * + * catch him */ + + if (pid_to_pthread_id(inferior_pid) != desired_thread_number) + { + + + /* get the NPC of that thread: * + * TDI-request: "aq.*: newpc : id==" */ + + sprintf(TDIRequest,"!thread: newpc: id==%d",desired_thread_number); + + TDI.send(&TDI,TDIRequest,strlen(TDIRequest)); + + if (switch_off_signal_handling()==TDI_ERROR) + { + error("error: Switching off signal handling failed.\n"); + return; + } + + TDI_signal(&TDI); + + if (switch_on_signal_handling()==TDI_ERROR) + { + error("warning: Switching on signal handling failed.\n"); + } + + if (reissue_ignored_signals(0)==TDI_ERROR) + { + error("warning: Unable to reissue ignored signals.\n"); + } + + TDI.receive(&TDI,&result,&length); + + if (TDI.error(&TDI,result)) { + error("could not retrieve the NPC.\n"); + return; + }; + + #ifdef PTHREAD_TDI_DEBUG + printf("newpc: %s\n",result); + #endif + + + /* set a temporary breakpoint at NPC (thread) */ + + sscanf(result,"%x",&new_pc); + free(result); + + sal = find_pc_line(new_pc,0); + bp = set_momentary_breakpoint(sal,NULL,bp_breakpoint); + bp->address = new_pc; + bp->disposition = del; /* temporary */ + bp->pthread = desired_thread_number; + bp->thread = -1; + + /* attach the following commands to the bp */ + { + char* commands[2]; + char attach_msg[100]; + + sprintf(attach_msg,"echo \\n(TDI) Thread %d attached:\\n",desired_thread_number); + + commands[0]=attach_msg; + commands[1]=NULL; + + bp->commands = pthread_build_command_stack(commands); + } + + #ifdef PTHREAD_TDI_DEBUG + printf("Breakpoint set with number %d\n",bp->number); + #endif + /* register the thtread */ + current_attached_thread_nr = desired_thread_number; + + /* call continue_command */ + execute_command("continue",from_tty); + + return; + } + + /* register the thtread */ + current_attached_thread_nr = desired_thread_number; + + #endif /* TDI_SUPPORT */ + + } + + void + pthread_detach_command(arg, from_tty) + char *arg; + int from_tty; + + { + + #if TDI_SUPPORT + + int i=0; + struct breakpoint* bp; + + + #ifdef PTHREAD_TDI_DEBUG + printf_filtered("pthread_detach_command\n"); + #endif + + /* steps to do: * + * i ) unset the current_attached_thread_nr * + * ii) restore the old bp's */ + + current_attached_thread_nr = -1; + + /* FIXME: if a user deletes a bp during the attach phase * + * this can cause non deterministic behavior in restore */ + + for (i=0;inumber == ptattach_saved_bps[i].number && + bp->address == ptattach_saved_bps[i].pc) + { + #ifdef PTHREAD_TDI_DEBUG + printf_filtered ("(TDI) enabling bp %d\n",bp->number); + #endif + bp->enable=enabled; + ptattach_saved_bps[i] = NO_SIMPLE_BP; + } + } + } + + #endif /* TDI_SUPPORT */ + + } + + /* ------------------------------------------------------ * + * * + * provided commands * + * * + * ------------------------------------------------------ */ + + static void + TDI_info_pthreads_command (char *arg,int from_tty) + { + + #if TDI_SUPPORT + + char *result,*tupel; /* the response table and tupels */ + int length,firstToken=1,i; + char* item[10]; /* tupel items */ + int intVal; /* frequently used to scan hex values */ + + + RETURN_IF_TDI_NOT_PRESENT; + + for (i = 0; i < 10; i++) + item[i] = (char*)xmalloc(30); + + /* send the request string */ + TDI_MSG("TDI send.\n"); + TDI.send(&TDI, + "!thread: id,pid,addr,prio,entry,earg,mbo,cvwf,state,rstate", + strlen("!thread: id,pid,addr,prio,entry,earg,mbo,cvwf,state,rstate")); + + /* signal the TED */ + if (switch_off_signal_handling()==TDI_ERROR) + { + error("error: Switching off signal handling failed.\n"); + return; + } + + TDI_signal(&TDI); + + if (switch_on_signal_handling()==TDI_ERROR) + { + error("warning: Switching on signal handling failed.\n"); + } + + if (reissue_ignored_signals(0)==TDI_ERROR) + { + error("warning: Unable to reissue ignored signals.\n"); + } + + + /* receive the result */ + TDI_MSG("TDI receive.\n"); + TDI.receive(&TDI,&result,&length); + + printf_filtered("(POSIX Threads) thread information:\n" + "\n Id Pid Addr Prio entry entry_arg MBO CVWF State RState\n"); + + while (tupel=(char*)strtok((firstToken)?result:(char*)0, "#")) { + + /* because of possible NULL's we have to process every item */ + + /* we can't use strtok to split the item list */ + sscanf(tupel,"%s%s%s%s%s%s%s%s%s%s", + item[0], /* id */ + item[1], /* pid */ + item[2], /* addr */ + item[3], /* prio */ + item[4], /* entry */ + item[5], /* earg */ + item[6], /* mbo */ + item[7], /* cvwf */ + item[8], /* state */ + item[9] /* rstate */ + ); + + #define IF_NOT_NULL(item,fmt) if (!strcmp(item,"?")) {printf_filtered(fmt,"?");} else + + /* id */ + IF_NOT_NULL(item[0],"%4s ") + { + sscanf(item[0],"%x",&intVal); printf_filtered("%4d ",intVal); + } + /* pid */ + IF_NOT_NULL(item[1],"%4s ") + { + sscanf(item[1],"%x",&intVal); printf_filtered("%4d ",intVal); + } + /* addr */ + IF_NOT_NULL(item[2],"%8s ") + { + sscanf(item[2],"%x",&intVal); printf_filtered("0x%-8x ",intVal); + } + /* prio */ + IF_NOT_NULL(item[3],"%3s ") + { + sscanf(item[3],"%x",&intVal); printf_filtered("%3d ",intVal); + } + /* entry */ + IF_NOT_NULL(item[4],"%15s ") + { + sscanf(item[4],"%x",&intVal); + printf_filtered("%15s ",TdiPrintEntry(intVal,item[4],15)); + } + /* earg */ + IF_NOT_NULL(item[5],"(%6s ) ") + { + sscanf(item[4],"%x",&intVal); printf_filtered("(0x%-8x) ",intVal); + } + /* mbo */ + IF_NOT_NULL(item[6],"%3s ") + { + printf_filtered("%3.3s ",(!strcmp(item[6],"0"))?"-":item[6]); + } + /* cvwf */ + IF_NOT_NULL(item[7],"%3s ") + { + printf_filtered("%3.3s ",(!strcmp(item[7],"0"))?"-":item[7]); + } + /* state */ + IF_NOT_NULL(item[8],"%5s ") + { + sscanf(item[8],"%x",&intVal); + printf_filtered("%7.7s ",TdiPrintState(intVal,item[8])); + } + /* rstate */ + IF_NOT_NULL(item[9],"[0x%x]\n") + { + sscanf(item[9],"%x",&intVal); + printf_filtered("[0x%x]\n",intVal); + } + + /* the next token is definitely not the first */ + firstToken=0; + } + + for (i = 0; i < 10; i++) + free(item[i]); + + free(result); + + #endif /* TDI_SUPPORT */ + } + + static void + TDI_info_pmutex_command (char *arg,int from_tty) + { + + #if TDI_SUPPORT + + char *result,*tupel; + int length,firstToken=1; + char StateString[10]; + char EntryString[15]; + char MBOString[10]; + + int Id=0, Addr=0; + char *Owner = MBOString; + + RETURN_IF_TDI_NOT_PRESENT; + + /* send the request string */ + TDI_MSG("TDI send.\n"); + TDI.send(&TDI, + "!mutex: id,addr,owner", + strlen("!mutex: id,addr,owner")); + + /* signal the TED */ + if (switch_off_signal_handling()==TDI_ERROR) + { + error("error: Switching off signal handling failed.\n"); + return; + } + + TDI_signal(&TDI); + + if (switch_on_signal_handling()==TDI_ERROR) + { + error("warning: Switching on signal handling failed.\n"); + } + + if (reissue_ignored_signals(0)==TDI_ERROR) + { + error("warning: Unable to reissue ignored signals.\n"); + } + + + /* receive the result */ + TDI_MSG("TDI receive.\n"); + TDI.receive(&TDI,&result,&length); + + + printf_filtered("(POSIX Threads) mutex information:\n" + "\n ID Addr OwnerID\n"); + + while (tupel=(char*)strtok((firstToken)?result:(char*)0, "#")) { + + sscanf(tupel,"%x%x%s",&Id,&Addr,Owner); + printf_filtered("%3d 0x%-12x %s\n", + Id, + Addr, + (!strcmp("0",Owner))?"-":Owner); + + firstToken=0; + } + + free(result); + + #endif /* TDI_SUPPORT */ + + } + + static void + TDI_info_pcond_command (char *arg,int from_tty) + { + + #if TDI_SUPPORT + char *result,*tupel; + int length,firstToken=1; + char StateString[10]; + char EntryString[15]; + char MutexString[10]; + + + int Id=0, Addr=0; + char *Mutex = MutexString; + + RETURN_IF_TDI_NOT_PRESENT; + + /* send the request string */ + TDI_MSG("TDI send.\n"); + TDI.send(&TDI, + "!cond: id,addr,cmutex", + strlen("!cond: id,addr,cmutex")); + + /* signal the TED */ + if (switch_off_signal_handling()==TDI_ERROR) + { + error("error: Switching off signal handling failed.\n"); + return; + } + + TDI_signal(&TDI); + + if (switch_on_signal_handling()==TDI_ERROR) + { + error("warning: Switching on signal handling failed.\n"); + } + + if (reissue_ignored_signals(0)==TDI_ERROR) + { + error("warning: Unable to reissue ignored signals.\n"); + } + + + /* receive the result */ + TDI_MSG("TDI receive.\n"); + TDI.receive(&TDI,&result,&length); + + + printf_filtered("(POSIX Threads) condition variables information:\n" + "\n ID Addr MutexID\n"); + + while (tupel=(char*)strtok((firstToken)?result:(char*)0, "#")) { + + sscanf(tupel,"%x%x%s",&Id,&Addr,Mutex); + printf_filtered("%3d 0x%-12x %s\n", + Id, + Addr, + (!strcmp("0",Mutex))?"-":Mutex); + + firstToken=0; + } + + free(result); + + #endif /* TDI_SUPPORT */ + + } + + static void + pthread_after_sched_command(char *arg,int from_tty) + { + int i=0,commIndex=0; + struct breakpoint* bp; + int ourBpNum,oldThreadNum; /* argument values */ + int newThreadNum = 0; + + char delete_command[100]; /* this command will be executed * + * to delete the sched bp's */ + int to_delete = 0; /* anything to delete? */ + + + /* this action is executed only once, but installed * + * for multiple threads */ + + /* we enable temporary disabled breakpoints */ + + if (pthread_disable_bps) { + for (i=0;inumber == ptcontcs_saved_bps[i].number && + bp->address == ptcontcs_saved_bps[i].pc) + { + #ifdef PTHREAD_TDI_DEBUG + printf_filtered ("(TDI) enabling bp %d\n",bp->number); + #endif + bp->enable=enabled; + ptcontcs_saved_bps[i] = NO_SIMPLE_BP; + } + } + } + } + + /* probably called by the run cleanup */ + if (!target_has_execution) + return; + + RETURN_IF_TDI_NOT_PRESENT; + + /* determine the current thread id*/ + + newThreadNum = pid_to_pthread_id(inferior_pid); + + /* scan the number of the current hit bp and the old thread id */ + + sscanf(arg,"%d %d",&ourBpNum,&oldThreadNum); + + + /* it is possible, that this bp was hit by the thread that was * + * active before continue */ + + if (oldThreadNum == newThreadNum) { + error("fatal: this bp was not set for this thread"); + } + + + /* we delete all other bp's */ + sprintf(delete_command,"delete"); + commIndex = strlen(delete_command); + + for (i=0;inumber == ptcontcs_bps_to_delete[i].number && + bp->number != ourBpNum /* not this bp, * + * it's deleting itself now */ + && + bp->address == ptcontcs_bps_to_delete[i].pc) + { + sprintf(&delete_command[commIndex]," %d",bp->number); + commIndex += strlen(&delete_command[commIndex]); + ptcontcs_bps_to_delete[i] = NO_SIMPLE_BP; + to_delete = 1; + } + } + } + + /* execute it */ + if (to_delete) + execute_command(delete_command,from_tty); + + + /* user info */ + printf_filtered("context switch [OldID %d] -> [NewID %d]\n", + oldThreadNum, + newThreadNum); + + + } + + static void + pthread_continue_cs_command_common(char *arg,int from_tty,int disable_bps) + { + + #define CCS_BP_START_NUMBER -500 + + char *result=NULL,*tupel=NULL; + int length=0; + int firstToken; + int saved_breaks=0; + int dispo_breaks=0; + CORE_ADDR new_pc = 0; + struct symtab_and_line sal; + struct breakpoint *bp, *tmp_bp; + int currentThreadID = pid_to_pthread_id(inferior_pid); + + /* error handling */ + RETURN_IF_TDI_NOT_PRESENT; + + /* get all pc's except current */ + + + /* the TDI geneartes a set like result (no duplicates) to * + * avoid setting breakpoints multiple times */ + + /* FIXME: this works only on uniprocessors, because there * + * is only one thread on the CPU * + * */ + + make_run_cleanup(pthread_after_sched_command,NULL); + + TDI.send(&TDI, + "thread:newpc: state!=1", + strlen("thread:newpc: state!=1")); + + /* possible solution for SMP machines: * + * - multiple CPU's can only be used by kernel threads * + * - every kernel thread is identified by Pid or LWP-Id * + * -> new selection: * + * ("!thread: sp,newpc: pid != %d",inferior_pid) * + * - the kernel thread that has reached the last * + * breakpoint has the PID==inferior_pid * + * - if mixed implementations are used (Solaris LWP), TED * + * should provide the thread attribute LWP * + * -> new selection: * + * ("!thread: sp,newpc: lwp != %d",StopLWP) * + * */ + + /* signal the TED */ + if (switch_off_signal_handling()==TDI_ERROR) + { + error("error: Switching off signal handling failed.\n"); + return; + } + + TDI_signal(&TDI); + + if (switch_on_signal_handling()==TDI_ERROR) + { + error("warning: Switching on signal handling failed.\n"); + } + + if (reissue_ignored_signals(0)==TDI_ERROR) + { + error("warning: Unable to reissue ignored signals.\n"); + } + + + /* receive the result */ + TDI_MSG("TDI receive.\n"); + TDI.receive(&TDI,&result,&length); + + if (TDI.error(&TDI,result)) + { + error("could not retrieve the NPC's.\n"); + return; + } + + /* to do now: + * - temporarily disable all active breakpoints + * - setting breakpoint's for all given NPC's + * - install an action for all breakpoints, + * that enables the disabled bp's and clears + * the bp's not hit + */ + + /* disable all active breakpoints */ + + if (pthread_disable_bps = disable_bps) { + ALL_BREAKPOINTS(tmp_bp) { + if (tmp_bp->enable != disabled) { + /* diasable it and push it to the stack */ + tmp_bp ->enable = disabled; + ptcontcs_saved_bps[saved_breaks].pc = tmp_bp->address; + ptcontcs_saved_bps[saved_breaks].number = tmp_bp->number; + saved_breaks++; + } + } + } + + + /* set breakpoints on all potential sched-points */ + + firstToken = 1; + + while (tupel=(char*)strtok((firstToken)?result:(char*)0, "#")) { + + /* attached actions */ + char* commands[3]; /* one command, one terminator */ + char ccs_command[100]; /* the command string */ + + /* get the pc */ + sscanf(tupel,"%x",&new_pc); + + /* set the breakpoint and register the action */ + sal = find_pc_line(new_pc,0); + bp = set_momentary_breakpoint(sal,NULL,bp_breakpoint); + bp->address = new_pc; + + /* this means to explicitly not stop at this thread */ + bp->pthread_complement_flag = 1; + bp->pthread = currentThreadID; + + bp->disposition = del; /* temporary */ + + bp->thread = -1; + bp->number = CCS_BP_START_NUMBER-dispo_breaks; + + ptcontcs_bps_to_delete[dispo_breaks].pc = bp->address; + ptcontcs_bps_to_delete[dispo_breaks].number = bp->number; + dispo_breaks++; + + sprintf(ccs_command,"ptaftersched %d %d",bp->number,currentThreadID); + + commands[0]=ccs_command; + commands[1]=NULL; + + /* install this action */ + bp->commands = pthread_build_command_stack(commands); + + /* the next token is'nt the first */ + firstToken = 0; + } + + execute_command("continue",from_tty); + + } + + static void + pthread_continue_minus_cs_command(char *arg,int from_tty) + { + pthread_continue_cs_command_common(arg, from_tty, 1); + } + + static void + pthread_continue_plus_cs_command(char *arg,int from_tty) + { + pthread_continue_cs_command_common(arg, from_tty, 0); + } + + #ifdef TEST_MEASUREMENT + /* performance test */ + void tdi_measure_print_diff(tv_start,tv_end); + #endif + + static void + TDI_raw_request(char *arg,int from_tty) + { + + #if TDI_SUPPORT + + + /* locals */ + char *result=NULL,*tuple=NULL; + int length=0,index=0; + int firstToken = 1; + #ifdef TEST_MEASUREMENT + struct timeval tv_start = {0L,0L},tv_end = {0L,0L}; + #endif + + /* error handling */ + RETURN_IF_TDI_NOT_PRESENT; + + /* debug message */ + printf_filtered("TDI request: \"%s\"\n",arg); + + #ifdef TEST_MEASUREMENT + /* get start time */ + gettimeofday(&tv_start,NULL); + #endif + + /* send the request string */ + TDI_MSG("TDI send.\n"); + TDI.send(&TDI,arg,strlen(arg)); + + /* signal the TED */ + if (switch_off_signal_handling()==TDI_ERROR) + { + error("error: Switching off signal handling failed.\n"); + return; + } + + TDI_signal(&TDI); + + if (switch_on_signal_handling()==TDI_ERROR) + { + error("warning: Switching on signal handling failed.\n"); + } + + if (reissue_ignored_signals(0)==TDI_ERROR) + { + error("warning: Unable to reissue ignored signals.\n"); + } + + + /* receive the result */ + TDI_MSG("TDI receive.\n"); + TDI.receive(&TDI,&result,&length); + + #ifdef TEST_MEASUREMENT + /* get time */ + gettimeofday(&tv_end,NULL); + #endif + + while (tuple=(char*)strtok((firstToken)?result:(char*)0, "#")) { + index++; + + printf_filtered("tuple[%-3d] %s\n",index,tuple); + + /* the next token is definitely not the first */ + firstToken=0; + } + + free(result); + + #ifdef TEST_MEASUREMENT + /* print the result */ + tdi_measure_print_diff(&tv_start,&tv_end); + #endif + + #endif /* TDI_SUPPORT */ + + } + + #ifdef TEST_MEASUREMENT + static void smartGDB_like_info (char*,int); + #endif + + _initialize_pthreads() { + + #if TDI_SUPPORT + /* external definition in infcmd.c */ + extern struct cmd_list_element *continue_cs_list; + + /* we have to initialize the TDI */ + TDI.init(&TDI); + + /* make the provided commands visible */ + add_com ("ptattach", class_run, pthread_attach_command, + "Attach to a thread (POSIX) inside this process."); + + add_com ("ptdetach", class_run, pthread_detach_command, + "Detach from a previously attached thread (POSIX)\n" + "inside this process."); + + add_com ("ptstack",class_trace,print_thread_stack,"print the stack\ + of a desired thread\n"); + + add_com ("ptsuspend",class_run, pthread_suspend_command, + "Suspend the desired POSIX thread\n"); + + add_com ("ptresume", class_run, pthread_resume_command, + "Resume the desired (previously suspended) thread.\n"); + + add_com ("ptaftersched", class_run, pthread_after_sched_command, + "don't use this command!\n"); + + + add_info ("pthreads",TDI_info_pthreads_command, + "infos about currently known threads."); + + #ifdef TEST_MEASUREMENT + add_info ("smart",smartGDB_like_info, + "infos about currently known threads."); + #endif + + add_info ("pmutex",TDI_info_pmutex_command, + "infos about currently known mutexes."); + + add_info ("pcond",TDI_info_pcond_command, + "infos about currently known conditon variables."); + + add_com ("tdi",class_trace,TDI_raw_request, + "Direct TDI access for the Gdb user.\n" + "usage: tdi \n" + "all TDI requests are prefixed with \"\"\n" + "example: ,,tdi thread:id,prio,state:prio<10'' yields\n" + "the id prio and state of all threads with a prio less than 10."); + + /* continue -cs */ + + add_cmd("-cs", class_run, pthread_continue_minus_cs_command, + "something happens at context switch.",&continue_cs_list); + + add_cmd("-addcs", class_run, pthread_continue_plus_cs_command, + "something happens at context switch.",&continue_cs_list); + + + #endif /* TDI_SUPPORT */ + + } + + + int bp_th_match_func_invoked = 0; + + int + pid_to_pthread_id(int pid) { + + #if TDI_SUPPORT + + /* using the TDI */ + char *result=NULL; + int length=0; + int ThreadId = 0; + struct frame_info *saved_selected_frame = selected_frame; + int saved_selected_frame_level = selected_frame_level; + + RETURN_IF_TDI_NOT_PRESENT; + + bp_th_match_func_invoked++; + + /* current thread */ + + switch (Current_Pthreads_Impl_Profile.K2UL_mapping) { + case K2UL_ONE_TO_ONE: + { + /* the id of the current thread is the process * + * id returned by wait */ + return pid; + } + break; + + case K2UL_ONE_TO_MANY: + { + /* because TDI.send probably calls a target function, we set the * + * selected frame now to avoid confusing errors in * + * restore_selected_frame */ + + select_frame(get_current_frame(),0); + + /* this works only on uniprocessor machines */ + + TDI.send(&TDI,"!thread: id: state == 1", + strlen("!thread: id: state == 1")); + + bp_th_match_func_invoked++; + + /* signal the TED */ + if (switch_off_signal_handling()==TDI_ERROR) + { + error("error: Switching off signal handling failed.\n"); + return; + } + + TDI_signal(&TDI); + + if (switch_on_signal_handling()==TDI_ERROR) + { + error("warning: Switching on signal handling failed.\n"); + } + + if (reissue_ignored_signals(0)==TDI_ERROR) + { + error("warning: Unable to reissue ignored signals.\n"); + } + + + + TDI.receive(&TDI,&result,&length); + + /* to avoid further confusing errors caused by the above fix, we * + * clean up our trace */ + select_frame(saved_selected_frame,saved_selected_frame_level); + + + bp_th_match_func_invoked = 0; + + sscanf(result,"%x",&ThreadId); + + if (result) + free(result); + + return ThreadId; + } + break; + default: + return 0; + } + + + + #else + + return 0; + + #endif /* TDI_SUPPORT */ + + } + + int + gdbpthread_attached_thread(void) + { + return current_attached_thread_nr; + } + + + + + /* ############################################################ * + * UTILITIES: * + * - checking against a thread package * + * (search for pthread_init) * + * - checking against the server side tdi package * + * ############################################################ */ + + + /* check against an installed pthread package */ + + int + pthread_package_installed () { + + struct objfile *ofp = object_files; + struct minimal_symbol *m= NULL; + + ALL_OBJFILES(ofp) + ALL_OBJFILE_MSYMBOLS(ofp, m){ + + /* pthread_create seems to be a solid part of the * + * POSIX 1003.1c */ + + if (!strcmp("pthread_create", SYMBOL_NAME(m))) return 1; + } + + return 0; + } + + /* check against a loaded TDI library */ + + int + pthread_server_installed () { + struct objfile *ofp = object_files; + struct minimal_symbol *m= NULL; + + #if defined(__sun__) && !defined(__svr4__) + /* + * SunOS 4.1.x does not export symbols for shared libs -> check impossible + */ + return 1; + #else + ALL_OBJFILES(ofp) + ALL_OBJFILE_MSYMBOLS(ofp, m){ + + /* this is a symbol, that has to be part of the TDI kernel */ + if (!strcmp("TdiAccessPreCompile", SYMBOL_NAME(m))) return 1; + } + + return 0; + #endif + } + + /* check for pthread_init; if present, assume static linking */ + + int pthread_init_installed () { + struct objfile *ofp = object_files; + struct minimal_symbol *m= NULL; + + ALL_OBJFILES(ofp) + ALL_OBJFILE_MSYMBOLS(ofp, m) + if (!strcmp("pthread_init", SYMBOL_NAME(m))) + return 1; + + return 0; + } + + + struct command_line* + pthread_build_command_stack(char** commands) { + int i = 0; + struct command_line* cmd_stack_base = NULL; + struct command_line* cmd_stack_pos = NULL; + struct command_line* cmd_stack_last = NULL; + + if (!commands) + return NULL; + + for (i=0;commands[i];i++) { + if (!*commands[i]) break; + + cmd_stack_last = cmd_stack_pos; + cmd_stack_pos=(struct command_line*)xmalloc(sizeof(struct command_line)); + + if (cmd_stack_last) + cmd_stack_last->next=cmd_stack_pos; + + if (!i) /* get the stack base */ + cmd_stack_base = cmd_stack_pos; + #ifdef PTHREAD_TDI_DEBUG + printf("add command[%d]: \"%s\" value: 0x%x\n",i,commands[i],*commands[i]); + #endif + cmd_stack_pos->line = savestring(commands[i],strlen(commands[i])); + cmd_stack_pos->control_type = simple_control; + cmd_stack_pos->body_count = 0; + cmd_stack_pos->body_list = NULL; + cmd_stack_pos->next=NULL; + } + + return cmd_stack_base; + }; + + + void + print_thread_stack (arg,from_tty) + char *arg; + int from_tty; + { + #if TDI_SUPPORT + int desired_thread_number=-1; + char TDIRequest[100]; /* from TDI.receive */ + char *result=NULL; /* from TDI.receive */ + int length=0; /* from TDI.receive */ + struct frame_info *o_frame, *n_frame; + + + CORE_ADDR pc,sp; + + RETURN_IF_TDI_NOT_PRESENT; + + if (!strlen(arg?arg:"")) { + error("Please specify a thread.\n"); + } + + + if ((strlen(arg) > 2)?(arg[0]=='0' && arg[1]=='x'):0) { + sscanf(&arg[2],"%x",&desired_thread_number); + } + else { + desired_thread_number = atoi(arg); + } + + /* if the current thread is desired, only do a where */ + + if (desired_thread_number == pid_to_pthread_id(inferior_pid)) + { + printf_filtered("Thread %d: sp: 0x%x pc: 0x%x\n", + desired_thread_number, + read_sp(), + read_pc()); + execute_command("where", from_tty); + return; + } + + + /* now we try to get the PC and the SP of * + * the desired thread */ + + sprintf(TDIRequest,"!thread: newpc,sp: id==%d", desired_thread_number); + + TDI.send(&TDI,TDIRequest,strlen(TDIRequest)); + + /* signal the TED */ + if (switch_off_signal_handling()==TDI_ERROR) + { + error("error: Switching off signal handling failed.\n"); + return; + } + + TDI_signal(&TDI); + + if (switch_on_signal_handling()==TDI_ERROR) + { + error("warning: Switching on signal handling failed.\n"); + } + + if (reissue_ignored_signals(0)==TDI_ERROR) + { + error("warning: Unable to reissue ignored signals.\n"); + } + + + TDI.receive(&TDI,&result,&length); + + sscanf(result,"%x%x",&pc,&sp); + free(result); + + printf_filtered("Thread %d: sp: 0x%x pc: 0x%x\n", + desired_thread_number, + sp, + pc); + + /* set current_frame */ + + o_frame = get_current_frame(); + + // flush_cached_frames (); + registers_changed (); + stop_pc = pc; + + n_frame = create_new_frame(sp,pc); + set_current_frame(n_frame); + select_frame(n_frame,0); + + execute_command("where", from_tty); + + // flush_cached_frames (); + registers_changed (); + stop_pc = read_pc(); + + set_current_frame(o_frame); + select_frame(get_current_frame(), 0); + + flush_cached_frames (); + + #endif /* TDI_SUPPORT */ + + } + + void + pthread_suspend_resume_command (arg,from_tty,mode /* 0 - suspend, + * 1 - resume */) + char *arg; + int from_tty; + int mode; + { + #if TDI_SUPPORT + char request[100]; /* the request */ + char *result = NULL; /* the result (meaningless) */ + int desired_thread_number=0; /* thread desired */ + int length=0; + + RETURN_IF_TDI_NOT_PRESENT; + + if (!strlen(arg?arg:"")) { + error("Please specify a thread.\n"); + return; + } + + /* hex or int specified thread */ + + if ((strlen(arg) > 2)?(arg[0]=='0' && arg[1]=='x'):0) { + sscanf(&arg[2],"%x",&desired_thread_number); + } + else { + desired_thread_number = atoi(arg); + } + + /* form the request */ + sprintf(request,"thread:state=%d:id==%d", + (mode==0)? + TDI_BLOCKED_S_STATE /* suspend state */ + :TDI_READY_STATE, /* ready state */ + desired_thread_number); + + printf_filtered("(POSIX TDI) Sending request: \"%s\"\n",request); + + TDI.send(&TDI,request,strlen(request)); + + /* signal the TED */ + if (switch_off_signal_handling()==TDI_ERROR) + { + error("error: Switching off signal handling failed.\n"); + return; + } + + TDI_signal(&TDI); + + if (switch_on_signal_handling()==TDI_ERROR) + { + error("warning: Switching on signal handling failed.\n"); + } + + if (reissue_ignored_signals(0)==TDI_ERROR) + { + error("warning: Unable to reissue ignored signals.\n"); + } + + /* we have to confirm */ + + TDI.receive(&TDI,&result,&length); + + printf_filtered("(POSIX TDI) Result: %s\n",result); + + if (result) + free(result); + + #endif /* TDI_SUPPORT */ + } + + void + pthread_resume_command (arg,from_tty) + char *arg; + int from_tty; + { + #if TDI_SUPPORT + pthread_suspend_resume_command(arg,from_tty,1); + #endif /* TDI_SUPPORT */ + } + + void + pthread_suspend_command (arg,from_tty) + char *arg; + int from_tty; + { + #if TDI_SUPPORT + pthread_suspend_resume_command(arg,from_tty,0); + #endif /* TDI_SUPPORT */ + } + + + + + /* see nm.h: target_new_obj_file is defined as pTDI_new_objfile */ + + /* ------------------------------------------------------------ * + * fills the implementation profile: * + * - detects the implementation type * + * - reads in the pid of the TED thread (only kernel impl) * + * - reads in the signal used by the implementation for * + * scheduling (only user space implementations) * + * ------------------------------------------------------------ */ + + void + pTDI_new_objfile (objfile) + struct objfile *objfile; + { + + #if TDI_SUPPORT + + struct minimal_symbol *TDI_debug_sym; + int ImplementationType = 0; + int SigIgnoreValue = 0; + int debug_on = 1; + static int toggle = 1; /* TDI support */ + static int sig_toggle = 0; /* signal prevention support */ + + /* this function is called with a NULL arg * + * for initialization */ + + if (!objfile) + { + + printf_filtered("TDI reinit\n"); + + toggle = 1; + sig_toggle = 0; + } + + /* debug flag set, return */ + + if (!toggle) + return; + + /* lookup the debug indicator symbol */ + + if ((TDI_debug_sym = lookup_minimal_symbol ("__pthread_debug_with_TDI", + NULL, NULL)) == NULL) + { + /* there is no TDI-aware pthreads library present */ + return; + } + + /* read the symbol value */ + + target_read_memory(SYMBOL_VALUE_ADDRESS (TDI_debug_sym), + (char *)&ImplementationType, + sizeof (ImplementationType)); + + + /* we try to set the flag */ + + /* The ability to read the value does'nt imply a successful write * + * reason: - if there is no process forked, we only can read the * + * global value from the object file */ + + if (target_write_memory(SYMBOL_VALUE_ADDRESS (TDI_debug_sym), + (char *)&debug_on, + sizeof (debug_on))==0) { + + char tmp[40]; + + /* store the mapping type in the Pthreads profile */ + + Current_Pthreads_Impl_Profile.K2UL_mapping = -ImplementationType; + + /* install a cleanup handler for the next start */ + + make_run_cleanup(TDI_cleanup_at_start,NULL); + + /* notify the user */ + + switch (Current_Pthreads_Impl_Profile.K2UL_mapping) { + case K2UL_ONE_TO_ONE: + sprintf(tmp,"[1:1] i.e. Linuxthreads"); break; + case K2UL_ONE_TO_MANY: + sprintf(tmp,"[1:N] i.e. FSU, MIT"); break; + case K2UL_MANY_TO_MANY: + sprintf(tmp,"[M:N] i.e. Solaris Pthreads"); break; + default: + sprintf(tmp,"[?:?] unknown"); + } + + printf_filtered("\nPOSIX Threads Library is TDI aware.\n" + "[Kernel Threads : User Level Threads] = %s\n", tmp); + + + /* is there a mechanism to prevent signal processing * + * while calling the TDI */ + + if (!sig_toggle) { + if ((Current_Pthreads_Impl_Profile.SigIgnore = + lookup_minimal_symbol ("__pthread_debug_TDI_sig_ignore", + NULL, NULL)) != NULL) + { + /* read the symbol value */ + target_read_memory(SYMBOL_VALUE_ADDRESS(Current_Pthreads_Impl_Profile.SigIgnore), + (char *)&SigIgnoreValue, + sizeof (SigIgnoreValue)); + + printf_filtered("Signal used for scheduling: %d\n",-SigIgnoreValue); + + /* set the profile attribute */ + Current_Pthreads_Impl_Profile.sched_signal = -SigIgnoreValue; + + /* support for reissuing ignored signals ? */ + + Current_Pthreads_Impl_Profile.IgnoredSigSet = + lookup_minimal_symbol ("__pthread_debug_TDI_ignored_signals", + NULL, NULL); + sig_toggle = 1; + } + } + /* avoid subsequent calls */ + + toggle=0; + + /* register this function to be called before running * + * the program again */ + + make_run_cleanup(pTDI_new_objfile,NULL); + + /* - free this object file before start this program again * + * - this causes a reload of the object file and a call to * + * this function (pTDI_...) */ + + if (!pthread_init_installed()) + make_run_cleanup(free_objfile,objfile); + } + #endif /* TDI_SUPPORT */ + + } + + /* ------------------------------------- * + * utilities * + * ------------------------------------- */ + + char* + TdiPrintState(int state, char* res) { + + #if TDI_SUPPORT + switch (state) { + case TDI_UNDEF_STATE: sprintf(res,"UNDEF ");break; + case TDI_RUNNING_STATE: sprintf(res,"RUNNING");break; + case TDI_READY_STATE: sprintf(res,"READY ");break; + case TDI_BLOCKED_M_STATE: sprintf(res,"BLOCK M");break; + case TDI_BLOCKED_C_STATE: sprintf(res,"BLOCK C");break; + case TDI_BLOCKED_T_STATE: sprintf(res,"BLOCK T");break; + case TDI_BLOCKED_S_STATE: sprintf(res,"BLOCK S");break; + case TDI_BLOCKED_O_STATE: sprintf(res,"BLOCK O");break; + case TDI_EXITING_STATE: sprintf(res,"EXITING");break; + default: + sprintf(res," ? "); + } + + #endif /* TDI_SUPPORT */ + + return res; + } + + + /* prints the name of the function associated with the address * + * entry to the string */ + + char* + TdiPrintEntry (int entry, char* string, unsigned length) { + + /* look for a function symbol with the entry code address */ + struct symbol* EntrySymbol; + struct minimal_symbol* MEntrySymbol; + + /* find the associated function symbol */ + + EntrySymbol = find_pc_function(entry); + + if (EntrySymbol) { + sprintf(string,"%*.*s",length,length,EntrySymbol->ginfo.name); + return string; + } + else { + char *func_name=0; + + /* the hard way */ + + MEntrySymbol = lookup_minimal_symbol_by_pc (entry); + + if (MEntrySymbol) { + func_name = SYMBOL_NAME(MEntrySymbol); + } + + sprintf(string,"%*.*s",length,length,(func_name)?(func_name):"main"); + return string; + } + + + } + + /* functions to activate and deactivate signal handling */ + + /* decativate targets signal handling */ + + int + switch_off_signal_handling() { + + int ignore_flag = 1; + + /* is there support */ + if (Current_Pthreads_Impl_Profile.SigIgnore) { + + /* we try to set the the ignore flag */ + if (target_write_memory(SYMBOL_VALUE_ADDRESS(Current_Pthreads_Impl_Profile.SigIgnore), + (char *)&ignore_flag, + sizeof (int))!=0) { + return TDI_ERROR; + } + } + return TDI_OK; + } + + int + switch_on_signal_handling() { + + int ignore_flag = 0; + + /* is there support */ + if (Current_Pthreads_Impl_Profile.SigIgnore) { + + /* we try to unset the the ignore flag */ + if (target_write_memory(SYMBOL_VALUE_ADDRESS(Current_Pthreads_Impl_Profile.SigIgnore), + (char *)&ignore_flag, + sizeof (int))!=0) { + return TDI_ERROR; + } + } + return TDI_OK; + } + + int + reissue_ignored_signals(except_set) + int except_set; /* set of signals not reissued */ + { + int sig_set =0; /* FIXME: only 32 signals */ + int empty_set=0; + int signo; + + if (!Current_Pthreads_Impl_Profile.IgnoredSigSet) + { + printf_filtered("no reissue\n"); + return TDI_OK; + } + + if (target_read_memory(SYMBOL_VALUE_ADDRESS (Current_Pthreads_Impl_Profile.IgnoredSigSet), + (char *)&sig_set, + sizeof (int))!=0) + { + return TDI_ERROR; + } + + /* unset it */ + if (target_write_memory(SYMBOL_VALUE_ADDRESS (Current_Pthreads_Impl_Profile.IgnoredSigSet), + (char *)&empty_set, + sizeof (int))!=0) + { + return TDI_ERROR; + } + + + + for (signo = 1 ; signo < (sizeof(int)*8) ; signo++) { + + /* don't issue it when in except set */ + if ( except_set & (0x1 << (signo-1))) + continue; + + if ( sig_set & (0x1 << (signo-1))) { + printf_filtered("(POSIX TDI) Issue signal %d\n",signo); + kill(inferior_pid,signo); + } + } + } + + + /* signal the TDI server a request: * + * - depending on the implementation type * + * we call a function in the target or * + * send a UNIX signal * + * - the target needs information about the * + * underlying IPC channel to respond * + * correctly * + * - the TDI structure contains information * + * about the IPC channel */ + + int TDI_signal(ThreadDebugInterfaceT* TDIPtr) { + + #ifdef TDI_SUPPORT + /* build a call string */ + char callString[200]; + + RETURN_IF_TDI_NOT_PRESENT; + + switch (Current_Pthreads_Impl_Profile.K2UL_mapping) { + case K2UL_ONE_TO_MANY: + { + + sprintf(callString,"%s(%d,%d)", + REQUEST_HANDLER_CALL_STRING, + TDIPtr->channel->key, + SHARED_MEMORY_IPC + ); + + TDI_MSG(callString); + + /* call the appropriate function */ + parse_and_eval(callString); + + } + break; + + case K2UL_ONE_TO_ONE: + { + /* we have to determine the PID of the kernel thread, * + * that runs the TED thread */ + + struct minimal_symbol *sym; + + /* the TED thread has to know the SM Id */ + pid_t GDB_pid = getpid(); + + if (!Current_Pthreads_Impl_Profile.TED_pid) { + + if ((sym = lookup_minimal_symbol ("__pthread_debug_TED_pid", + NULL, NULL)) == NULL) + return TDI_ERROR; + + target_read_memory(SYMBOL_VALUE_ADDRESS (sym), + (char *)&Current_Pthreads_Impl_Profile.TED_pid, + sizeof (pid_t)); + + + if (target_write_memory(SYMBOL_VALUE_ADDRESS (sym), + (char *)&GDB_pid, + sizeof (pid_t))!=0) { + printf_filtered("(POSIX TDI) fatal: Sm Id setting failed\n"); + } + + printf_filtered("(POSIX TDI) TED pid: %d\n",Current_Pthreads_Impl_Profile.TED_pid); + } + + /* send a UNIX signal */ + + if (kill(Current_Pthreads_Impl_Profile.TED_pid,SIGUSR1)==-1) + { + perror_with_name("TDI_signal"); + return TDI_ERROR; + }; + + } + break; + + default: + printf_filtered("\n(POSIX TDI) There is no support to signal\n" + " a mixed pthreads implementation."); + return TDI_ERROR; + } + + return TDI_OK; + + #endif TDI_SUPPORT + + + } + + void + TDI_cleanup_at_start() { + #ifdef TDI_SUPPORT + /* unset the profile */ + Current_Pthreads_Impl_Profile.K2UL_mapping = K2UL_UNDEF; + + Current_Pthreads_Impl_Profile.TED_pid = 0; + + Current_Pthreads_Impl_Profile.sched_signal = 0; + + Current_Pthreads_Impl_Profile.SigIgnore = NULL; + + Current_Pthreads_Impl_Profile.IgnoredSigSet = NULL; + + + #endif TDI_SUPPORT + + } + + #ifdef TEST_MEASUREMENT + + /* this is a test (SmartGDB vs. TDI policy) */ + #include "pthread.h" + + + + static void + smartGDB_like_info (char *arg,int from_tty) { + + int thread_count=1; + struct pthread elem; + struct timeval tv_start = {0L,0L},tv_end = {0L,0L}; + + + + /* nullify it */ + memset(&elem,0,sizeof(struct pthread)); + + + /* ################################################# * + * MEASURE * + * (only access time, no output) * + * ################################################# */ + + gettimeofday(&tv_start,NULL); + + /* get the first element */ + target_read_memory(atoi(arg), + (char*)&elem, + sizeof(struct pthread)); + while (elem.next[ALL_QUEUE]) { + + /* nullify it */ + target_read_memory( + elem.next[ALL_QUEUE], + (char*)&elem, + sizeof(struct pthread)); + + } + + gettimeofday(&tv_end,NULL); + + /* ################################################# * + * OUTPUT * + * ################################################# */ + + /* get the first element */ + target_read_memory(atoi(arg), + (char*)&elem, + sizeof(struct pthread)); + while (elem.next[ALL_QUEUE]) { + + thread_count++; + + /* prio entry earg rstate */ + printf("%x %x %x %x\n",elem.base_prio,elem.func,elem.arg,elem.state); + + /* nullify it */ + target_read_memory( + elem.next[ALL_QUEUE], + (char*)&elem, + sizeof(struct pthread)); + + } + + printf("Response time for %d threads:\n",thread_count); + + tdi_measure_print_diff(&tv_start,&tv_end); + + } + + void + tdi_measure_print_diff(tv_start,tv_end) + struct timeval *tv_start,*tv_end; + { + char t1[100],t2[100]; + + float start,end; + + int sec_diff = tv_end->tv_sec - tv_start->tv_sec; + + sprintf(t1,"0.%4d",tv_start->tv_usec); + + sprintf(t2,"%d.%4d",sec_diff,tv_end->tv_usec); + + sscanf(t1,"%f",&start); + sscanf(t2,"%f",&end); + + printf("relative --> start: %s end: %s diff: %f\n",t1,t2,end-start); + } + + #endif + + + + + + diff -C 2 -P -r gdb-4.18.ORIG/gdb/config/sparc/nm-sun4os4.h gdb-4.18/gdb/config/sparc/nm-sun4os4.h *** gdb-4.18/gdb/config/sparc/nm-sun4os4.h Mon May 31 18:23:39 1999 --- gdb-4.18/gdb/config/sparc/nm-sun4os4.h Mon May 31 18:17:49 1999 *************** *** 34,35 **** --- 34,45 ---- #define KERNEL_U_SIZE kernel_u_size() extern int kernel_u_size PARAMS ((void)); + + #ifdef __STDC__ + struct objfile; + #endif + + void pTDI_new_objfile PARAMS ((struct objfile *objfile)); + #define target_new_objfile(OBJFILE) pTDI_new_objfile (OBJFILE) + + +