[PATCH 6/6] nds32: add NDS32 support into process.c
Macpaul Lin
macpaul at andestech.com
Fri Feb 11 09:38:01 UTC 2011
add NDS32 support into process.c
Signed-off-by: Macpaul Lin <macpaul at andestech.com>
---
process.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/process.c b/process.c
index 764abaf..b309f00 100644
--- a/process.c
+++ b/process.c
@@ -798,6 +798,11 @@ change_syscall(struct tcb *tcp, int new)
if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(PT_GPR(0)), new)<0)
return -1;
return 0;
+#elif defined(NDS32)
+ if (ptrace (PTRACE_POKEUSER, tcp->pid, (char *)(4*4), new) != 0)
+ return -1;
+
+ return 0;
#else
#warning Do not know how to handle change_syscall for this architecture
#endif /* architecture */
@@ -3212,13 +3217,13 @@ const struct xlat struct_user_offsets[] = {
{ uoff(start_stack), "offsetof(struct user, start_stack)" },
# endif
{ uoff(signal), "offsetof(struct user, signal)" },
-# if !defined(AVR32) && !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SH) && !defined(SH64) && !defined(SPARC64) && !defined(TILE)
+# if !defined(AVR32) && !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SH) && !defined(SH64) && !defined(SPARC64) && !defined(TILE) && !defined(NDS32)
{ uoff(reserved), "offsetof(struct user, reserved)" },
# endif
# if !defined(SPARC64)
{ uoff(u_ar0), "offsetof(struct user, u_ar0)" },
# endif
-# if !defined(ARM) && !defined(AVR32) && !defined(MIPS) && !defined(S390) && !defined(S390X) && !defined(SPARC64) && !defined(BFIN) && !defined(TILE)
+# if !defined(ARM) && !defined(AVR32) && !defined(MIPS) && !defined(S390) && !defined(S390X) && !defined(SPARC64) && !defined(BFIN) && !defined(TILE) && !defined(NDS32)
{ uoff(u_fpstate), "offsetof(struct user, u_fpstate)" },
# endif
{ uoff(magic), "offsetof(struct user, magic)" },
--
1.7.3.5
More information about the Strace-devel
mailing list