public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: part of massive update
@ 2008-02-18 18:16 cmoller
  0 siblings, 0 replies; 2+ messages in thread
From: cmoller @ 2008-02-18 18:16 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  f2ead5f8f556e86a15f854b0f74299172de7fc6c (commit)
       via  91dbcd42fc4f7cac2bde88ed75abb00bc85dc2e9 (commit)
       via  bbb7460667938ce6635c86ce879d2085b7086ce1 (commit)
       via  726a96ebcc5a4b040cd564db039052087c102149 (commit)
       via  3aed752cfd3871b4a2f70e334899495f05c37fc5 (commit)
       via  068613120ac870e68fe06736a7cabe6978854253 (commit)
       via  816ef57b5c730a862b15f01dcb7f908b8ffaef51 (commit)
       via  182c689af1546e106206030094a2c8100df54591 (commit)
       via  411fb2318c21a45f5b88b3199022a4fc72385773 (commit)
       via  2ea43f45b05e0d1f95aa21cbe5b70e72de5ae99c (commit)
       via  6df4cfebf370cf7bb7dec40b842584c45ed00ca1 (commit)
       via  9794f3793b6f70f0fbdb30b5044bc11d3f3a2e66 (commit)
      from  241e0b8a252248bea9234ac7a3d183b4156abebd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit f2ead5f8f556e86a15f854b0f74299172de7fc6c
Author: Chris Moller <moller@hotbox.mollernet.net>
Date:   Mon Feb 18 13:15:54 2008 -0500

    part of massive update

commit 91dbcd42fc4f7cac2bde88ed75abb00bc85dc2e9
Author: Chris Moller <moller@hotbox.mollernet.net>
Date:   Mon Feb 18 13:15:22 2008 -0500

    part of massive update

commit bbb7460667938ce6635c86ce879d2085b7086ce1
Author: Chris Moller <moller@hotbox.mollernet.net>
Date:   Mon Feb 18 13:14:08 2008 -0500

    part of massive update

commit 726a96ebcc5a4b040cd564db039052087c102149
Author: Chris Moller <moller@hotbox.mollernet.net>
Date:   Mon Feb 18 13:13:31 2008 -0500

    part of massive update

commit 3aed752cfd3871b4a2f70e334899495f05c37fc5
Author: Chris Moller <moller@hotbox.mollernet.net>
Date:   Mon Feb 18 13:10:57 2008 -0500

    part of massive update

commit 068613120ac870e68fe06736a7cabe6978854253
Author: Chris Moller <moller@hotbox.mollernet.net>
Date:   Mon Feb 18 13:10:26 2008 -0500

    part of massive update

commit 816ef57b5c730a862b15f01dcb7f908b8ffaef51
Author: Chris Moller <moller@hotbox.mollernet.net>
Date:   Mon Feb 18 13:09:53 2008 -0500

    part of massive update.

commit 182c689af1546e106206030094a2c8100df54591
Author: Chris Moller <moller@hotbox.mollernet.net>
Date:   Mon Feb 18 13:09:18 2008 -0500

    part of massive update

commit 411fb2318c21a45f5b88b3199022a4fc72385773
Author: Chris Moller <moller@hotbox.mollernet.net>
Date:   Mon Feb 18 13:08:37 2008 -0500

    part of massive update.

commit 2ea43f45b05e0d1f95aa21cbe5b70e72de5ae99c
Author: Chris Moller <moller@hotbox.mollernet.net>
Date:   Mon Feb 18 13:07:33 2008 -0500

    part of massive update

commit 6df4cfebf370cf7bb7dec40b842584c45ed00ca1
Author: Chris Moller <moller@hotbox.mollernet.net>
Date:   Mon Feb 18 13:06:51 2008 -0500

    part of massive update

commit 9794f3793b6f70f0fbdb30b5044bc11d3f3a2e66
Author: Chris Moller <moller@hotbox.mollernet.net>
Date:   Mon Feb 18 13:06:04 2008 -0500

    part of massive update

-----------------------------------------------------------------------

