On Fri, Apr 22, 2016 at 03:49:32PM +0100, Dr. David Alan Gilbert wrote:
[...]
> > The preferred method is to print uc.copy as a part of structure:
> > 
> >     if (entering(tcp)) {

BTW, there needs to be a tprints(", ")
otherwise the structure is being printed right after the name of constant,
without any delimiter.

> >             if (umove_or_printaddr(tcp, arg, &uc))
> >                     return RVAL_DECODED | 1;
> >             tprintf("{dst=%" PRI__x64 ", src=%" PRI__x64
> >                     ", len=%" PRI__u64 ", mode=%" PRI__u64
> >                     ", copy=",
> >                     uc.dst, uc.src, uc.len, uc.mode);
> >                     return 1;
> >     } else {
> >             if (!umove_or_printaddr(tcp, arg, &uc.copy))
> >                     tprintf("%" PRI__d64, uc.copy);
> >             tprints("}");
> >             return 1;
> >     }
> 
> OK, thanks, taken that.
> strace seems to have PRI__s64 rather than PRId64 that would have matched
> the C library;

Oh, this must have slipped under my radar when these macros were
introduced.  They are quite new, no code is using them yet, so I think
it's safe to rename PRI__s64 to PRI__d64.

> I've also changed those to %# for the hex.,

That's correct.

> and that
> second umove is still &uc - it's still part of the full structure.

Yes, of course it has to be &uc.copy.


-- 
ldv

Attachment: pgptLaPgo8pus.pgp
Description: PGP signature

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to