diff options
author | Petr Machata <pmachata@redhat.com> | 2012-12-17 03:20:34 +0100 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2012-12-17 03:20:34 +0100 |
commit | 929bd57ca202fd2f2e8485ebf65d683e664f67b5 (patch) | |
tree | c286cdcc9dd72faa6a6d99eeae92a82b71a0257d /sysdeps/linux-gnu/m68k | |
parent | 5cde20b3588001c9c3a51e0e7b902fff58393706 (diff) | |
download | ltrace-929bd57ca202fd2f2e8485ebf65d683e664f67b5.tar.gz |
struct Process becomes struct process
This is for consistency with other structures, and ultimately with
Linux coding style. The typedef ("Process") was dropped as well for
this reason.
This opportunity was used to fix coding style around the impacted
lines.
Diffstat (limited to 'sysdeps/linux-gnu/m68k')
-rw-r--r-- | sysdeps/linux-gnu/m68k/fetch.c | 10 | ||||
-rw-r--r-- | sysdeps/linux-gnu/m68k/plt.c | 3 | ||||
-rw-r--r-- | sysdeps/linux-gnu/m68k/regs.c | 15 | ||||
-rw-r--r-- | sysdeps/linux-gnu/m68k/trace.c | 6 |
4 files changed, 21 insertions, 13 deletions
diff --git a/sysdeps/linux-gnu/m68k/fetch.c b/sysdeps/linux-gnu/m68k/fetch.c index f6d8a0b..24bd8f0 100644 --- a/sysdeps/linux-gnu/m68k/fetch.c +++ b/sysdeps/linux-gnu/m68k/fetch.c @@ -43,7 +43,7 @@ struct fetch_context }; static int -fetch_register_banks(struct Process *proc, struct fetch_context *context, +fetch_register_banks(struct process *proc, struct fetch_context *context, int floating) { if (ptrace(PTRACE_GETREGS, proc->pid, 0, &context->regs) < 0) @@ -57,7 +57,7 @@ fetch_register_banks(struct Process *proc, struct fetch_context *context, } struct fetch_context * -arch_fetch_arg_init(enum tof type, struct Process *proc, +arch_fetch_arg_init(enum tof type, struct process *proc, struct arg_type_info *ret_info) { struct fetch_context *context = malloc(sizeof(*context)); @@ -92,7 +92,7 @@ arch_fetch_arg_init(enum tof type, struct Process *proc, } struct fetch_context * -arch_fetch_arg_clone(struct Process *proc, struct fetch_context *context) +arch_fetch_arg_clone(struct process *proc, struct fetch_context *context) { struct fetch_context *ret = malloc(sizeof(*ret)); if (ret == NULL) @@ -103,7 +103,7 @@ arch_fetch_arg_clone(struct Process *proc, struct fetch_context *context) int arch_fetch_arg_next(struct fetch_context *context, enum tof type, - struct Process *proc, struct arg_type_info *info, + struct process *proc, struct arg_type_info *info, struct value *valuep) { size_t sz = type_sizeof(proc, info); @@ -143,7 +143,7 @@ arch_fetch_arg_next(struct fetch_context *context, enum tof type, int arch_fetch_retval(struct fetch_context *context, enum tof type, - struct Process *proc, struct arg_type_info *info, + struct process *proc, struct arg_type_info *info, struct value *valuep) { if (fetch_register_banks(proc, context, type == LT_TOF_FUNCTIONR) < 0) diff --git a/sysdeps/linux-gnu/m68k/plt.c b/sysdeps/linux-gnu/m68k/plt.c index c1b37dd..dcd6878 100644 --- a/sysdeps/linux-gnu/m68k/plt.c +++ b/sysdeps/linux-gnu/m68k/plt.c @@ -30,6 +30,7 @@ arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela * rela) { } void * -sym2addr(Process *proc, struct library_symbol *sym) { +sym2addr(struct process *proc, struct library_symbol *sym) +{ return sym->enter_addr; } diff --git a/sysdeps/linux-gnu/m68k/regs.c b/sysdeps/linux-gnu/m68k/regs.c index 4afdfbb..c2fafe1 100644 --- a/sysdeps/linux-gnu/m68k/regs.c +++ b/sysdeps/linux-gnu/m68k/regs.c @@ -36,26 +36,31 @@ #endif void * -get_instruction_pointer(Process *proc) { +get_instruction_pointer(struct process *proc) +{ return (void *)ptrace(PTRACE_PEEKUSER, proc->pid, 4 * PT_PC, 0); } void -set_instruction_pointer(Process *proc, void *addr) { +set_instruction_pointer(struct process *proc, void *addr) +{ ptrace(PTRACE_POKEUSER, proc->pid, 4 * PT_PC, addr); } void * -get_stack_pointer(Process *proc) { +get_stack_pointer(struct process *proc) +{ return (void *)ptrace(PTRACE_PEEKUSER, proc->pid, 4 * PT_USP, 0); } void * -get_return_addr(Process *proc, void *stack_pointer) { +get_return_addr(struct process *proc, void *stack_pointer) +{ return (void *)ptrace(PTRACE_PEEKTEXT, proc->pid, stack_pointer, 0); } void -set_return_addr(Process *proc, void *addr) { +set_return_addr(struct process *proc, void *addr) +{ ptrace(PTRACE_POKETEXT, proc->pid, proc->stack_pointer, addr); } diff --git a/sysdeps/linux-gnu/m68k/trace.c b/sysdeps/linux-gnu/m68k/trace.c index 311ffd5..01b5253 100644 --- a/sysdeps/linux-gnu/m68k/trace.c +++ b/sysdeps/linux-gnu/m68k/trace.c @@ -40,13 +40,15 @@ #endif void -get_arch_dep(Process *proc) { +get_arch_dep(struct process *proc) +{ } /* Returns 1 if syscall, 2 if sysret, 0 otherwise. */ int -syscall_p(Process *proc, int status, int *sysnum) { +syscall_p(struct process *proc, int status, int *sysnum) +{ int depth; if (WIFSTOPPED(status) |