Summary of changes:
 frysk-utrace/utracer/NOTES                         |   15 +--
 frysk-utrace/utracer/judb/ResponseListener.java    |   17 ++-
 frysk-utrace/utracer/tudb                          |    6 +-
 frysk-utrace/utracer/udb-i386.c                    |    8 +-
 frysk-utrace/utracer/udb-i386.h                    |   43 ++----
 frysk-utrace/utracer/udb-response.c                |   55 ++-----
 frysk-utrace/utracer/udb-text-ui.c                 |   34 ++--
 frysk-utrace/utracer/udb.c                         |   63 ++------
 frysk-utrace/utracer/utracer/docs/ChangeLog        |   21 +++
 frysk-utrace/utracer/utracer/docs/Makefile         |   37 ++++-
 frysk-utrace/utracer/utracer/docs/utracer.sgml     |   41 +++++-
 .../utracer/utracer/docs/utracer_intro_body.sgml   |   25 +---
 .../utracer/utracer/docs/utracer_open_body.sgml    |   25 +---
 .../utracer/docs/utracer_set_syscall_body.sgml     |   76 ++++++----
 .../utracer/utracer/include/utracer-errmsgs.h      |    1 +
 frysk-utrace/utracer/utracer/include/utracer.h     |   52 ++++---
 frysk-utrace/utracer/utracer/module/utracer-base.c |   51 ++++---
 .../utracer/utracer/module/utracer-cf-io.c         |   34 ++--
 .../utracer/utracer/module/utracer-ioctl.c         |   53 ++++---
 frysk-utrace/utracer/utracer/utracer/utracer.c     |  166 ++++++++++++++++----
 20 files changed, 459 insertions(+), 364 deletions(-)

First 500 lines of diff:
diff --git a/frysk-utrace/utracer/NOTES b/frysk-utrace/utracer/NOTES
index 0ab0a7f..7b02a72 100644
--- a/frysk-utrace/utracer/NOTES
+++ b/frysk-utrace/utracer/NOTES
@@ -7,17 +7,8 @@ provide a command to req the process tree starting at any point
 in utracer.c, trace registering apps & report death; auto-unregister
 research self-unload of module
 
-change cmd_<pid> to cmd/<pid>, etc
+maybe consolidate all responses through a single /proc entry?  or put a select
+in the userspace response thread for multiple entry fds?
 
-[root@hotbox 31104]# cat maps
-00b6d000-00b86000 r-xp 00000000 fd:00 2359327    /lib/ld-2.5.so
-00b86000-00b88000 rwxp 00018000 fd:00 2359327    /lib/ld-2.5.so
-00fc0000-00fc1000 r-xp 00fc0000 00:00 0          [vdso]
-08048000-08049000 r-xp 00000000 fd:00 15501598   /usr/sandbox/frysk-utrace/utracer/testsyscall
-08049000-0804a000 rw-p 00000000 fd:00 15501598   /usr/sandbox/frysk-utrace/utracer/testsyscall
-bfb3d000-bfb53000 rw-p bfb3d000 00:00 0          [stack]
-[root@hotbox 31104]#
+provide a means of customising responses to report_* events.
 
