Hansel,
DTRACE utility is also another tool to help tracing device driver. There is
a Dtrace User's Guide that you can download from ORACLE.
Dtrace is the powerful and complex tool for developer and system
administrator. However, for us as Device Driver developer,
we only need Dtrace to trace our driver is not that bad. I use the
following command to trace my driver:
dtrace -n 'fbt:::entry /probemod=="XXX"/ {stack()}'
Where:
XXX - Driver Module's Name or the name of your driver.
(e.g. e1000g0)
Another kernel debug tool is MDB utility. However, it is designed for
advance developer. It also has User's Guide to download.
As time gone by, you can learn to use it since it is the most powerful tool
for kernel developer.
Best regards and look luck to you,
Ott Sathngam,
=====================================================
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
[email protected]
Sent: Saturday, November 12, 2011 4:00 AM
To: [email protected]
Subject: driver-discuss Digest, Vol 71, Issue 2
Send driver-discuss mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://mail.opensolaris.org/mailman/listinfo/driver-discuss
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific than
"Re: Contents of driver-discuss digest..."
Today's Topics:
1. Re: Newbie needs debugging tips (John Martin)
2. Re: Newbie needs debugging tips (Hansel Chung)
3. Re: Newbie needs debugging tips (Dan Mick)
----------------------------------------------------------------------
Message: 1
Date: Fri, 11 Nov 2011 12:55:57 -0500
From: John Martin <[email protected]>
To: Hansel Chung <[email protected]>
Cc: [email protected]
Subject: Re: [driver-discuss] Newbie needs debugging tips
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On 11/10/11 18:43, Hansel Chung wrote:
> Hi,
>
> I'm very new to driver development, and would like to try my hand at
tweaking a driver in Opensolaris.
>
> I made some changes. But unfortunately, I can't trace any of my work
because cmn_err doesn't appear to post messages anywhere, ...
Verify you have run "bootadm update-archive" after updating the kernel
driver binary or else your changes may not be used.
You can verify you are using the binary with your changes by updating a
version/timestamp in the modldrv.drv_linkinfo string and use the modinfo
command to display the driver's string.
------------------------------
Message: 2
Date: Fri, 11 Nov 2011 17:05:08 -0800
From: Hansel Chung <[email protected]>
To: Dan Mick <[email protected]>
Cc: [email protected]
Subject: Re: [driver-discuss] Newbie needs debugging tips
Message-ID: <[email protected]>
Content-Type: text/plain; CHARSET=US-ASCII
On Nov 10, 2011, at 5:44 PM, Dan Mick wrote:
>
> cmn_err() can go to the log (/var/adm/messages), the console, or both.
See its manpage.
>
> debugger: see kmdb(1).
Cool, I'll check out the manpage next.
> You've got access to Writing Device Drivers, I assume?
Yep! I assume you're referring to:
http://download.oracle.com/docs/cd/E19082-01/819-3196/
and
http://download.oracle.com/docs/cd/E19082-01/819-3159/
?
Thanks,
-Hansel
------------------------------
Message: 3
Date: Fri, 11 Nov 2011 17:11:41 -0800
From: Dan Mick <[email protected]>
To: Hansel Chung <[email protected]>
Cc: [email protected]
Subject: Re: [driver-discuss] Newbie needs debugging tips
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On 11/11/11 05:05 PM, Hansel Chung wrote:
> On Nov 10, 2011, at 5:44 PM, Dan Mick wrote:
>>
>> cmn_err() can go to the log (/var/adm/messages), the console, or both.
See its manpage.
>>
>> debugger: see kmdb(1).
>
> Cool, I'll check out the manpage next.
>
>> You've got access to Writing Device Drivers, I assume?
>
>
> Yep! I assume you're referring to:
> http://download.oracle.com/docs/cd/E19082-01/819-3196/
> and
> http://download.oracle.com/docs/cd/E19082-01/819-3159/
> ?
>
> Thanks,
> -Hansel
Didn't know about the latter, but definitely the former, yes. There are
sections in there on using kmdb and cmn_err for debugging. Chapter 22 in
WDD.
------------------------------
_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss
End of driver-discuss Digest, Vol 71, Issue 2
*********************************************
_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss