From owner-cvs-all@FreeBSD.ORG Mon Jan 28 21:40:10 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C505116A4A6; Mon, 28 Jan 2008 21:40:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B537D13C4E1; Mon, 28 Jan 2008 21:40:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0SLeAQ2035074; Mon, 28 Jan 2008 21:40:10 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0SLeAKC035073; Mon, 28 Jan 2008 21:40:10 GMT (envelope-from jhb) Message-Id: <200801282140.m0SLeAKC035073@repoman.freebsd.org> From: John Baldwin Date: Mon, 28 Jan 2008 21:40:10 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/gnu/usr.bin/gdb/kgdb kgdb.h kld.c trgt.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jan 2008 21:40:10 -0000 jhb 2008-01-28 21:40:10 UTC FreeBSD src repository Modified files: gnu/usr.bin/gdb/kgdb kgdb.h kld.c trgt.c Log: Add support for automatically loading symbols for kld's on startup: - Add a new 'kgdb_auto_load_klds()' routine which is invoked during startup that walks the list of linker files and tries to find a matching kld on disk for each non-kernel kld. If a kld file is found, then it is added as if the 'add-kld' command is invoked. One change from 'add-kld' is that this method attempts to use the 'pathname' from the linker_file structure first to try to load the file. If that fails it then looks in the kernel directory followed by the directories in the module path. - Move the kld file suffix handling into a separate routine so that it can be called standalone and to reduce duplicate code in find_kld_path(). - Cache the offsets of members of 'struct linker_file' during startup instead of computing them for each 'add-kld'. - Use GDB's target_read_string() instead of direct KVM access. - Add all resident sections from a kld by using bfd_map_over_sections() to build the section list rather than just adding symbols for ".text", ".data", ".bss", and ".rodata". - Change the 'add-kld' command to do a y/n prompt before adding the symbols when run interactively to match 'add-symbol-file'. MFC after: 1 week Revision Changes Path 1.9 +1 -0 src/gnu/usr.bin/gdb/kgdb/kgdb.h 1.2 +243 -137 src/gnu/usr.bin/gdb/kgdb/kld.c 1.8 +1 -0 src/gnu/usr.bin/gdb/kgdb/trgt.c