- read (6, 0xbfb4f2a8, 512)  - stack [ bfb3d000 ] = 122a8
-write (2, 0xbfb4d258, 16)   - stack [ bfb3d000 ] = 10258
- read (6, 0xb7ffc000, 4096) - stack [ bfb3d000 ] = 
diff --git a/frysk-utrace/utracer/judb/ResponseListener.java b/frysk-utrace/utracer/judb/ResponseListener.java
index a23c96a..9ef3ce7 100644
--- a/frysk-utrace/utracer/judb/ResponseListener.java
+++ b/frysk-utrace/utracer/judb/ResponseListener.java
@@ -22,9 +22,9 @@ class ResponseListener implements Runnable {
   public void run() {
     boolean spin = true;
     while (spin) {
-      System.out.println ("Starting pread");
+      //      System.out.println ("Starting pread");
       int type = Utrace.read_response();
-      System.out.println ("Back from pread, type = " + type);
+      //      System.out.println ("Back from pread, type = " + type);
       
       switch (type) {
       case IF_RESP_NULL:
@@ -43,13 +43,20 @@ class ResponseListener implements Runnable {
 	System.out.println ("resp death");
 	break;
       case IF_RESP_SYSCALL_ENTRY_DATA:
-	System.out.println ("resp syscall entry");
+	System.out.println ("resp syscall entry, syscall + " +
+			    Utrace.read_response_syscall_number () +
+			    ", pid = " +
+			    Utrace.read_response_syscall_pid ());
 	break;
       case IF_RESP_SYSCALL_EXIT_DATA:
-	System.out.println ("resp syscall exit");
+	System.out.println ("resp syscall exit, syscall + " +
+			    Utrace.read_response_syscall_number () +
+			    ", pid = " +
+			    Utrace.read_response_syscall_pid ());
 	break;
       case IF_RESP_EXEC_DATA:
-	System.out.println ("resp exec");
+	String exec = Utrace.read_resp_exec();
+	System.out.println ("resp exec, eexec = " + exec);
 	break;
       case IF_RESP_QUIESCE_DATA:
 	System.out.println ("resp quiesce");
diff --git a/frysk-utrace/utracer/tudb b/frysk-utrace/utracer/tudb
index ff6e8cd..b9a8406 100755
--- a/frysk-utrace/utracer/tudb
+++ b/frysk-utrace/utracer/tudb
@@ -2,8 +2,8 @@
 
 stty sane
 
-lsmod | grep -q utracer
-if (( $? != 0 )); then sudo /sbin/insmod utracer/module/utracer.ko; fi
+#lsmod | grep -q utracer
+#if (( $? != 0 )); then sudo /sbin/insmod utracer/module/utracer.ko; fi
 
 #LD_LIBRARY_PATH=./utracer/utracer:$LD_LIBRARY_PATH ./udb -c'sy ex en' -c'sy ex a read' -l ls
 #./udb -c'sy en en' -c'sy en a read' -c'run' -c'quit' -l ls
@@ -13,5 +13,5 @@ if (( $? != 0 )); then sudo /sbin/insmod utracer/module/utracer.ko; fi
 ./udb -c'sy ex en' -c'sy en en' -c'sy ex a write' -c'sy en a write' \
   -l ./aux/ts
 
-sudo /sbin/rmmod utracer/module/utracer.ko
+#sudo /sbin/rmmod utracer/module/utracer.ko
 
diff --git a/frysk-utrace/utracer/udb-i386.c b/frysk-utrace/utracer/udb-i386.c
index 640659e..4f94421 100644
--- a/frysk-utrace/utracer/udb-i386.c
+++ b/frysk-utrace/utracer/udb-i386.c
@@ -118,8 +118,7 @@ create_sys_hash_table()
   rc = hcreate_r ((4 * nr_syscall_names)/3, &sys_hash_table);
   if (0 == rc) {
     cleanup_udb();
-    utracer_unregister (udb_pid);
-    utracer_close_ctl_file();
+    utracer_close(udb_pid);
     fprintf (stderr, "\tCreating syscall hash table failed.\n");
     _exit (1);
   }
@@ -128,8 +127,7 @@ create_sys_hash_table()
     ENTRY * entry;
     if (0 == hsearch_r (syscall_names[i], ENTER, &entry, &sys_hash_table)) {
       cleanup_udb();
-      utracer_unregister (udb_pid);
-      utracer_close_ctl_file();
+      utracer_close(udb_pid);
       error (1, errno, "Error building syscall hash.");
     }
   }
@@ -453,7 +451,7 @@ show_syscall (long type, long pid, struct pt_regs * regs)
     if (0 == rc)
       fprintf (stdout, "\t\tat addr %08x: \"%.*s\"\n",
 	       addr_to_show, SC_BFFR_LEN, (char *)bffr);
-    else uerror ("syscall getmem");
+    else utracer_uerror ("syscall getmem");
   }
 }
 
diff --git a/frysk-utrace/utracer/udb-i386.h b/frysk-utrace/utracer/udb-i386.h
index 632d521..7f0087f 100644
--- a/frysk-utrace/utracer/udb-i386.h
+++ b/frysk-utrace/utracer/udb-i386.h
@@ -42,6 +42,7 @@
 #define UDB_I386_H
 
 #include <search.h>
+#include <asm/ptrace.h>
 
 #ifdef DO_UDB_INIT
 #define DECL(v,i) v = i
@@ -143,7 +144,6 @@ typedef struct {
 
 // derived from <kernel_src>/include/asm-i386/elf.h
 // this doesn't match include/asm-i386/user.h
-REG_DECL (reg_data_s debug_data,	REGSET_DEBUG, -1);
 REG_DECL (reg_data_s ebx_data,		REGSET_GPRS,  0);
 REG_DECL (reg_data_s ecx_data,		REGSET_GPRS,  1);
 REG_DECL (reg_data_s edx_data,		REGSET_GPRS,  2);
@@ -154,7 +154,10 @@ REG_DECL (reg_data_s eax_data,		REGSET_GPRS,  6);
 REG_DECL (reg_data_s xds_data,		REGSET_GPRS,  7);
 REG_DECL (reg_data_s xes_data,		REGSET_GPRS,  8);
 REG_DECL (reg_data_s xfs_data,		REGSET_GPRS,  9);
+#if 1		// fixme -- <kernel>/asm/ptrace.h omits this, but utrace
+//		returns 17 regs in gprs; there's a  mismatch somewhere
 REG_DECL (reg_data_s xgs_data,		REGSET_GPRS, 10);
+#endif
 REG_DECL (reg_data_s orig_eax_data,	REGSET_GPRS, 11);
 REG_DECL (reg_data_s eip_data,		REGSET_GPRS, 12);
 REG_DECL (reg_data_s xcs_data,		REGSET_GPRS, 13);
@@ -164,6 +167,7 @@ REG_DECL (reg_data_s xss_data,		REGSET_GPRS, 16);
 REG_DECL (reg_data_s gdtr_data,		REGSET_DESC,  0);
 REG_DECL (reg_data_s ldtr_data,		REGSET_DESC,  1);
 REG_DECL (reg_data_s idtr_data,		REGSET_DESC,  2);
+REG_DECL (reg_data_s debug_data,	REGSET_DEBUG, -1);
 REG_DECL (reg_data_s gprs_data,		REGSET_GPRS,  -1);
 REG_DECL (reg_data_s fprs_data,		REGSET_FPRS,  -1);
 REG_DECL (reg_data_s fprx_data,		REGSET_FPRX,  -1);
@@ -175,11 +179,6 @@ extern
 ENTRY reg_mapping[]
 #ifdef DO_UDB_INIT
 = {
-  {"gprs",	 (void *)&gprs_data},
-  {"fprs",	 (void *)&fprs_data},
-  {"fprx",	 (void *)&fprx_data},
-  {"desc",	 (void *)&desc_data},
-  {"debug",	 (void *)&debug_data},
   {"ebx",	 (void *)&ebx_data},
   {"ecx",	 (void *)&ecx_data},
   {"edx",	 (void *)&edx_data},
@@ -190,7 +189,10 @@ ENTRY reg_mapping[]
   {"xds",	 (void *)&xds_data},
   {"xes",	 (void *)&xes_data},
   {"xfs",	 (void *)&xfs_data},
+#if 1		// fixme -- <kernel>/asm/ptrace.h omits this, but utrace
+//		returns 17 regs in gprs; there's a  mismatch somewhere
   {"xgs",	 (void *)&xgs_data},
+#endif
   {"xcs",	 (void *)&xcs_data},
   {"orig_eax",	 (void *)&orig_eax_data},
   {"eip",	 (void *)&eip_data},
@@ -199,7 +201,12 @@ ENTRY reg_mapping[]
   {"xss",	 (void *)&xss_data},
   {"gdtr",	 (void *)&gdtr_data},
   {"ldtr",	 (void *)&ldtr_data},
-  {"idtr",	 (void *)&idtr_data}
+  {"idtr",	 (void *)&idtr_data},
+  {"gprs",	 (void *)&gprs_data},
+  {"fprs",	 (void *)&fprs_data},
+  {"fprx",	 (void *)&fprx_data},
+  {"desc",	 (void *)&desc_data},
+  {"debug",	 (void *)&debug_data},
 }
 #endif
   ;
@@ -210,28 +217,6 @@ int nr_regs
 #endif
   ;
 
-// fixme -- the struct pt_regs in /usr/include/asm/ptrace.h dosn't match the
-// one in the kernel.. here's the kernel version:
-
-struct pt_regs {
-  long ebx;
-  long ecx;
-  long edx;
-  long esi;
-  long edi;
-  long ebp;
-  long eax;
-  int  xds;
-  int  xes;
-  /* int  xfs; */
-  int  xgs;
-  long orig_eax;
-  long eip;
-  int  xcs;
-  long eflags;
-  long esp;
-  int  xss;
-};
 
 
 // from include/asm-i386/unistd.h
diff --git a/frysk-utrace/utracer/udb-response.c b/frysk-utrace/utracer/udb-response.c
index 4a36382..9944b0f 100644
--- a/frysk-utrace/utracer/udb-response.c
+++ b/frysk-utrace/utracer/udb-response.c
@@ -59,15 +59,15 @@ resp_listener (void * arg)
   if_resp_u if_resp;
   ssize_t sz;
   int run = 1;
+  void * extra = NULL;
 
   LOGIT ("in response thread\n");
 
   while (run) {
     LOGIT ("starting response thread pread\n");
-    sz = pread (utracer_resp_file_fd(), &if_resp,
-		sizeof(if_resp), 0);
+    sz = utracer_read (&if_resp, &extra);
     if (-1 == sz) {
-      uerror ("Response pread");
+      utracer_uerror ("Response pread");
       _exit (4);
     }
     
@@ -77,27 +77,15 @@ resp_listener (void * arg)
     case IF_RESP_EXEC_DATA:
       {
 	exec_resp_s exec_resp = if_resp.exec_resp;
-	long bytes_to_get = exec_resp.data_length;
-	long bytes_gotten = 0;
-	char * cstr = alloca (bytes_to_get + 2);
-
-	if (sz > sizeof(exec_resp)) {
-	  long bytes_avail =  sz - sizeof(exec_resp);
-	  memcpy ((void *)cstr, (void *)(&if_resp) + sizeof (exec_resp),
-		  bytes_avail);
-	  bytes_to_get -= bytes_avail;
-	  bytes_gotten = bytes_avail;
-	}
-
-	if (0 < bytes_to_get) {
-	  sz = pread (utracer_resp_file_fd(),
-		      (void *)cstr + bytes_gotten,
-		      bytes_to_get, sz);
-	  bytes_gotten += sz;
+	if (extra) {
+	  fprintf (stdout, "\tProcess %ld execing %s (%s)\n",
+		   exec_resp.utraced_pid,
+		   (char *)extra,
+		   ((char *)extra + 1 + strlen ((char *)extra)));
 	}
-	
-	fprintf (stdout, "\tProcess %ld execing %s (%s)\n",
-		 exec_resp.utraced_pid, cstr, cstr + 1 + strlen (cstr));
+	else
+	  fprintf (stdout, "\tProcess %ld execing <unknown> (<unknown>)\n",
+		   exec_resp.utraced_pid);
       }
       break;
     case IF_RESP_SYSCALL_ENTRY_DATA:
@@ -105,25 +93,8 @@ resp_listener (void * arg)
       {
 	// fixme -- handle /proc/<pid>/mem to access ptr args
 	syscall_resp_s syscall_resp = if_resp.syscall_resp;
-	long bytes_to_get = syscall_resp.data_length;
-	long bytes_gotten = 0;
-	struct pt_regs * regs = alloca (bytes_to_get);
-
-	if (sz > sizeof(syscall_resp)) {
-	  long bytes_avail =  sz - sizeof(syscall_resp);
-	  memcpy ((void *)regs, (void *)(&if_resp) + sizeof (syscall_resp),
-		  bytes_avail);
-	  bytes_to_get -= bytes_avail;
-	  bytes_gotten = bytes_avail;
-	}
-
-	if (0 < bytes_to_get) {
-	  sz = pread (utracer_resp_file_fd(),
-		      (void *)regs + bytes_gotten,
-		      bytes_to_get, sz);
-	}
-	
-	show_syscall (if_resp.type, syscall_resp.utraced_pid, regs);
+	show_syscall (if_resp.type, syscall_resp.utraced_pid, extra);
+        if (extra) free (extra);
       }
       break;
     case IF_RESP_DEATH_DATA:
diff --git a/frysk-utrace/utracer/udb-text-ui.c b/frysk-utrace/utracer/udb-text-ui.c
index fd17e85..3f24c51 100644
--- a/frysk-utrace/utracer/udb-text-ui.c
+++ b/frysk-utrace/utracer/udb-text-ui.c
@@ -173,7 +173,7 @@ watch_fcn(char ** saveptr)
     current_pid = pid;
     set_prompt();
   }
-  else uerror ("watch");
+  else utracer_uerror ("watch");
   return 1;
 }
 
@@ -189,7 +189,7 @@ attach_fcn(char ** saveptr)
     current_pid = pid;
     set_prompt();
   }
-  else uerror ("attach");
+  else utracer_uerror ("attach");
   return 1;
 }
 
@@ -206,7 +206,7 @@ detach_fcn(char ** saveptr)
       current_pid = -1;
       set_prompt();
     }
-    else uerror ("detach");
+    else utracer_uerror ("detach");
   }
   else fprintf (stderr, "\tdetach requires a valid PID\n");
 
@@ -223,7 +223,7 @@ run_fcn(char ** saveptr)
   if (-1 != pid) {
     rc = utracer_run (udb_pid, pid);
     if (0 == rc) fprintf (stderr, "%d running\n", pid);
-    else uerror ("run");
+    else utracer_uerror ("run");
   }
   else fprintf (stderr, "\trun requires an argument\n");
   return 1;
@@ -239,7 +239,7 @@ quiesce_fcn(char ** saveptr)
   if (-1 != pid) {
     rc = utracer_quiesce (udb_pid, pid);
     if (0 == rc) fprintf (stderr, "%d quiesced\n", pid);
-    else uerror ("quiesce");
+    else utracer_uerror ("quiesce");
   }
   else fprintf (stderr, "\trun requires an argument\n");
   return 1;
@@ -263,12 +263,12 @@ switchpid_fcn (char ** saveptr)
   char * pid_c = strtok_r (NULL, " \t", saveptr);
   if (pid_c) {
     pid = atol (pid_c);
-    rc = utracer_switch_pid (udb_pid, pid);
+    rc = utracer_check_pid (udb_pid, pid);
     if (0 == rc) {
       current_pid = pid;
       set_prompt();
     }
-    else uerror ("switchpid");
+    else utracer_uerror ("switchpid");
   }
   else fprintf (stderr, "\tswitchpid requires an argument\n");
   return 1;
