From owner-freebsd-hackers Thu Mar 28 02:02:51 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id CAA13972 for hackers-outgoing; Thu, 28 Mar 1996 02:02:51 -0800 (PST) Received: from nixpbe.pdb.sni.de (mail.sni.de [192.109.2.33]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id CAA13947 for ; Thu, 28 Mar 1996 02:02:29 -0800 (PST) Received: (from nerv@localhost) by nixpbe.pdb.sni.de (8.6.12/8.6.12) id LAA13243 for hackers@freebsd.org; Thu, 28 Mar 1996 11:02:02 +0100 Message-Id: <199603281002.LAA13243@nixpbe.pdb.sni.de> Subject: ddb: What structures interest you? To: hackers@freebsd.org (FreeBSD hackers) Date: Thu, 28 Mar 96 10:59:05 MET From: Greg Lehey X-Mailer: xmail 2.4 (based on ELM 2.2 PL16) Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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