ppc/arm/aarch64 printllval
Dmitry V. Levin
ldv at altlinux.org
Fri May 3 23:09:16 UTC 2013
On Sat, May 04, 2013 at 02:48:44AM +0400, Dmitry V. Levin wrote:
> On Thu, May 02, 2013 at 03:14:08PM -0400, Mike Frysinger wrote:
> > On Thursday 02 May 2013 14:51:26 Mike Frysinger wrote:
> > > On Tuesday 30 April 2013 18:22:24 Dmitry V. Levin wrote:
> > > > There is quite enough good stuff accumulated in strace.git since v4.7
> > > > to release a new version. If you have pending patches to include
> > > > before the release, please submit them now. Also, please test HEAD
> > > > on supported architectures.
> > >
> > > re-testing current master branch
> > > (318b0dde768e0b2360082c50b286e003f914a49f), some targets are failing the
> > > new stat test
> >
> > ah and ppc fails too
> > vFAIL: test; ppc linux-3.2.34udev glibc-2.16 gcc-4.5.4
>
> I'm going to push this fix (I have no ppc to test it but I'm quite sure it's correct):
Similar change should fix printllval on arm and aarch64 in 32bit mode.
Here is the combined patch:
* util.c (printllval) [ARM || POWERPC]: Align argument number.
[AARCH64]: Align argument number in 32-bit mode.
---
util.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/util.c b/util.c
index eda6669..6f9f505 100644
--- a/util.c
+++ b/util.c
@@ -186,8 +186,8 @@ printllval(struct tcb *tcp, const char *format, int arg_no)
tprintf(format, tcp->u_arg[arg_no]);
arg_no++;
} else {
-# if defined(POWERPC64)
- /* Align arg_no to next even number */
+# if defined(AARCH64) || defined(POWERPC64)
+ /* Align arg_no to the next even number. */
arg_no = (arg_no + 1) & 0xe;
# endif
tprintf(format, LONG_LONG(tcp->u_arg[arg_no], tcp->u_arg[arg_no + 1]));
@@ -215,6 +215,10 @@ printllval(struct tcb *tcp, const char *format, int arg_no)
# if SIZEOF_LONG > 4
# error BUG: must not combine two args for long long on this arch
# endif
+#if defined(ARM) || defined(POWERPC)
+ /* Align arg_no to the next even number. */
+ arg_no = (arg_no + 1) & 0xe;
+#endif
tprintf(format, LONG_LONG(tcp->u_arg[arg_no], tcp->u_arg[arg_no + 1]));
arg_no += 2;
#endif
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20130504/e8bdab06/attachment.bin>
More information about the Strace-devel
mailing list