aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/linux-gnu/m68k
diff options
context:
space:
mode:
authorJuan Cespedes <cespedes@coco.thehackers.org>2009-07-04 11:29:27 +0200
committerJuan Cespedes <cespedes@coco.thehackers.org>2009-07-04 11:29:27 +0200
commit2a61d19bd244dadcde5009f1632cf14b95623e3d (patch)
treef833420c3848ec72bf3355273880364687f909b9 /sysdeps/linux-gnu/m68k
parent61da33723c5fb09762e38bd39a26ee15d62ffebc (diff)
downloadltrace-2a61d19bd244dadcde5009f1632cf14b95623e3d.tar.gz
Added set_return_addr() to sysdeps/linux-gnu/*/regs.c
Diffstat (limited to 'sysdeps/linux-gnu/m68k')
-rw-r--r--sysdeps/linux-gnu/m68k/plt.c1
-rw-r--r--sysdeps/linux-gnu/m68k/regs.c5
2 files changed, 5 insertions, 1 deletions
diff --git a/sysdeps/linux-gnu/m68k/plt.c b/sysdeps/linux-gnu/m68k/plt.c
index 79c1173..508d7fc 100644
--- a/sysdeps/linux-gnu/m68k/plt.c
+++ b/sysdeps/linux-gnu/m68k/plt.c
@@ -1,6 +1,5 @@
#include <gelf.h>
#include "common.h"
-#include "elf.h"
GElf_Addr
arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela * rela) {
diff --git a/sysdeps/linux-gnu/m68k/regs.c b/sysdeps/linux-gnu/m68k/regs.c
index 5acfb61..f4a9a65 100644
--- a/sysdeps/linux-gnu/m68k/regs.c
+++ b/sysdeps/linux-gnu/m68k/regs.c
@@ -35,3 +35,8 @@ void *
get_return_addr(Process *proc, void *stack_pointer) {
return (void *)ptrace(PTRACE_PEEKTEXT, proc->pid, stack_pointer, 0);
}
+
+void
+set_return_addr(Process *proc, void *addr) {
+ ptrace(PTRACE_POKETEXT, proc->pid, proc->stack_pointer, addr);
+}