Deleted Added
full compact
arm-freebsd.c (286937) arm-freebsd.c (286938)
1/*
2 * Copyright 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.

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

33 * FreeBSD/arm-specific system call handling. This is probably the most
34 * complex part of the entire truss program, although I've got lots of
35 * it handled relatively cleanly now. The system call names are generated
36 * automatically, thanks to /usr/src/sys/kern/syscalls.master. The
37 * names used for the various structures are confusing, I sadly admit.
38 */
39
40#include <sys/cdefs.h>
1/*
2 * Copyright 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.

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

33 * FreeBSD/arm-specific system call handling. This is probably the most
34 * complex part of the entire truss program, although I've got lots of
35 * it handled relatively cleanly now. The system call names are generated
36 * automatically, thanks to /usr/src/sys/kern/syscalls.master. The
37 * names used for the various structures are confusing, I sadly admit.
38 */
39
40#include <sys/cdefs.h>
41__FBSDID("$FreeBSD: head/usr.bin/truss/arm-fbsd.c 286937 2015-08-19 19:59:42Z jhb $");
41__FBSDID("$FreeBSD: head/usr.bin/truss/arm-fbsd.c 286938 2015-08-19 20:02:03Z jhb $");
42#include <sys/types.h>
43#include <sys/ptrace.h>
44#include <sys/syscall.h>
45
46#include <machine/reg.h>
47#include <machine/armreg.h>
48#include <machine/ucontext.h>
49

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

331 asprintf(&fsc->s_args[i], "0x%lx", fsc->args[i]);
332 } else {
333 /*
334 * Here, we only look for arguments that have OUT masked in --
335 * otherwise, they were handled in the syscall_entry function.
336 */
337 for (i = 0; i < sc->nargs; i++) {
338 char *temp;
42#include <sys/types.h>
43#include <sys/ptrace.h>
44#include <sys/syscall.h>
45
46#include <machine/reg.h>
47#include <machine/armreg.h>
48#include <machine/ucontext.h>
49

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

331 asprintf(&fsc->s_args[i], "0x%lx", fsc->args[i]);
332 } else {
333 /*
334 * Here, we only look for arguments that have OUT masked in --
335 * otherwise, they were handled in the syscall_entry function.
336 */
337 for (i = 0; i < sc->nargs; i++) {
338 char *temp;
339
339 if (sc->args[i].type & OUT) {
340 /*
341 * If an error occurred, then don't bother
342 * getting the data; it may not be valid.
343 */
344 if (errorp) {
345 asprintf(&temp, "0x%lx",
346 fsc->args[sc->args[i].offset]);

--- 24 unchanged lines hidden ---
340 if (sc->args[i].type & OUT) {
341 /*
342 * If an error occurred, then don't bother
343 * getting the data; it may not be valid.
344 */
345 if (errorp) {
346 asprintf(&temp, "0x%lx",
347 fsc->args[sc->args[i].offset]);

--- 24 unchanged lines hidden ---