Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Mar 96 10:59:05 MET
From:      Greg Lehey <lehey.pad@sni.de>
To:        hackers@freebsd.org (FreeBSD hackers)
Subject:   ddb: What structures interest you?
Message-ID:  <199603281002.LAA13243@nixpbe.pdb.sni.de>

next in thread | raw e-mail | index | archive | help
I'm continuing my thoughts about improving ddb and considering how to
display kernel data structures.  Some kernel debuggers supply a
command to display a number of predefined structures, given only a
pointer.  The obvious disadvantages of this method are:

- You're limited to the types that the debugger knows about.
- There's not guarantee that the object that the pointer points to is
  really of the type you claim.

On the other hand, it has the advantage of being able to be relatively
comprehensive for the structures that the debugger knows.

An alternative, used by adb, for example, is to use a macro.  This has
the advantage of being open-ended, but requires more work (OK, we can
supply a macro library).  Potentially, it also supplies the
possibility of checking the pointer, though I don't know how much
sense this makes in practice.  It also has the disadvantage that you
need to load the macros in advance, by some yet-to-be-defined
mechanism (lowbug uses a system call).

Of course, there's no reason why we shouldn't combine both of these
mechanisms.

Questions to you out there:

- What structures would you like to be able to display?  Don't hold
  anything back, this should be as comprehensive a list as possible.

- What do you think about the relative merits of the two methods?

- Can you think of a better method?

Greg



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603281002.LAA13243>