porting strace to Bionic libc
enh
enh at google.com
Fri Feb 28 01:53:21 UTC 2014
and this fixes decoding of fstat64 and friends for an arm32 binary
traced by an arm64 strace...
(previously i didn't have HAVE_STAT64 defined, because aarch64 doesn't
have stat64 in its kernel header files. bionic has both, but you
carefully move those out of the way. if i define HAVE_STAT64, the
build fails because we're getting the aarch64 kernel stat.h, and
there's no stat64 in there, but aarch64's stat==arm32's stat64, so
this hack seems to be sufficient. i don't know if there's a better
fix.)
On Thu, Feb 27, 2014 at 4:52 PM, enh <enh at google.com> wrote:
> this fixes decoding of struct sigaction for arm32 binaries traced by
> an arm64 strace for me. arm32-arm32 and arm64-arm64 continue to work.
>
> On Thu, Feb 27, 2014 at 1:45 PM, Dmitry V. Levin <ldv at altlinux.org> wrote:
>> On Thu, Feb 27, 2014 at 11:06:09AM -0800, enh wrote:
>>> On Wed, Feb 26, 2014 at 3:42 PM, Dmitry V. Levin <ldv at altlinux.org> wrote:
>>> > I've posted a patch that reimplements signal mask decoding without use of
>>> > sigset_t. It fixes this issue, but may introduce new bugs. Please check
>>> > whether it builds and passes sigaction.test in your environment.
>>>
>>> works for me on arm strace tracing an arm binary and arm64 strace
>>> tracing an arm64 binary, so please commit.
>>
>> Thanks.
>>
>>> (it doesn't work on arm64 when tracing a 32-bit process, but that's a
>>> separate issue. do you want me to send you patches in the style of
>>> your stack_t patch from yesterday, or do you prefer to write the
>>> patches yourself and just want me to let you know when i hit a struct
>>> that differs between LP32 and LP64?)
>>
>> If you've stumbled upon a bug and made a patch that fixes it, please do
>> not hesitate and send the fix to this list. Of course I prefer patches
>> that are ready to be applied. :)
>>
>>
>> --
>> ldv
>>
>> ------------------------------------------------------------------------------
>> Flow-based real-time traffic analytics software. Cisco certified tool.
>> Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
>> Customize your own dashboards, set traffic alerts and generate reports.
>> Network behavioral analysis & security monitoring. All-in-one tool.
>> http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Strace-devel mailing list
>> Strace-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/strace-devel
>>
>
>
>
> --
> Elliott Hughes - http://who/enh - http://jessies.org/~enh/
> Java i18n/JNI/NIO, or bionic questions? Mail me/drop by/add me as a reviewer.
--
Elliott Hughes - http://who/enh - http://jessies.org/~enh/
Java i18n/JNI/NIO, or bionic questions? Mail me/drop by/add me as a reviewer.
-------------- next part --------------
diff --git a/file.c b/file.c
index 83ace8c..7e0773d 100644
--- a/file.c
+++ b/file.c
@@ -181,6 +181,10 @@ struct __old_kernel_stat {
#undef st_mtime
#undef st_ctime
+#ifdef AARCH64
+#define stat64 stat
+#endif /* AARCH64 */
+
#include <fcntl.h>
#ifdef HAVE_SYS_VFS_H
# include <sys/vfs.h>
More information about the Strace-devel
mailing list