summaryrefslogtreecommitdiff
path: root/system.c
diff options
context:
space:
mode:
authorCarmelo AMOROSO <carmelo.amoroso@st.com>2010-12-01 14:27:07 +0100
committerDmitry V. Levin <ldv@altlinux.org>2010-12-03 17:27:29 +0000
commitf8e56504749a4a5a79d40d115ae46718b4c949a4 (patch)
tree50914db4743c9c4662b68707e9962a01be27df02 /system.c
parentb1467440f7c57c4ba9dc17ab9756e45c84d0adbe (diff)
downloadstrace-f8e56504749a4a5a79d40d115ae46718b4c949a4.tar.gz
strace-f8e56504749a4a5a79d40d115ae46718b4c949a4.tar.bz2
strace-f8e56504749a4a5a79d40d115ae46718b4c949a4.tar.xz
sh: Add support for tracing sys_cacheflush system call
* linux/sh/syscallent.h: Update sys_cacheflush entry. * linux/syscall.h [SH] (sys_cacheflush): New function declaration. * system.c [SH] (cacheflush_flags): New xlat structure. [SH] (sys_cacheflush): New function. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com> Reviewed-by: Angelo Castello <angelo.castello@st.com>
Diffstat (limited to 'system.c')
-rw-r--r--system.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/system.c b/system.c
index e16a6be..f0641c3 100644
--- a/system.c
+++ b/system.c
@@ -343,6 +343,38 @@ sys_cacheflush(struct tcb *tcp)
#endif
+#ifdef SH
+static const struct xlat cacheflush_flags[] = {
+#ifdef CACHEFLUSH_D_INVAL
+ { CACHEFLUSH_D_INVAL, "CACHEFLUSH_D_INVAL" },
+#endif
+#ifdef CACHEFLUSH_D_WB
+ { CACHEFLUSH_D_WB, "CACHEFLUSH_D_WB" },
+#endif
+#ifdef CACHEFLUSH_D_PURGE
+ { CACHEFLUSH_D_PURGE, "CACHEFLUSH_D_PURGE" },
+#endif
+#ifdef CACHEFLUSH_I
+ { CACHEFLUSH_I, "CACHEFLUSH_I" },
+#endif
+ { 0, NULL },
+};
+
+int
+sys_cacheflush(struct tcb *tcp)
+{
+ if (entering(tcp)) {
+ /* addr */
+ tprintf("%#lx, ", tcp->u_arg[0]);
+ /* len */
+ tprintf("%lu, ", tcp->u_arg[1]);
+ /* flags */
+ printflags(cacheflush_flags, tcp->u_arg[2], "CACHEFLUSH_???");
+ }
+ return 0;
+}
+#endif /* SH */
+
#endif /* LINUX */
#ifdef SUNOS4