Deleted Added
full compact
powerpc-freebsd.c (289239) powerpc-freebsd.c (294849)
1/*
2 * Copyright 2006 Peter Grehan <grehan@freebsd.org>
3 * Copyright 2005 Orlando Bassotto <orlando@break.net>
4 * Copyright 1998 Sean Eric Fagan
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
1/*
2 * Copyright 2006 Peter Grehan <grehan@freebsd.org>
3 * Copyright 2005 Orlando Bassotto <orlando@break.net>
4 * Copyright 1998 Sean Eric Fagan
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/usr.bin/truss/powerpc-freebsd.c 289239 2015-10-13 18:23:51Z bdrewery $");
29__FBSDID("$FreeBSD: head/usr.bin/truss/powerpc-freebsd.c 294849 2016-01-26 19:07:09Z jhb $");
30
31/* FreeBSD/powerpc-specific system call handling. */
32
33#include <sys/ptrace.h>
34#include <sys/syscall.h>
35
36#include <machine/reg.h>
37#include <machine/frame.h>
38
39#include <stdio.h>
30
31/* FreeBSD/powerpc-specific system call handling. */
32
33#include <sys/ptrace.h>
34#include <sys/syscall.h>
35
36#include <machine/reg.h>
37#include <machine/frame.h>
38
39#include <stdio.h>
40#include <sysdecode.h>
40
41#include "truss.h"
42
41
42#include "truss.h"
43
43#include "freebsd_syscalls.h"
44
45static int
46powerpc_fetch_args(struct trussinfo *trussinfo, u_int narg)
47{
48 struct ptrace_io_desc iorequest;
49 struct reg regs;
50 struct current_syscall *cs;
51 lwpid_t tid;
52 u_int i, reg;

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

108 retval[0] = regs.fixreg[3];
109 retval[1] = regs.fixreg[4];
110 *errorp = !!(regs.cr & 0x10000000);
111 return (0);
112}
113
114static struct procabi powerpc_freebsd = {
115 "FreeBSD ELF32",
44static int
45powerpc_fetch_args(struct trussinfo *trussinfo, u_int narg)
46{
47 struct ptrace_io_desc iorequest;
48 struct reg regs;
49 struct current_syscall *cs;
50 lwpid_t tid;
51 u_int i, reg;

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

107 retval[0] = regs.fixreg[3];
108 retval[1] = regs.fixreg[4];
109 *errorp = !!(regs.cr & 0x10000000);
110 return (0);
111}
112
113static struct procabi powerpc_freebsd = {
114 "FreeBSD ELF32",
116 syscallnames,
117 nitems(syscallnames),
115 FREEBSD,
118 powerpc_fetch_args,
119 powerpc_fetch_retval
120};
121
122PROCABI(powerpc_freebsd);
116 powerpc_fetch_args,
117 powerpc_fetch_retval
118};
119
120PROCABI(powerpc_freebsd);