aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/linux-gnu/ia64
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2012-12-17 03:20:34 +0100
committerPetr Machata <pmachata@redhat.com>2012-12-17 03:20:34 +0100
commit929bd57ca202fd2f2e8485ebf65d683e664f67b5 (patch)
treec286cdcc9dd72faa6a6d99eeae92a82b71a0257d /sysdeps/linux-gnu/ia64
parent5cde20b3588001c9c3a51e0e7b902fff58393706 (diff)
downloadltrace-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/ia64')
-rw-r--r--sysdeps/linux-gnu/ia64/fetch.c24
-rw-r--r--sysdeps/linux-gnu/ia64/plt.c5
-rw-r--r--sysdeps/linux-gnu/ia64/regs.c15
-rw-r--r--sysdeps/linux-gnu/ia64/trace.c6
4 files changed, 29 insertions, 21 deletions
diff --git a/sysdeps/linux-gnu/ia64/fetch.c b/sysdeps/linux-gnu/ia64/fetch.c
index 54dc5b8..e90dbed 100644
--- a/sysdeps/linux-gnu/ia64/fetch.c
+++ b/sysdeps/linux-gnu/ia64/fetch.c
@@ -63,7 +63,7 @@ union cfm_t {
};
static int
-fetch_context_init(struct Process *proc, struct fetch_context *context)
+fetch_context_init(struct process *proc, struct fetch_context *context)
{
context->slot_n = 0;
context->flt = 8;
@@ -76,7 +76,7 @@ fetch_context_init(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));
@@ -91,7 +91,7 @@ arch_fetch_arg_init(enum tof type, struct Process *proc,
}
struct fetch_context *
-arch_fetch_arg_clone(struct Process *proc,
+arch_fetch_arg_clone(struct process *proc,
struct fetch_context *context)
{
struct fetch_context *clone = malloc(sizeof(*context));
@@ -102,7 +102,7 @@ arch_fetch_arg_clone(struct Process *proc,
}
int
-allocate_stack_slot(struct fetch_context *ctx, struct Process *proc,
+allocate_stack_slot(struct fetch_context *ctx, struct process *proc,
struct arg_type_info *info, struct value *valuep)
{
size_t al = type_alignof(proc, info);
@@ -121,7 +121,7 @@ allocate_stack_slot(struct fetch_context *ctx, struct Process *proc,
}
static int
-allocate_reg(struct fetch_context *ctx, struct Process *proc,
+allocate_reg(struct fetch_context *ctx, struct process *proc,
struct arg_type_info *info, struct value *valuep)
{
if (ctx->slot_n >= 8)
@@ -152,7 +152,7 @@ allocate_reg(struct fetch_context *ctx, struct Process *proc,
}
static int
-copy_aggregate_part(struct fetch_context *ctx, struct Process *proc,
+copy_aggregate_part(struct fetch_context *ctx, struct process *proc,
unsigned char *buf, size_t size)
{
size_t slots = (size + 7) / 8;
@@ -176,7 +176,7 @@ copy_aggregate_part(struct fetch_context *ctx, struct Process *proc,
}
static int
-allocate_arg(struct fetch_context *ctx, struct Process *proc,
+allocate_arg(struct fetch_context *ctx, struct process *proc,
struct arg_type_info *info, struct value *valuep)
{
size_t sz = type_sizeof(proc, info);
@@ -213,7 +213,7 @@ fpreg_to_double (struct ia64_fpreg *fp) {
}
static int
-allocate_float(struct fetch_context *ctx, struct Process *proc,
+allocate_float(struct fetch_context *ctx, struct process *proc,
struct arg_type_info *info, struct value *valuep,
int take_slot)
{
@@ -281,7 +281,7 @@ get_hfa_type(struct arg_type_info *info, size_t *countp)
}
static int
-allocate_hfa(struct fetch_context *ctx, struct Process *proc,
+allocate_hfa(struct fetch_context *ctx, struct process *proc,
struct arg_type_info *info, struct value *valuep,
enum arg_type hfa_type, size_t hfa_count)
{
@@ -366,7 +366,7 @@ allocate_hfa(struct fetch_context *ctx, struct Process *proc,
}
static int
-allocate_ret(struct fetch_context *ctx, struct Process *proc,
+allocate_ret(struct fetch_context *ctx, struct process *proc,
struct arg_type_info *info, struct value *valuep)
{
size_t sz = type_sizeof(proc, info);
@@ -405,7 +405,7 @@ allocate_ret(struct fetch_context *ctx, struct Process *proc,
int
arch_fetch_arg_next(struct fetch_context *ctx, enum tof type,
- struct Process *proc,
+ struct process *proc,
struct arg_type_info *info, struct value *valuep)
{
switch (info->type) {
@@ -446,7 +446,7 @@ arch_fetch_arg_next(struct fetch_context *ctx, enum tof type,
int
arch_fetch_retval(struct fetch_context *ctx, enum tof type,
- struct Process *proc, struct arg_type_info *info,
+ struct process *proc, struct arg_type_info *info,
struct value *valuep)
{
if (fetch_context_init(proc, ctx) < 0)
diff --git a/sysdeps/linux-gnu/ia64/plt.c b/sysdeps/linux-gnu/ia64/plt.c
index a29488f..f6bc939 100644
--- a/sysdeps/linux-gnu/ia64/plt.c
+++ b/sysdeps/linux-gnu/ia64/plt.c
@@ -68,12 +68,13 @@ 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;
}
int
-arch_translate_address_dyn(struct Process *proc,
+arch_translate_address_dyn(struct process *proc,
arch_addr_t addr, arch_addr_t *ret)
{
errno = 0;
diff --git a/sysdeps/linux-gnu/ia64/regs.c b/sysdeps/linux-gnu/ia64/regs.c
index cbc2744..fb79e8a 100644
--- a/sysdeps/linux-gnu/ia64/regs.c
+++ b/sysdeps/linux-gnu/ia64/regs.c
@@ -34,7 +34,8 @@
#include "common.h"
void *
-get_instruction_pointer(Process *proc) {
+get_instruction_pointer(struct process *proc)
+{
unsigned long ip = ptrace(PTRACE_PEEKUSER, proc->pid, PT_CR_IIP, 0);
unsigned long slot =
(ptrace(PTRACE_PEEKUSER, proc->pid, PT_CR_IPSR, 0) >> 41) & 3;
@@ -43,7 +44,8 @@ get_instruction_pointer(Process *proc) {
}
void
-set_instruction_pointer(Process *proc, void *addr) {
+set_instruction_pointer(struct process *proc, void *addr)
+{
unsigned long newip = (unsigned long)addr;
unsigned long slot = (unsigned long)addr & 0xf;
@@ -59,7 +61,8 @@ set_instruction_pointer(Process *proc, void *addr) {
}
void *
-get_stack_pointer(Process *proc) {
+get_stack_pointer(struct process *proc)
+{
long l = ptrace(PTRACE_PEEKUSER, proc->pid, PT_R12, 0);
if (l == -1 && errno)
return NULL;
@@ -67,7 +70,8 @@ get_stack_pointer(Process *proc) {
}
void *
-get_return_addr(Process *proc, void *stack_pointer) {
+get_return_addr(struct process *proc, void *stack_pointer)
+{
long l = ptrace(PTRACE_PEEKUSER, proc->pid, PT_B0, 0);
if (l == -1 && errno)
return NULL;
@@ -75,6 +79,7 @@ get_return_addr(Process *proc, void *stack_pointer) {
}
void
-set_return_addr(Process *proc, void *addr) {
+set_return_addr(struct process *proc, void *addr)
+{
ptrace(PTRACE_POKEUSER, proc->pid, PT_B0, addr);
}
diff --git a/sysdeps/linux-gnu/ia64/trace.c b/sysdeps/linux-gnu/ia64/trace.c
index e608275..9e554ef 100644
--- a/sysdeps/linux-gnu/ia64/trace.c
+++ b/sysdeps/linux-gnu/ia64/trace.c
@@ -70,7 +70,8 @@ union cfm_t {
};
int
-syscall_p(Process *proc, int status, int *sysnum) {
+syscall_p(struct process *proc, int status, int *sysnum)
+{
if (WIFSTOPPED(status)
&& WSTOPSIG(status) == (SIGTRAP | proc->tracesysgood)) {
long l = ptrace(PTRACE_PEEKUSER, proc->pid, PT_CR_IPSR, 0);
@@ -141,5 +142,6 @@ syscall_p(Process *proc, int status, int *sysnum) {
}
void
-get_arch_dep(Process *proc) {
+get_arch_dep(struct process *proc)
+{
}