From owner-p4-projects@FreeBSD.ORG Thu Jul 22 07:09:50 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CBF4016A4D0; Thu, 22 Jul 2004 07:09:49 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A575F16A4CE for ; Thu, 22 Jul 2004 07:09:49 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D08F43D2D for ; Thu, 22 Jul 2004 07:09:49 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i6M79lfe090062 for ; Thu, 22 Jul 2004 07:09:47 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i6M79k5P090059 for perforce@freebsd.org; Thu, 22 Jul 2004 07:09:46 GMT (envelope-from marcel@freebsd.org) Date: Thu, 22 Jul 2004 07:09:46 GMT Message-Id: <200407220709.i6M79k5P090059@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 57906 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jul 2004 07:09:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=57906 Change 57906 by marcel@marcel_nfs on 2004/07/22 07:08:50 kgdb #2. This implementation is based on kgdb #1 that's in src/usr.bin/kgdb. This implementation links against libgdb directly instead of using the remote protocol as IPC with gdb(1). For that reason kgdb #2 is in src/gnu/usr.bin/gdb. The advantage of linking against libgdb is that we can make use of all the hooks that libgdb provides us, as well as push our own target onto the target stack and install a frame sniffer to deal with trapframes. It is also expected that this approach allows us to support relocatable kernel modules, although I have no clue how ATM. These new files provide: o A minimal manpage (can't be bad). o An implementation for main() that invokes gdb_main(). This gives us the debugger prompt and all the functionality that one is used to. o A gdb init hook that sets the prompt and loads the selected kernel as the symbol file. o The loading of the core file with -lkvm. o The kernel thread support functions. What is needed to make it a functional kernel debugger: o A new target that groks the kernel threads, uses -lkvm to read from the core file and provides for the necessary register fetching. o Some smartness to automaticly load the kernel modules as additional symbol files. o A bunch of commands to aid in debugging. Affected files ... .. //depot/projects/gdb/gnu/usr.bin/gdb/kgdb/Makefile#1 add .. //depot/projects/gdb/gnu/usr.bin/gdb/kgdb/kgdb.1#1 add .. //depot/projects/gdb/gnu/usr.bin/gdb/kgdb/kgdb.h#1 add .. //depot/projects/gdb/gnu/usr.bin/gdb/kgdb/kthr.c#1 add .. //depot/projects/gdb/gnu/usr.bin/gdb/kgdb/main.c#1 add Differences ...