public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug tapsets/18650] New: powerpc variant of longlong_arg() for uprobes swaps the byte order
@ 2015-07-09  9:39 mcermak at redhat dot com
  2015-07-09 11:38 ` [Bug tapsets/18650] powerpc variant of longlong_arg() for uprobes swaps the high and low half of its 64bit retval mcermak at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: mcermak at redhat dot com @ 2015-07-09  9:39 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=18650

            Bug ID: 18650
           Summary: powerpc variant of longlong_arg() for uprobes swaps
                    the byte order
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tapsets
          Assignee: systemtap at sourceware dot org
          Reporter: mcermak at redhat dot com
  Target Milestone: ---

After some testing I came to a conclusion that following change should be done
in tapsets:

=======
$ git diff
diff --git a/tapset/powerpc/registers.stp b/tapset/powerpc/registers.stp
index 1daf5ba..3adcc73 100644
--- a/tapset/powerpc/registers.stp
+++ b/tapset/powerpc/registers.stp
@@ -186,8 +186,8 @@ function ulong_arg:long (argnum:long) {

 function longlong_arg:long (argnum:long) {
        if (probing_32bit_app()) {
-               lowbits = _stp_arg2(argnum, 0, 1, 0)
-               highbits = _stp_arg2(argnum+1, 0, 1, 0)
+               highbits = _stp_arg2(argnum, 0, 1, 0)
+               lowbits = _stp_arg2(argnum+1, 0, 1, 0)
                return ((highbits << 32) | lowbits)
        } else
                return _stp_arg2(argnum, 0, 0, 1)
diff --git a/tapset/s390/registers.stp b/tapset/s390/registers.stp
index 3fd2560..3e33baa 100644
--- a/tapset/s390/registers.stp
+++ b/tapset/s390/registers.stp
@@ -272,7 +272,6 @@ function ulong_arg:long (argnum:long) {

 function longlong_arg:long (argnum:long) {
        if (probing_32bit_app()) {
-               /* TODO verify if this is correct for 31bit apps */
                highbits = _stp_arg2(argnum, 0, 1, 0)
                lowbits = _stp_arg2(argnum+1, 0, 1, 0)
                return ((highbits << 32) | lowbits)
$
=======

Does this look about correct?

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-07-14  6:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-09  9:39 [Bug tapsets/18650] New: powerpc variant of longlong_arg() for uprobes swaps the byte order mcermak at redhat dot com
2015-07-09 11:38 ` [Bug tapsets/18650] powerpc variant of longlong_arg() for uprobes swaps the high and low half of its 64bit retval mcermak at redhat dot com
2015-07-09 15:59 ` dsmith at redhat dot com
2015-07-10 14:11 ` mcermak at redhat dot com
2015-07-14  6:14 ` mcermak at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).