Deleted Added
full compact
amd64-cloudabi64.c (290186) amd64-cloudabi64.c (294849)
1/*-
2 * Copyright (c) 2015 Nuxi, https://nuxi.nl/
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.

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

19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE.
24 */
25
26#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2015 Nuxi, https://nuxi.nl/
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.

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

19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE.
24 */
25
26#include <sys/cdefs.h>
27__FBSDID("$FreeBSD: head/usr.bin/truss/amd64-cloudabi64.c 290186 2015-10-30 08:11:37Z ed $");
27__FBSDID("$FreeBSD: head/usr.bin/truss/amd64-cloudabi64.c 294849 2016-01-26 19:07:09Z jhb $");
28
29#include <sys/param.h>
30#include <sys/ptrace.h>
31
32#include <machine/psl.h>
33
34#include <errno.h>
35#include <stdio.h>
28
29#include <sys/param.h>
30#include <sys/ptrace.h>
31
32#include <machine/psl.h>
33
34#include <errno.h>
35#include <stdio.h>
36#include <sysdecode.h>
36
37#include "cloudabi.h"
37
38#include "cloudabi.h"
38#include "cloudabi64_syscalls.h"
39#include "truss.h"
40
41static int
42amd64_cloudabi64_fetch_args(struct trussinfo *trussinfo, unsigned int narg)
43{
44 struct current_syscall *cs;
45 struct reg regs;
46 lwpid_t tid;

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

85 *errorp = (regs.r_rflags & PSL_C) != 0;
86 if (*errorp)
87 retval[0] = cloudabi_convert_errno(retval[0]);
88 return (0);
89}
90
91static struct procabi amd64_cloudabi64 = {
92 "CloudABI ELF64",
39#include "truss.h"
40
41static int
42amd64_cloudabi64_fetch_args(struct trussinfo *trussinfo, unsigned int narg)
43{
44 struct current_syscall *cs;
45 struct reg regs;
46 lwpid_t tid;

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

85 *errorp = (regs.r_rflags & PSL_C) != 0;
86 if (*errorp)
87 retval[0] = cloudabi_convert_errno(retval[0]);
88 return (0);
89}
90
91static struct procabi amd64_cloudabi64 = {
92 "CloudABI ELF64",
93 syscallnames,
94 nitems(syscallnames),
93 CLOUDABI64,
95 amd64_cloudabi64_fetch_args,
96 amd64_cloudabi64_fetch_retval
97};
98
99PROCABI(amd64_cloudabi64);
94 amd64_cloudabi64_fetch_args,
95 amd64_cloudabi64_fetch_retval
96};
97
98PROCABI(amd64_cloudabi64);