On Fri, Aug 19, 2016 at 02:47:48PM +0300, Dmitry V. Levin wrote: > On Fri, Aug 19, 2016 at 11:56:05AM +0100, Richard W.M. Jones wrote: > > The original port of strace was done by Palmer Dabbelt > > (eecs.berkeley.edu), based on strace 4.9. > [...] > > diff --git a/file.c b/file.c > > index 2ff0ac7..24b10b1 100644 > > --- a/file.c > > +++ b/file.c > > @@ -148,7 +148,7 @@ SYS_FUNC(fstat) > > } > > > > #if defined STAT32_PERSONALITY && !defined HAVE_STRUCT_STAT64 > > -# if defined AARCH64 || defined X86_64 || defined X32 > > +# if defined AARCH64 || defined X86_64 || defined X32 || defined RISCV > > /* > > * Linux x86_64 and x32 have unified `struct stat' but their i386 > > personality > > * needs `struct stat64'. > > @@ -186,7 +186,7 @@ struct stat64 { > > # endif > > ; > > # define HAVE_STRUCT_STAT64 1 > > -# else /* !(AARCH64 || X86_64 || X32) */ > > +# else /* !(AARCH64 || X86_64 || X32 || RISCV) */ > > # warning FIXME: check whether struct stat64 definition is needed for > > this architecture! > > # endif > > #endif /* STAT32_PERSONALITY && !HAVE_STRUCT_STAT64 */ > > Does riscv implement 32-bit stat syscalls at all? > I'd be surprised if it did. > According to its asm/unistd.h file, it doesn't, so no change to file.c > is needed, and ... > > > diff --git a/linux/riscv/stat32.h b/linux/riscv/stat32.h > > new file mode 100644 > > index 0000000..802610e > > --- /dev/null > > +++ b/linux/riscv/stat32.h > > @@ -0,0 +1 @@ > > +#include "x86_64/stat32.h" > > ... this file should be copied from e.g. linux/tile/stat32.h
Right, as a brand new architecture they shouldn't be implementing broken old stat. I'll send a v3 with these two changes shortly. Thanks, Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW ------------------------------------------------------------------------------ _______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel