Deleted Added
full compact
powerpc64-freebsd32.c (289239) powerpc64-freebsd32.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/powerpc64-freebsd32.c 289239 2015-10-13 18:23:51Z bdrewery $");
29__FBSDID("$FreeBSD: head/usr.bin/truss/powerpc64-freebsd32.c 294849 2016-01-26 19:07:09Z jhb $");
30
31/* FreeBSD/powerpc64-freebsd32-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/powerpc64-freebsd32-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 "freebsd32_syscalls.h"
44
45static int
46powerpc64_freebsd32_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;

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

113 retval[0] = regs.fixreg[3] & 0xffffffff;
114 retval[1] = regs.fixreg[4] & 0xffffffff;
115 *errorp = !!(regs.cr & 0x10000000);
116 return (0);
117}
118
119static struct procabi powerpc64_freebsd32 = {
120 "FreeBSD ELF32",
44static int
45powerpc64_freebsd32_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;

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

112 retval[0] = regs.fixreg[3] & 0xffffffff;
113 retval[1] = regs.fixreg[4] & 0xffffffff;
114 *errorp = !!(regs.cr & 0x10000000);
115 return (0);
116}
117
118static struct procabi powerpc64_freebsd32 = {
119 "FreeBSD ELF32",
121 syscallnames,
122 nitems(syscallnames),
120 FREEBSD32,
123 powerpc64_freebsd32_fetch_args,
124 powerpc64_freebsd32_fetch_retval
125};
126
127PROCABI(powerpc64_freebsd32);
121 powerpc64_freebsd32_fetch_args,
122 powerpc64_freebsd32_fetch_retval
123};
124
125PROCABI(powerpc64_freebsd32);