Hi Vivek,
One other thing.  This probably belongs in the mdb-discuss list.  It 
would be really nice if dtrace
had a way to allow "::print ..." from within the D language.  I have 
asked for this, but I don't have a
good way to do it.

max

Vivek Joshi wrote:
>
> Hello Max,
>
> I attached the process while running the mdb (mdb -p <pid>). I didn't 
> set the breakpoint earlier ... But I checked it now like this,
>
> > :b 0xFE97B924
> >
>
> Once the program is stopped and I can now print this structure,
> > 0xFE97B924::print struct uscsi_cmd
> {
>     uscsi_flags = 0
>     uscsi_status = 0
>     uscsi_timeout = 0
>     uscsi_cdb = 0
>     uscsi_bufaddr = 0x46a83f18
>     uscsi_buflen = 0
>     uscsi_resid = 0x46a83f18
>     uscsi_cdblen = 0
>     uscsi_rqlen = 0
>     uscsi_rqstatus = 0
>     uscsi_rqresid = 0
>     uscsi_rqbuf = 0x46a83f18
>     uscsi_reserved_5 = 0
> }
>
> which too doesn't look valid ... or there might be an issue with the 
> application while forming the cdb.
>
> Cheers,
> Vivek
>
>
>
>
>     How are you setting the breakpoint with mdb? I assume you are setting
>     the breakpoint in your application
>     at the place where the ioctl is being called? If you are trying to set
>     the breakpoint in the kernel, you won't be able
>     to dump the uscsi_cmd with the address truss shows you. That
>     address is
>     a user address. Also, you have no
>     NULL pointer in your truss output. The message "mdb: failed to
>     read data
>     from target: no mapping for address"
>     means that the virtual address you specified (0xfe97b924) has no
>     mapping
>     in the target in which you are running
>     mdb. It is possible that a member of the uscsi_cmd struct is not
>     valid.
>     How are you running mdb?
>
>     max
>
>


Reply via email to