From 943f8563d867ad47d35cc145bb750a5b9a321be9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Mon, 13 Apr 1998 16:21:28 +0200
Subject: [PATCH] Added support for tracing individual threads. Added support
 for tracing the compiler.

Rev: src/configure.in:1.175
Rev: src/main.c:1.48
---
 src/configure.in |  6 ++++--
 src/main.c       | 14 +++++++++++++-
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/src/configure.in b/src/configure.in
index ace921086e..3037a12462 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -1,4 +1,4 @@
-AC_REVISION("$Id: configure.in,v 1.174 1998/04/08 14:51:13 grubba Exp $")
+AC_REVISION("$Id: configure.in,v 1.175 1998/04/13 14:18:41 grubba Exp $")
 AC_INIT(interpret.c)
 AC_CONFIG_HEADER(machine.h)
 
@@ -102,6 +102,8 @@ AC_ARG_WITH(profiling,   [  --with-profiling       add code used to profile pike
 AC_ARG_WITH(poll,        [  --with-poll            use poll instead of select],[AC_DEFINE(HAVE_AND_USE_POLL)],[])
 AC_ARG_WITH(max-fd,      [  --with-max-fd=X        set how many filedescriptors can be used at once],[pike_cv_max_open_fd=$withval],[])
 AC_ARG_WITH(oob,	 [  --with-oob             enable out-of-band data handling],[AC_DEFINE(WITH_OOB)],[])
+AC_ARG_WITH(thread-trace,[  --with-trace-threads   enable individual tracing of threads],[AC_DEFINE(TRACE_THREADS)],[])
+AC_ARG_WITH(compiler-trace,[  --with-compiler-trace  enable tracing of the compiler],[AC_DEFINE(YYDEBUG)],[])
 
 #
 # Allow --with(out)-debug to toggle both cdebug and rtldebug, but
@@ -393,7 +395,7 @@ fi
 echo Searching for library directories...
 if test $ldflags_is_set = no ; then
   for d in `echo ${with_lib_path} | sed 's/:/ /g'` \
-    `echo $exec_prefix | sed "s@^NONE@$prefix@g" | sed "s@^NONE@$ac_default_prefix@g"` \
+    `echo $exec_prefix | sed "s@^NONE@$prefix/lib@g" | sed "s@^NONE@$ac_default_prefix/lib@g"` \
     /usr/local/lib /sw/local/lib /sw/lib \
     /usr/gnu/lib /opt/gnu/lib /sw/gnu/lib /usr/freeware/lib \
     `echo /usr/X11*/lib | sort -r`
diff --git a/src/main.c b/src/main.c
index b11880d249..c9727a0786 100644
--- a/src/main.c
+++ b/src/main.c
@@ -4,7 +4,7 @@
 ||| See the files COPYING and DISCLAIMER for more information.
 \*/
 #include "global.h"
-RCSID("$Id: main.c,v 1.47 1998/04/06 17:28:18 grubba Exp $");
+RCSID("$Id: main.c,v 1.48 1998/04/13 14:21:28 grubba Exp $");
 #include "fdlib.h"
 #include "backend.h"
 #include "module.h"
@@ -47,9 +47,13 @@ int debug_options=0;
 int d_flag=0;
 int c_flag=0;
 int t_flag=0;
+int default_t_flag=0;
 int a_flag=0;
 int l_flag=0;
 int p_flag=0;
+#ifdef YYDEBUG
+extern int yydebug;
+#endif /* YYDEBUG */
 static long instructions_left;
 
 static void time_to_exit(struct callback *cb,void *tmp,void *ignored)
@@ -225,6 +229,13 @@ int dbm_main(int argc, char **argv)
 	      d_flag+=STRTOL(p+1,&p,10);
 	      break;
 
+	    case 'c':
+	      p++;
+#ifdef YYDEBUG
+	      yydebug++;
+#endif /* YYDEBUG */
+	      break;
+
 	    case 's':
 	      debug_options|=DEBUG_SIGNALS;
 	      p++;
@@ -254,6 +265,7 @@ int dbm_main(int argc, char **argv)
 	    t_flag+=STRTOL(p+1,&p,10);
 	  else
 	    t_flag++,p++;
+	  default_t_flag = t_flag;
 	  break;
 
 	case 'p':
-- 
GitLab