I've just putback:

4949088 ::print would be more useful with a couple more options

into Solaris Nevada build 48.  This RFE changes ::print in two ways:

        1.  ::print now behaves well when its output is directed to a pipe.
            Formerly, if you tried to ::print a structure member that itself
            is a structure or array, you'd get an error:

                > 6000281f800::print proc_t p_user | ::print user_t u_finfo
                mdb: syntax error on line 1 of (pipeline) near "{"
                > 

            after this fix, this works as you'd expect;  the address is
            passed down the pipeline:

                > 6000281f800::print proc_t p_user | ::print user_t u_finfo
                {
                    u_finfo.fi_lock = {
                        _opaque = [ 0 ]
                ...

            In addition, if you pass the "-a" flag, ::print will always pass
            the address down the pipeline.

        2.  ::print now has a '-s' option, which specifies the maximum
            depth to print out details in.  For example:

                > ::print -s 0 -t siginfo_t
                siginfo_t { ... }
                > ::print -s 1 -t siginfo_t
                {
                    int si_signo 
                    int si_code 
                    int si_errno 
                    int si_pad 
                    union  __data { ... }
                }
                > ::print -s 2 -t siginfo_t
                {
                    int si_signo 
                    int si_code 
                    int si_errno 
                    int si_pad 
                    union  __data {
                        int [60] __pad 
                        struct  __proc { ... }
                        struct  __fault { ... }
                        struct  __file { ... }
                        struct  __prof { ... }
                        struct  __rctl { ... }
                    }
                }
                > 

            which is nice for cutting down on uninteresting output.

It should be available in OpenSolaris and Solaris Express within the next few
weeks.  (whenever build 48-based versions come out)

Enjoy!

- jonathan


-- 
Jonathan Adams, Solaris Kernel Development

Reply via email to