add NDS32 support in utils.c

Signed-off-by: Macpaul Lin <[email protected]>
---
 util.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/util.c b/util.c
index c28edf3..ec28cd6 100644
--- a/util.c
+++ b/util.c
@@ -1212,6 +1212,14 @@ printcall(struct tcb *tcp)
                return;
        }
        tprintf("[%08lx] ", pc);
+#elif defined(NDS32)
+       long pc;
+
+       if (upeek(tcp, 4*2, &pc) < 0) {
+               PRINTBADPC;
+               return;
+       }
+       tprintf("[%08lx] ", pc);
 # endif /* architecture */
 #endif /* LINUX */
 
@@ -1426,6 +1434,9 @@ typedef struct pt_regs arg_setup_state;
 #    define restore_arg1(tcp, state, val) 0
 #    define arg0_index   1
 #    define arg1_index   0
+#   elif defined (NDS32)
+#    define arg0_offset   (4*13)
+#    define arg1_offset   (4*14)
 #   else
 #    define arg0_offset        0
 #    define arg1_offset        4
-- 
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

Reply via email to