[prev in list] [next in list] [prev in thread] [next in thread]
List: opensolaris-dtrace-discuss
Subject: Re: [dtrace-discuss] Error in check value of the in-out parameter
From: Jonathan Adams <jonathan.adams () sun ! com>
Date: 2008-07-24 0:45:07
Message-ID: 20080724004507.GB896141 () eng ! sun ! com
[Download RAW message or body]
On Sun, Jul 20, 2008 at 11:15:43AM +0800, zhihui Chen wrote:
> I want to check value of the in-out parameter of one function when it
> returns, but each time dtrace will report error.
> Following is the script, anyone can help me correct the error with it?
> #!/usr/sbin/dtrace -s
> #pragma D option quiet
> #pragma D option bufsize=4m
>
> fbt::kstrgetmsg:entry
> /pid==$target/
> {
> self->arg1=arg1;
This should really be:
self->arg1 = args[1];
That way, it will get the correct type automatically.
> }
> fbt::kstrgetmsg:return
> /pid==$target&&self->arg1/
> {
> printf("mp=%x\n",*(uint64_t *)copyin(self->arg1,8));
And this should be:
printf("mp=%x\n", *self->arg1);
Cheers,
- jonathan
> self->arg1=0;
> }
>
> intel6# ./kstrgetmsg.d -c "rcp intel2-1:/test1000k ."
> rcp: dropped connection
> dtrace: error on enabled probe ID 2 (ID 17047:
> fbt:genunix:kstrgetmsg:return): invalid address (0xffffff001edd9b90) in
> action #1 at DIF offset 52
> dtrace: error on enabled probe ID 2 (ID 17047:
> fbt:genunix:kstrgetmsg:return): invalid address (0xffffff001edd9b90) in
> action #1 at DIF offset 52
> dtrace: error on enabled probe ID 2 (ID 17047:
> fbt:genunix:kstrgetmsg:return): invalid address (0xffffff001edd9b90) in
> action #1 at DIF offset 52
> .......
>
>
> Thanks
> Zhihui
> _______________________________________________
> dtrace-discuss mailing list
> dtrace-discuss@opensolaris.org
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic