> John Levon wrote:
> > You know what I'm going to say ... file RFEs (but please not 'make MDB like
> > scat'). It's unfortunate that we have some divided effort on two tools that 
> > do
> > essentially the same thing. 'mdb' is what's shipped with Solaris and we 
> > really
> > should try and look at making it so that more people can use it easily.
> >
> > mdb can be quite unfriendly until you get used to it. What might help most 
> > of
> > all, perhaps, is more documentation: hints and tips, etc.
> >
> > regards,
> > john
> >   
> You are right, I did know what you were going to say. But Kevin has an 
> important point too. I am not a kernel engineer, and I have specifically
> tried many times to use mdb and not use scat. I see the word "modular" right
> in the name. I should be able to extend it pretty easily, I should think.
> And maybe it has the capability, but I certainly have not found anything to
> explain how to do it. Having multiple levels of commands with
> their own help commands makes finding what you need problematic at best.

You need to read the documentation.  See:

        http://docs.sun.com/app/docs/doc/816-5041

for an on-line copy of the Modular Debugger Guide.  In particular,
Chapter 8 explains the kernel debugging commands by category,
Chapter 9 explains kernel memory debugging in detail, and
Chapter 10 explains the programming interface for modules (extensibility).

> The command language is arcane, and seems to be lacking in essential 
> control structures.

The language is arcane because the audience for the tool was targeted at
people who were extremely familiar with adb many years ago.  Some control
structures were added (::walk, ::list, etc.) but this isn't the same as
having arbitrary for-loops.  Fundamentally the language is focused on
enabling experts to do a lot while typing very little and leveraging
their existing knowledge of adb, which in turn was designed around the
same philsophy -- allowing the original UNIX developers to leverage knowledge
of the DEC debugging utilities on the PDP systems they were using.

There are a very large number of ways in which mdb usability can be improved
for new users.  And part of the purpose of OpenSolaris and the community is to
expand the set of people who can contribute ideas and code to do that beyond
just Sun (those opportunities have always existed in the Solaris gate for Sun
engineers, but very few outside the kernel group ever took advantage of them).
Everyone who has contributed to mdb will be happy to review such ideas.

That said, we've also tried to balance mdb's complexity and syntactic sugar
against the fact that you still need to understand what you're trying to debug,
which in the case of the kernel is usually the hardest part of your problem.
Many requests for "just give me a simple report on this crash dump" are not
in my view requests to improve mdb's usability -- they should be solved by
implementing some script which calls mdb commands to produce output.  And in
terms of Sun technical support, those scripts already exist in various forms.
That is a very different use case from using a kernel debugger interactively.

-Mike

-- 
Mike Shapiro, Solaris Kernel Development. blogs.sun.com/mws/

Reply via email to