amd64-fbsd32.c (101282) | amd64-fbsd32.c (101283) |
---|---|
1/* 2 * Copryight 1997 Sean Eric Fagan 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 17 unchanged lines hidden (view full) --- 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 * SUCH DAMAGE. 30 */ 31 32#ifndef lint 33static const char rcsid[] = | 1/* 2 * Copryight 1997 Sean Eric Fagan 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 17 unchanged lines hidden (view full) --- 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 * SUCH DAMAGE. 30 */ 31 32#ifndef lint 33static const char rcsid[] = |
34 "$FreeBSD: head/usr.bin/truss/amd64-fbsd32.c 101282 2002-08-04 00:46:48Z mdodd $"; | 34 "$FreeBSD: head/usr.bin/truss/amd64-fbsd32.c 101283 2002-08-04 01:02:52Z mdodd $"; |
35#endif /* not lint */ 36 37/* 38 * FreeBSD/386-specific system call handling. This is probably the most 39 * complex part of the entire truss program, although I've got lots of 40 * it handled relatively cleanly now. The system call names are generated 41 * automatically, thanks to /usr/src/sys/kern/syscalls.master. The 42 * names used for the various structures are confusing, I sadly admit. --- 112 unchanged lines hidden (view full) --- 155 156 fsc.number = syscall; 157 fsc.name = 158 (syscall < 0 || syscall > nsyscalls) ? NULL : syscallnames[syscall]; 159 if (!fsc.name) { 160 fprintf(trussinfo->outfile, "-- UNKNOWN SYSCALL %d --\n", syscall); 161 } 162 | 35#endif /* not lint */ 36 37/* 38 * FreeBSD/386-specific system call handling. This is probably the most 39 * complex part of the entire truss program, although I've got lots of 40 * it handled relatively cleanly now. The system call names are generated 41 * automatically, thanks to /usr/src/sys/kern/syscalls.master. The 42 * names used for the various structures are confusing, I sadly admit. --- 112 unchanged lines hidden (view full) --- 155 156 fsc.number = syscall; 157 fsc.name = 158 (syscall < 0 || syscall > nsyscalls) ? NULL : syscallnames[syscall]; 159 if (!fsc.name) { 160 fprintf(trussinfo->outfile, "-- UNKNOWN SYSCALL %d --\n", syscall); 161 } 162 |
163 if (fsc.name && (trussinfo->flags & FOLLOWFORKS) 164 && ((!strcmp(fsc.name, "fork") 165 || !strcmp(fsc.name, "rfork") 166 || !strcmp(fsc.name, "vfork")))) 167 { 168 trussinfo->in_fork = 1; 169 } 170 |
|
163 if (nargs == 0) 164 return; 165 166 fsc.args = malloc((1+nargs) * sizeof(unsigned long)); 167 lseek(Procfd, parm_offset, SEEK_SET); 168 if (read(Procfd, fsc.args, nargs * sizeof(unsigned long)) == -1) 169 return; 170 --- 141 unchanged lines hidden --- | 171 if (nargs == 0) 172 return; 173 174 fsc.args = malloc((1+nargs) * sizeof(unsigned long)); 175 lseek(Procfd, parm_offset, SEEK_SET); 176 if (read(Procfd, fsc.args, nargs * sizeof(unsigned long)) == -1) 177 return; 178 --- 141 unchanged lines hidden --- |