Commit Graph

6 Commits

Author SHA1 Message Date
Eugene Syromiatnikov
20ac169d7b Change the first argument of upeek from pid to tcp
All users were changed automatically by:

	for i in `git grep -l 'upeek(tcp->pid'`; do \
		sed -i 's/upeek(tcp->pid/upeek(tcp/g' "$i"; \
	done

* upeek.c (upeek): Change the first argument from pid_t pid to struct
tcb *tcp. Use tcp->pid instead of pid in the function's body.
* defs.h (upeek): Update declaration.
* linux/alpha/arch_getrval2.c: Pass tcp instead of tcp->pid to the
upeek calls.
* linux/alpha/arch_rt_sigframe.c: Likewise.
* linux/alpha/arch_sigreturn.c: Likewise.
* linux/alpha/get_scno.c: Likewise.
* linux/alpha/get_syscall_args.c: Likewise.
* linux/alpha/get_syscall_result.c: Likewise.
* linux/bfin/arch_rt_sigframe.c: Likewise.
* linux/bfin/get_scno.c: Likewise.
* linux/bfin/get_syscall_args.c: Likewise.
* linux/bfin/get_syscall_result.c: Likewise.
* linux/crisv10/arch_rt_sigframe.c: Likewise.
* linux/crisv10/get_scno.c: Likewise.
* linux/crisv10/get_syscall_args.c: Likewise.
* linux/crisv10/get_syscall_result.c: Likewise.
* linux/hppa/arch_rt_sigframe.c: Likewise.
* linux/hppa/get_scno.c: Likewise.
* linux/hppa/get_syscall_args.c: Likewise.
* linux/hppa/get_syscall_result.c: Likewise.
* linux/microblaze/arch_rt_sigframe.c: Likewise.
* linux/microblaze/arch_sigreturn.c: Likewise.
* linux/microblaze/get_scno.c: Likewise.
* linux/microblaze/get_syscall_args.c: Likewise.
* linux/microblaze/get_syscall_result.c: Likewise.
* linux/powerpc/getregs_old.c: Likewise.
* linux/sh/arch_getrval2.c: Likewise.
* linux/sh/arch_rt_sigframe.c: Likewise.
* linux/sh/get_scno.c: Likewise.
* linux/sh/get_syscall_args.c: Likewise.
* linux/sh/get_syscall_result.c: Likewise.
* linux/sh64/get_scno.c: Likewise.
* linux/sh64/get_syscall_args.c: Likewise.
* linux/sh64/get_syscall_result.c: Likewise.
* linux/xtensa/arch_rt_sigframe.c: Likewise.
* linux/xtensa/get_scno.c: Likewise.
* linux/xtensa/get_syscall_args.c: Likewise.
* linux/xtensa/get_syscall_result.c: Likewise.
* syscall.c: Likewise.
2018-01-04 00:37:27 +01:00
Eugene Syromyatnikov
9d095c7860 Add copyright headers 2017-05-22 17:33:51 +00:00
7fa3d78319 Automatically replace kernel_(scno|ureg)_t with kernel_ulong_t
Remove temporary types created for transition from long
to kernel_ulong_t.

Automatically replace kernel_scno_t and kernel_ureg_t with
kernel_ulong_t using
$ git grep -El 'kernel_(scno|ureg)_t' |
  xargs sed -ri 's/kernel_(scno|ureg)_t/kernel_ulong_t/g'

* kernel_types.h (kernel_scno_t, kernel_ureg_t): Remove.
All users updated.
2016-12-26 10:43:34 +00:00
0eda4a0a4b upeek, upoke: change argument types from long to unsigned long
* defs.h (upeek, upoke): Change offset argument type from long
to unsigned long.  Change res argument type from long to kernel_ureg_t.
* upeek.c (upeek): Likewise.
* upoke.c (upoke.c): Likewise.
* syscall.c (print_pc) [ARCH_PC_PEEK_ADDR]: Change pc type from long
to kernel_ureg_t.
* linux/aarch64/arch_regs.c (arm_sp_ptr): Remove redundant cast.
* linux/metag/get_syscall_args.c (get_syscall_args): Likewise.
* linux/sh/get_syscall_result.c (get_syscall_result_regs): Likewise.
* linux/sh64/get_syscall_result.c (get_syscall_result_regs): Likewise.
* linux/powerpc/getregs_old.c (getregs_old): Remove redundant casts.
* linux/alpha/arch_getrval2.c (getrval2): Change r20 type from long
to unsigned long.
* linux/alpha/arch_regs.c (alpha_r0, alpha_a3): Change type from long
to unsigned long.
* linux/bfin/arch_regs.c (bfin_r0): Likewise.
* linux/crisv10/arch_regs.c (cris_r10): Likewise.
* linux/hppa/arch_regs.c (hppa_r28): Likewise.
* linux/ia64/arch_regs.c (IA64_PSR_IS): Likewise.
* linux/microblaze/arch_regs.c (microblaze_r3): Likewise.
* linux/sh/arch_regs.c (sh_r0): Likewise.
* linux/sh64/arch_regs.c (sh64_r9): Likewise.
* linux/xtensa/arch_regs.c (xtensa_a2): Likewise.
* linux/alpha/arch_sigreturn.c (arch_sigreturn): Change addr type
from long to unsigned long.
* linux/microblaze/arch_sigreturn.c (arch_sigreturn): Likewise.
* linux/alpha/get_scno.c (arch_get_scno): Update for the change
of signedness.
* linux/arc/get_syscall_args.c (get_syscall_args): Change arc_args type
from pointer to long to pointer to unsigned long.
* linux/arm/arch_regs.c (arm_sp_ptr): Change type from pointer to long
to pointer to unsigned long.
* linux/arm/arch_regs.h (arm_sp_ptr): Likewise.
* linux/i386/arch_regs.c (i386_esp_ptr): Likewise.
* linux/i386/arch_regs.h (i386_esp_ptr): Likewise.
* linux/m68k/arch_regs.c (m68k_usp_ptr): Likewise.
* linux/m68k/arch_regs.h (m68k_usp_ptr): Likewise.
* linux/ia64/get_syscall_args.c (get_syscall_args): Use umove
instead of umoven.
* linux/sh/arch_getrval2.c (getrval2): Change val type from long
to unsigned long.
2016-12-25 20:14:12 +00:00
82ffa78acd Fix casts of ptrace's third argument
* strace.c (maybe_allocate_tcb): Replace "(char *) 0" with NULL
as ptrace's third argument.
* linux/sparc64/get_scno.c (arch_get_scno): Cast third argument
of ptrace to "void *'.
* syscall.c (get_regs): Likewise.
* upeek.c (upeek): Likewise.
* util.c (umoven): Likewise.
2016-07-26 16:14:50 +00:00
6ca4c92c1b Introduce libstrace.a for potentially conditional compilation units
Some files are used conditionally depending on architecture and
configuration.  Create a library for the purpose of keeping such
compilation units.

* Makefile.am (strace_LDADD, noinst_LIBRARIES): Add libstrace.a.
(libstrace_a_CPPFLAGS): New variable, set to $(strace_CPPFLAGS).
(libstrace_a_CFLAGS): New variable, set to $(strace_CFLAGS).
(libstrace_a_SOURCES): New variable, set to upeek.c.
* util.c (upeek): Move ...
* upeek.c: ... here.
2016-02-09 05:08:00 +00:00