aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/linux-gnu/ia64
diff options
context:
space:
mode:
authorJuan Cespedes <cespedes@debian.org>2008-12-16 18:19:58 +0100
committerJuan Cespedes <cespedes@debian.org>2008-12-16 18:19:58 +0100
commitf13505251e6402460f6cc7ec84e0d8ca91607b4f (patch)
tree883ded52fe552220b5500f761f8e3031de22c043 /sysdeps/linux-gnu/ia64
parent7dd291227d81d3bc32c67e90fb7f7c51c76f39dd (diff)
downloadltrace-f13505251e6402460f6cc7ec84e0d8ca91607b4f.tar.gz
Re-indent entry points to functions
Diffstat (limited to 'sysdeps/linux-gnu/ia64')
-rw-r--r--sysdeps/linux-gnu/ia64/breakpoint.c24
-rw-r--r--sysdeps/linux-gnu/ia64/plt.c8
-rw-r--r--sysdeps/linux-gnu/ia64/regs.c16
-rw-r--r--sysdeps/linux-gnu/ia64/trace.c28
4 files changed, 37 insertions, 39 deletions
diff --git a/sysdeps/linux-gnu/ia64/breakpoint.c b/sysdeps/linux-gnu/ia64/breakpoint.c
index 6d20d18..2d741bb 100644
--- a/sysdeps/linux-gnu/ia64/breakpoint.c
+++ b/sysdeps/linux-gnu/ia64/breakpoint.c
@@ -11,8 +11,8 @@
#include "output.h"
#include "debug.h"
-static long long extract_bit_field(char *bundle, int from, int len)
-{
+static long long
+extract_bit_field(char *bundle, int from, int len) {
long long result = 0LL;
int to = from + len;
int from_byte = from / 8;
@@ -43,8 +43,8 @@ static long long extract_bit_field(char *bundle, int from, int len)
}
/* Replace the specified bits in an instruction bundle */
-static void replace_bit_field(char *bundle, long long val, int from, int len)
-{
+static void
+replace_bit_field(char *bundle, long long val, int from, int len) {
int to = from + len;
int from_byte = from / 8;
int to_byte = to / 8;
@@ -89,15 +89,15 @@ static void replace_bit_field(char *bundle, long long val, int from, int len)
/* Return the contents of slot N (for N = 0, 1, or 2) in
and instruction bundle */
-static long long slotN_contents(char *bundle, int slotnum)
-{
+static long long
+slotN_contents(char *bundle, int slotnum) {
return extract_bit_field(bundle, 5 + 41 * slotnum, 41);
}
/* Store an instruction in an instruction bundle */
-static void replace_slotN_contents(char *bundle, long long instr, int slotnum)
-{
+static void
+replace_slotN_contents(char *bundle, long long instr, int slotnum) {
replace_bit_field(bundle, instr, 5 + 41 * slotnum, 41);
}
@@ -152,8 +152,8 @@ union bundle_t {
unsigned long ubundle[2];
};
-void arch_enable_breakpoint(pid_t pid, struct breakpoint *sbp)
-{
+void
+arch_enable_breakpoint(pid_t pid, struct breakpoint *sbp) {
unsigned long addr = (unsigned long)sbp->addr;
union bundle_t bundle;
@@ -189,8 +189,8 @@ void arch_enable_breakpoint(pid_t pid, struct breakpoint *sbp)
}
-void arch_disable_breakpoint(pid_t pid, const struct breakpoint *sbp)
-{
+void
+arch_disable_breakpoint(pid_t pid, const struct breakpoint *sbp) {
unsigned long addr = (unsigned long)sbp->addr;
int slotnum = (int)(addr & 0x0f) & 0x3;
diff --git a/sysdeps/linux-gnu/ia64/plt.c b/sysdeps/linux-gnu/ia64/plt.c
index b1d1af4..c3b73bf 100644
--- a/sysdeps/linux-gnu/ia64/plt.c
+++ b/sysdeps/linux-gnu/ia64/plt.c
@@ -24,8 +24,8 @@
*/
-GElf_Addr arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela * rela)
-{
+GElf_Addr
+arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela * rela) {
/* Find number of entires by removing header and special
* entry, dividing total size by three, since each PLT entry
* will have 3 bundles (1 for inital entry and two for the PLT
@@ -42,7 +42,7 @@ GElf_Addr arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela * rela)
return addr;
}
-void *sym2addr(struct process *proc, struct library_symbol *sym)
-{
+void *
+sym2addr(struct process *proc, struct library_symbol *sym) {
return sym->enter_addr;
}
diff --git a/sysdeps/linux-gnu/ia64/regs.c b/sysdeps/linux-gnu/ia64/regs.c
index b864031..e694a3a 100644
--- a/sysdeps/linux-gnu/ia64/regs.c
+++ b/sysdeps/linux-gnu/ia64/regs.c
@@ -12,8 +12,8 @@
#include "debug.h"
#include "ltrace.h"
-void *get_instruction_pointer(struct process *proc)
-{
+void *
+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;
@@ -21,8 +21,8 @@ void *get_instruction_pointer(struct process *proc)
return (void *)(ip | slot);
}
-void set_instruction_pointer(struct process *proc, void *addr)
-{
+void
+set_instruction_pointer(struct process *proc, void *addr) {
unsigned long newip = (unsigned long)addr;
unsigned long slot = (unsigned long)addr & 0xf;
@@ -37,12 +37,12 @@ void set_instruction_pointer(struct process *proc, void *addr)
ptrace(PTRACE_POKEUSER, proc->pid, PT_CR_IPSR, psr);
}
-void *get_stack_pointer(struct process *proc)
-{
+void *
+get_stack_pointer(struct process *proc) {
return (void *)ptrace(PTRACE_PEEKUSER, proc->pid, PT_R12, 0);
}
-void *get_return_addr(struct process *proc, void *stack_pointer)
-{
+void *
+get_return_addr(struct process *proc, void *stack_pointer) {
return (void *)ptrace(PTRACE_PEEKUSER, proc->pid, PT_B0, 0);
}
diff --git a/sysdeps/linux-gnu/ia64/trace.c b/sysdeps/linux-gnu/ia64/trace.c
index 565cd6f..9d2aa5e 100644
--- a/sysdeps/linux-gnu/ia64/trace.c
+++ b/sysdeps/linux-gnu/ia64/trace.c
@@ -46,9 +46,8 @@ union cfm_t {
unsigned long value;
};
-int syscall_p(struct process *proc, int status, int *sysnum)
-{
-
+int
+syscall_p(struct process *proc, int status, int *sysnum) {
if (WIFSTOPPED(status)
&& WSTOPSIG(status) == (SIGTRAP | proc->tracesysgood)) {
unsigned long slot =
@@ -121,16 +120,15 @@ int syscall_p(struct process *proc, int status, int *sysnum)
the GPL
(http://www.gelato.unsw.edu.au/archives/linux-ia64/0104/1405.html) */
static inline double
-fpreg_to_double (struct ia64_fpreg *fp)
-{
+fpreg_to_double (struct ia64_fpreg *fp) {
double result;
asm ("ldf.fill %0=%1" : "=f"(result) : "m"(*fp));
return result;
}
-static long gimme_long_arg(enum tof type, struct process *proc, int arg_num)
-{
+static long
+gimme_long_arg(enum tof type, struct process *proc, int arg_num) {
union cfm_t cfm;
unsigned long bsp;
@@ -181,8 +179,8 @@ static long gimme_long_arg(enum tof type, struct process *proc, int arg_num)
static long float_regs[8] = { PT_F8, PT_F9, PT_F10, PT_F11,
PT_F12, PT_F13, PT_F14, PT_F15 };
-static double gimme_float_arg(enum tof type, struct process *proc, int arg_num)
-{
+static double
+gimme_float_arg(enum tof type, struct process *proc, int arg_num) {
union cfm_t cfm;
unsigned long bsp;
struct ia64_fpreg reg;
@@ -245,8 +243,8 @@ static double gimme_float_arg(enum tof type, struct process *proc, int arg_num)
exit(1);
}
-long gimme_arg(enum tof type, struct process *proc, int arg_num, arg_type_info *info)
-{
+long
+gimme_arg(enum tof type, struct process *proc, int arg_num, arg_type_info *info) {
union {
long l;
float f;
@@ -263,10 +261,10 @@ long gimme_arg(enum tof type, struct process *proc, int arg_num, arg_type_info *
return cvt.l;
}
-void save_register_args(enum tof type, struct process *proc)
-{
+void
+save_register_args(enum tof type, struct process *proc) {
}
-void get_arch_dep(struct process *proc)
-{
+void
+get_arch_dep(struct process *proc) {
}