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]

[patch] Set buf as address type in tapset's syslog probe


Hi, everyone

In probe syslog in tapset, buf is set as string type in argstr.
But buf is always used for storing returned data in syslog().
So i think it is better to set it to address type(%p).

If anyone knows why string type is necessary, please tell me.
(And if no object, I will commit following patch)

Signed-off-by: "Zhaolei" zhaolei@cn.fujitsu.com

--- syscalls2.stp.old 2007-08-29 16:57:17.000000000 +0900
+++ syscalls2.stp 2007-08-29 16:55:28.000000000 +0900
@@ -2517,7 +2517,7 @@ probe syscall.syslog = kernel.function("
 type = $type
 bufp_uaddr = $buf
 len = $len
- argstr = sprintf("%d, %s, %d", $type, text_strn(user_string($buf),syscall_string_trunc,1), $len)
+ argstr = sprintf("%d, %p, %d", $type, $buf, $len)
 }
 probe syscall.syslog.return = kernel.function("sys_syslog").return {
 name = "syslog"

Regards
Zhaolei


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