This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug runtime/2583] New: cannot find the definition of __stp_put_user_bad() on ppc64


In my ppc64/2.6.16.7/gcc3.4.5-2, the following command failed during compilation:
 stap -gp4 -vv -e
 'probe kernel.function("vfs_readdir"){$file->f_dentry->d_name->len=1}'

The error message is like:
/tmp/stapkcLb3E/stap_10494.c: In function `function__tvar_set_file_0':
/tmp/stapkcLb3E/stap_10494.c:132: warning:
  implicit declaration of function `__stp_put_user_asm'
/tmp/stapkcLb3E/stap_10494.c:132: warning: 
  implicit declaration of function `__stp_put_user_bad'
make[1]: *** [/tmp/stapkcLb3E/stap_10494.o] Error 1 
make: *** [_module_/tmp/stapkcLb3E] Error 2 

This bug affects src/testsuite/buildok/twenty.stp and
src/testsuite/buildok/twentythree.stp. 

The reason is that __stp_put_user_asm() and __stp_put_user_bad()
are used in store_deref()(src/runtime/loc2c-runtime.h) but not defined.

The absense of __stp_put_user_asm() may be a small bug, because 
I found the definition of macro "_stp_put_user_asm" just before it. 
And there is another small error in store_deref(). I think 
the following patch can fix this.

But I grep the whole systemtap source and cannot find the 
definition of __stp_put_user_bad(). Can we use __put_user_bad() 
instead as in i386/x86_64? or have to add its own definition?

Any comments?

--- src-20060418/runtime/loc2c-runtime.h        2006-03-20 11:50:44.000000000 -0500
+++ src.modified/runtime/loc2c-runtime.h        2006-04-18 07:33:19.000000000 -0400
@@ -184,7 +184,7 @@
                  "i"(sizeof(unsigned long))) 
 
 
-#define _stp_put_user_asm(x, addr, err, op)                        \       
+#define __stp_put_user_asm(x, addr, err, op)                        \       
         __asm__ __volatile__(                                   \       
                 "1:     " op " %1,0(%2) # put_user\n"           \       
                 "2:\n"                                          \       
@@ -226,7 +226,7 @@
       case 1: __stp_put_user_asm(((u8)(value)),addr,_bad,"stb"); break;     \
       case 2: __stp_put_user_asm(((u16)(value)),addr,_bad,"sth"); break;    \
       case 4: __stp_put_user_asm(((u32)(value)),addr,_bad,"stw"); break;    \
-      case 8: __stp_put_user_asm(((u64)(value)),addr,_bad); break;         \
+      case 8: __stp_put_user_asm(((u64)(value)),addr,_bad,"std"); break;         \
       default: __stp_put_user_bad();                                         \
       }                                                                       
      \
     if (_bad)                                                                \

-- 
           Summary: cannot find the definition of __stp_put_user_bad() on
                    ppc64
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: runtime
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: guij at cn dot ibm dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=2583

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]