From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 17 19:35:32 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 093F1513; Mon, 17 Mar 2014 19:35:32 +0000 (UTC) Received: from mail-vc0-x233.google.com (mail-vc0-x233.google.com [IPv6:2607:f8b0:400c:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AC76CED2; Mon, 17 Mar 2014 19:35:31 +0000 (UTC) Received: by mail-vc0-f179.google.com with SMTP id ij19so6180562vcb.24 for ; Mon, 17 Mar 2014 12:35:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=k3nvFW4sn+8jwU+iPHT3UvNNvlSitpddxsqQIK4nXaM=; b=niidksWq0cNxodglQMBeqlx+NLBPJb6jVvcUdQucP8RxzPo6Sa4ethUGJfqGyQdKPD ZfmaJ5QW2jfO5Xm111D8jDceG3MdNCDDaxFuZ6Oazd6NM/suTBf4H3Hq4/ZvLhJqdtba bhN62V9v15fs2XwwDcajyGXmSjxVAMqyWGnEZTAU3QzHp8SAalvjX/4nrTcVsLYsVAiA 6IRcYiTmBsh7b6sdOV3Rsqf8/L/cjPtYo0GELAAGwxadkmCm5r1HbC9q9MAuNhY3Fj+y Gfd8AN10dfF2ixri4fyaG062ptv9Kt9YFUC/nINeQfjLarmOciRBBkl2m3L4PU6BlZAd 7jEA== MIME-Version: 1.0 X-Received: by 10.52.120.6 with SMTP id ky6mr28637vdb.38.1395084930776; Mon, 17 Mar 2014 12:35:30 -0700 (PDT) Received: by 10.220.135.199 with HTTP; Mon, 17 Mar 2014 12:35:30 -0700 (PDT) Date: Mon, 17 Mar 2014 20:35:30 +0100 Message-ID: Subject: GSoC proposal: kernel debugging support for LLDB From: Mike Ma To: Ed Maste , freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Mar 2014 19:35:32 -0000 Hi all, I've submitted a GSoC proposal here, http://www.google-melange.com/gsoc/proposal/public/google/gsoc2014/mikemandarine/5665319561461760. I'm copying the proposal here for wider audience. Any suggestions or comments are more than appreciated. Thanks a lot for your time. Project Description I'm planning to add a plugin called FreeBSD-kernel to LLDB, and the existing userland ELF core strategies can be inherited. On FreeBSD system, kernel virtual memory image can be accessed using libkvm interfaces, as to support kernel debugging, libkvm APIs, i.e. kvm_read(3)/kvm_write(3), will be mainly used. To fully support kernel debugging, module metadata parsing and module automatic loading will also be implemented. There is some existing work related to this project. The first is kgdb in FreeBSD code base, it is a kernel debugger based on gdb. Plus, there is Mac OS X kernel debugging support in LLDB as well. This project will be focused on the platform that LLDB supports, including amd64, mips and i386. Once this project is done, remote kernel debugging and cross-platform kernel debugging would be the next steps of interest. Deliverables - There are two major milestones: #1 Basic support for opening kernel crash dumps and /dev/mem. (mid-term deliverable) #2 Full debugging support by adding module parsing and loading. (final deliverable) Test Plan - Check all functionalities and commands are working properly, and compare behavior with kgdb and LLDB. - Benchmark tests on startup, stepping, etc. Project Schedule - Week 1 - 3: Kernel crash dumps support. - Week 4 - 6: Live debugging against /dev/mem support. - Week 7 - 10: Kernel Module parsing and loading support. - Week 11 - 12: Tests and bug fixing, and documentation work. All features should be done by the suggested Pencils down day (Aug. 11th). -- Cheers, Mike