summaryrefslogtreecommitdiff
path: root/sysdeps/linux-gnu/alpha/regs.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/linux-gnu/alpha/regs.c')
-rw-r--r--sysdeps/linux-gnu/alpha/regs.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sysdeps/linux-gnu/alpha/regs.c b/sysdeps/linux-gnu/alpha/regs.c
index 0b46afd..9ccd8f2 100644
--- a/sysdeps/linux-gnu/alpha/regs.c
+++ b/sysdeps/linux-gnu/alpha/regs.c
@@ -1,5 +1,6 @@
/*
* This file is part of ltrace.
+ * Copyright (C) 2013 Petr Machata, Red Hat Inc.
* Copyright (C) 2004,2008,2009 Juan Cespedes
*
* This program is free software; you can redistribute it and/or
@@ -36,26 +37,25 @@
#endif
void *
-get_instruction_pointer(Process *proc) {
+get_instruction_pointer(struct process *proc)
+{
return (void *)ptrace(PTRACE_PEEKUSER, proc->pid, 64 /* REG_PC */ , 0);
}
void
-set_instruction_pointer(Process *proc, void *addr) {
+set_instruction_pointer(struct process *proc, void *addr)
+{
ptrace(PTRACE_POKEUSER, proc->pid, 64 /* REG_PC */ , addr);
}
void *
-get_stack_pointer(Process *proc) {
+get_stack_pointer(struct process *proc)
+{
return (void *)ptrace(PTRACE_PEEKUSER, proc->pid, 30 /* REG_FP */ , 0);
}
void *
-get_return_addr(Process *proc, void *stack_pointer) {
+get_return_addr(struct process *proc, void *stack_pointer)
+{
return (void *)ptrace(PTRACE_PEEKUSER, proc->pid, 26 /* RA */ , 0);
}
-
-void
-set_return_addr(Process *proc, void *addr) {
- ptrace(PTRACE_POKEUSER, proc->pid, 26 /* RA */ , addr);
-}