-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/1/2010 2:27 PM, Carmelo AMOROSO wrote:
> Signed-off-by: Carmelo Amoroso <[email protected]>
> Reviewed-by: Angelo Castello <[email protected]>
> ---
>  linux/sh/syscallent.h |    2 +-
>  linux/syscall.h       |    2 +-
>  system.c              |   33 +++++++++++++++++++++++++++++++++
>  3 files changed, 35 insertions(+), 2 deletions(-)
> 
> diff --git a/linux/sh/syscallent.h b/linux/sh/syscallent.h
> index 2291131..f3b59db 100644
> --- a/linux/sh/syscallent.h
> +++ b/linux/sh/syscallent.h
> @@ -153,7 +153,7 @@
>       { 5,    TP,     sys_clone,              "clone"         }, /* 120 */
>       { 2,    0,      sys_setdomainname,      "setdomainname" }, /* 121 */
>       { 1,    0,      sys_uname,              "uname"         }, /* 122 */
> -     { 3,    0,      printargs,              "cacheflush"    }, /* 123 */
> +     { 3,    0,      sys_cacheflush,         "cacheflush"    }, /* 123 */
>       { 1,    0,      sys_adjtimex,           "adjtimex"      }, /* 124 */
>       { 3,    0,      sys_mprotect,           "mprotect"      }, /* 125 */
>       { 3,    TS,     sys_sigprocmask,        "sigprocmask"   }, /* 126 */
> diff --git a/linux/syscall.h b/linux/syscall.h
> index 679697f..e7348ff 100644
> --- a/linux/syscall.h
> +++ b/linux/syscall.h
> @@ -322,7 +322,7 @@ int sys_sysmips();
>  int sys_setpgrp(), sys_gethostname(), sys_getdtablesize(), sys_utimes();
>  int sys_capget(), sys_capset();
>  
> -#ifdef M68K
> +#if defined M68K || defined SH
>  int sys_cacheflush();
>  #endif
>  
> diff --git a/system.c b/system.c
> index e16a6be..1491005 100644
> --- a/system.c
> +++ b/system.c
> @@ -343,6 +343,39 @@ 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(tcp)
> +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

Updated version taking into account Dimitry's suggestion.

cheers,
carmelo

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkz2TpIACgkQoRq/3BrK1s9sbACgmYhMFS5mVF6CoAaZ/h1FrMPd
fYwAnRAxWHqNzJzQ1SOfY5vVD7Mxehlv
=purb
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to