@@ -295,7 +295,7 @@ printreg_fcn (char ** saveptr)
     rc = utracer_get_regs (udb_pid, pid, regset, &regsinfo,
 			   &nr_regs, &reg_size);
     if (0 == rc) show_regs (pid, regset, reg, regsinfo, nr_regs, reg_size);
-    else uerror ("printreg");
+    else utracer_uerror ("printreg");
 
     if (regsinfo) free (regsinfo);
   }
@@ -318,7 +318,7 @@ printregall_fcn (char ** saveptr)
   // fixme allow selection of regset
   rc = utracer_get_regs (udb_pid, pid, 0, &regsinfo, &nr_regs, &reg_size);
   if (0 == rc) show_regs (pid, 0, -1, regsinfo, nr_regs, reg_size);
-  else uerror ("printreg");
+  else utracer_uerror ("printreg");
 
   if (regsinfo) free (regsinfo);
 
@@ -401,7 +401,7 @@ printmmap_fcn (char ** saveptr)
 			 &printmmap_resp, &vm_struct_subset, &vm_strings);
   if (0 == rc) 
     handle_printmmap (printmmap_resp, vm_struct_subset, vm_strings);
-  else uerror ("printmmap");
+  else utracer_uerror ("printmmap");
 
   if (printmmap_resp)	free (printmmap_resp);
   if (vm_struct_subset)	free (vm_struct_subset);
