add NDS32 support into process.c
Signed-off-by: Macpaul Lin <[email protected]>
---
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
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel