On Wed, Jan 11, 2006 at 03:48:06AM -0800, tanu wrote:
> when we open mdb with -K option i.e. kmdb, and set a breakpoint
> without specifying an address, whats the expected behaviour. Will the
> system panic?
> 
> If we set the breakpoint in data segment  ex:
> [0]> page_hash/J
> page_hash:
> page_hash:      1a24000        
> [0]> :b
> [0]> :c
> 
> the system panics. Is this the expected behaviour. Shouldn't mdb
> should give an error on this. Is there a document available indicating
> system behaviour when a breakpoint is set without an address.

When given no explicit value, the legacy ADB commands (such a :b) take
the value of 'dot' from the last command run.  For example:

$ mdb
> 5=K
                5               
> :b
> ::events
   ID S TA HT LM Description                              Action               
----- - -- -- -- ---------------------------------------- ----------------------
[ 1 ] -     0  0 stop at 5                                -                    
>

This is necessary for ADB compatbility.  So in your above example, you
set a breakpoint at 0x1a24000 (obvbiously a very bad thing).  If you use
the mdb dcmd version (::bp), it will rightly complain that no address
was given:

$ mdb
> 5=K
                5               
> ::bp
Usage: [address]::bp [+/-dDestT] [-c cmd] [-n count] sym ...
mdb: try '::help bp' for more information
> 5::bp
>

Hope that helps.

- Eric

--
Eric Schrock, Solaris Kernel Development       http://blogs.sun.com/eschrock

Reply via email to