@@ -421,7 +421,7 @@ printenv_fcn (char ** saveptr)
   if (tok && ('[' == *tok)) pid = atol (tok+1);
   rc = utracer_get_env (udb_pid, pid, &env);
   if (0 == rc) fprintf (stdout, "%s\n", env);
-  else uerror ("printenv");
+  else utracer_uerror ("printenv");
   return 1;
 }
 
@@ -438,7 +438,7 @@ listpids_fcn(char ** saveptr)
     
     for (i = 0; i < nr_pids; i++) fprintf (stdout, "\t%ld\n", pids[i]);
   }
-  else uerror ("printenv");
+  else utracer_uerror ("printenv");
 
   if (pids) free (pids);
   return 1;
@@ -459,7 +459,7 @@ printexe_fcn (char ** saveptr)
     fprintf (stdout, "\t filename: \"%s\"\n", filename);
     fprintf (stdout, "\t   interp: \"%s\"\n", interp);
   }
-  else uerror ("printexe");
+  else utracer_uerror ("printexe");
 
   if (filename)	free (filename);
   if (interp)	free (interp);
@@ -507,7 +507,7 @@ requested length are invlaid.\n");
       fprintf (stdout, "%02x ", (int)(((char *)bffr)[i]));
     fprintf (stdout, "\n");
   }
-  else uerror ("printmem");
+  else utracer_uerror ("printmem");
 
   if (bffr) free (bffr);
   
@@ -675,8 +675,7 @@ create_cmd_hash_table()
   rc = hcreate_r ((4 * nr_cmds)/3, &cmd_hash_table);
   if (0 == rc) {
     cleanup_udb();
-    utracer_unregister (udb_pid);
-    utracer_close_ctl_file();
+    utracer_close(udb_pid);
     fprintf (stderr, "\tCreating command hash table failed.\n");
     _exit (1);
   }
@@ -685,8 +684,7 @@ create_cmd_hash_table()
     ENTRY * entry;
     if (0 == hsearch_r (cmds[i], ENTER, &entry, &cmd_hash_table)) {
       cleanup_udb();
-      utracer_unregister (udb_pid);
-      utracer_close_ctl_file();
+      utracer_close(udb_pid);
       error (1, errno, "Error building commands hash.");
     }
   }
diff --git a/frysk-utrace/utracer/udb.c b/frysk-utrace/utracer/udb.c
index ff89cbc..999d6e3 100644
--- a/frysk-utrace/utracer/udb.c
+++ b/frysk-utrace/utracer/udb.c
@@ -76,8 +76,7 @@ cleanup_udb()
   rc = pthread_join(resp_listener_thread, &rc_ptr);
   if (0 != rc) perror ("pthread_cancel");
 
-  
-  utracer_cleanup();
+  utracer_close(udb_pid);
 
   text_ui_terminate();
   arch_specific_terminate();
@@ -90,8 +89,7 @@ sigterm_handler (int sig)
 #ifdef ENABLE_MODULE_OPS  
   unload_utracer();		// and have utracer unload itsef
 #endif
-  utracer_unregister ((long)udb_pid);
-  utracer_close_ctl_file();
+  utracer_close(udb_pid);
   exit (0);			// when nothing else is registered
 }
 
@@ -154,44 +152,6 @@ append_cmd (char * cmd)
   cl_cmds[cl_cmds_next++] = strdup (cmd);
 }
 
-#ifdef USE_UTRACER_WAIT
-static void
-utracer_wait()
-{
-  int i;
-#define CHECKS_NR	3
-
-  for (i = 0; i < CHECKS_NR; i++) {
-    if_resp_u if_resp;
-    ssize_t sz;
-      
-    utracer_sync (udb_pid, SYNC_INIT);
-


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [SCM]  master: part of massive update
@ 2008-02-18 18:20 cmoller
  0 siblings, 0 replies; 2+ messages in thread
From: cmoller @ 2008-02-18 18:20 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  17fb5b9b3faefee0f4190a7f3de42feaba15f16b (commit)
       via  2d670c8819d18a21e6fae62fc237876ea02f73dc (commit)
      from  f2ead5f8f556e86a15f854b0f74299172de7fc6c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 17fb5b9b3faefee0f4190a7f3de42feaba15f16b
Author: Chris Moller <moller@hotbox.mollernet.net>
Date:   Mon Feb 18 13:20:02 2008 -0500

    part of massive update

commit 2d670c8819d18a21e6fae62fc237876ea02f73dc
Author: Chris Moller <moller@hotbox.mollernet.net>
Date:   Mon Feb 18 13:19:18 2008 -0500

    part of massive update

-----------------------------------------------------------------------

Summary of changes:
 frysk-utrace/utracer/judb/Utrace.java              |    5 +++-
 .../utracer/utracer/docs/utracer_attach_body.sgml  |   28 ++-----------------
 2 files changed, 7 insertions(+), 26 deletions(-)

First 500 lines of diff:
diff --git a/frysk-utrace/utracer/judb/Utrace.java b/frysk-utrace/utracer/judb/Utrace.java
index 69f5ac3..7612aad 100644
--- a/frysk-utrace/utracer/judb/Utrace.java
+++ b/frysk-utrace/utracer/judb/Utrace.java
@@ -49,6 +49,9 @@ public class Utrace {
   public static native int  sync    (long clien_pid, long type);
   public static native long[] get_gprs (long clien_pid, long pid);
   public static native int  read_response ();
-  public static native long  read_response_sync_type ();
+  public static native long    read_response_sync_type ();
+  public static native String read_resp_exec();
+  public static native long    read_response_syscall_pid ();
+  public static native long    read_response_syscall_number ();
 }
 
diff --git a/frysk-utrace/utracer/utracer/docs/utracer_attach_body.sgml b/frysk-utrace/utracer/utracer/docs/utracer_attach_body.sgml
index d275237..8e825fd 100644
--- a/frysk-utrace/utracer/utracer/docs/utracer_attach_body.sgml
+++ b/frysk-utrace/utracer/utracer/docs/utracer_attach_body.sgml
@@ -51,7 +51,7 @@
 <refsect1>
   <title>Return Value</title>
   <para>
-    If successful, <function>utracer_set_syscall</function>() returns a zero;
+    If successful, <function>utracer_attach</function>() returns a zero;
     otherwise a -1 is returned and <varname>errno</varname> is set.
   </para>
 </refsect1>
@@ -108,27 +108,5 @@
   </para>
 </refsect1>
 
-<refsect1>
-  <title>See Also</title>
-  <para>
-    <function>utracer_get_mmap</function>(), 
-    <function>utracer_get_pids</function>(), 
-    <function>utracer_get_mem</function>(), 
-    <function>utracer_get_env</function>(), 
-    <function>utracer_get_exe</function>(), 
-    <function>utracer_get_regs</function>(), 
-    <function>utracer_resp_file_id</function>(), 
-    <function>utracer_set_syscall</function>(),
-    <function>utracer_set_sync</function>(), 
-    <function>utracer_detach</function>(), 
-    <!--<function>utracer_attach</function>(), -->
-    <function>utracer_run</function>(), 
-    <function>utracer_quiesce</function>(), 
-    <function>utracer_switch_pid</function>(), 
-    <function>utracer_open</function>(),
-    <function>utracer_unregister</function>(), 
-    <function>utracer_cleanup</function>(), 
-    <function>utracer_close_ctl_file</function>(), 
-    <function>utracer_shutdown</function>(), 
-  </para>
-</refsect1>
+&xref;
+


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-18 18:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-18 18:16 [SCM] master: part of massive update cmoller
2008-02-18 18:20 cmoller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).