Deleted Added
full compact
arm-fbsd.c (256281) arm-fbsd.c (278613)
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: stable/10/usr.bin/truss/arm-fbsd.c 247975 2013-03-07 23:44:35Z cognet $");
41__FBSDID("$FreeBSD: stable/10/usr.bin/truss/arm-fbsd.c 278613 2015-02-12 03:50:33Z ian $");
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

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

311 tid = trussinfo->curthread->tid;
312
313 if (ptrace(PT_GETREGS, tid, (caddr_t)&regs, 0) < 0) {
314 fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n");
315 return (-1);
316 }
317
318 retval = regs.r[0];
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

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

311 tid = trussinfo->curthread->tid;
312
313 if (ptrace(PT_GETREGS, tid, (caddr_t)&regs, 0) < 0) {
314 fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n");
315 return (-1);
316 }
317
318 retval = regs.r[0];
319 errorp = !!(regs.r_cpsr & PSR_C_bit);
319 errorp = !!(regs.r_cpsr & PSR_C);
320
321 /*
322 * This code, while simpler than the initial versions I used, could
323 * stand some significant cleaning.
324 */
325
326 fsc = trussinfo->curthread->fsc;
327 sc = fsc->sc;

--- 42 unchanged lines hidden ---
320
321 /*
322 * This code, while simpler than the initial versions I used, could
323 * stand some significant cleaning.
324 */
325
326 fsc = trussinfo->curthread->fsc;
327 sc = fsc->sc;

--- 42 unchanged lines hidden ---