[PATCH 3/6] nds32: add NDS32 support in utils.c
Macpaul Lin
macpaul at andestech.com
Fri Feb 11 09:37:58 UTC 2011
add NDS32 support in utils.c
Signed-off-by: Macpaul Lin <macpaul at andestech.com>
---
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
More information about the Strace-devel
mailing list