Deleted Added
full compact
sparc64-fbsd.c (213799) sparc64-fbsd.c (222103)
1/*
2 * Copyright 1998 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 * Copyright 1998 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/sparc64-fbsd.c 213799 2010-10-13 20:08:02Z bcr $";
34 "$FreeBSD: head/usr.bin/truss/sparc64-fbsd.c 222103 2011-05-19 20:35:40Z bcr $";
35#endif /* not lint */
36
37/*
38 * FreeBSD/sparc64-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.

--- 87 unchanged lines hidden (view full) ---

130 if (ptrace(PT_GETREGS, cpid, (caddr_t)&regs, 0) < 0) {
131 fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n");
132 return;
133 }
134
135 /*
136 * FreeBSD has two special kinds of system call redirctions --
137 * SYS_syscall, and SYS___syscall. The former is the old syscall()
35#endif /* not lint */
36
37/*
38 * FreeBSD/sparc64-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.

--- 87 unchanged lines hidden (view full) ---

130 if (ptrace(PT_GETREGS, cpid, (caddr_t)&regs, 0) < 0) {
131 fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n");
132 return;
133 }
134
135 /*
136 * FreeBSD has two special kinds of system call redirctions --
137 * SYS_syscall, and SYS___syscall. The former is the old syscall()
138 * routine, basicly; the latter is for quad-aligned arguments.
138 * routine, basically; the latter is for quad-aligned arguments.
139 */
140 syscall_num = regs.r_global[1];
141 if (syscall_num == SYS_syscall || syscall_num == SYS___syscall) {
142 indir = 1;
143 syscall_num = regs.r_out[0];
144 }
145
146 fsc.number = syscall_num;

--- 197 unchanged lines hidden ---
139 */
140 syscall_num = regs.r_global[1];
141 if (syscall_num == SYS_syscall || syscall_num == SYS___syscall) {
142 indir = 1;
143 syscall_num = regs.r_out[0];
144 }
145
146 fsc.number = syscall_num;

--- 197 unchanged lines hidden ---