From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 21 17:19:46 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17124106564A for ; Tue, 21 Jun 2011 17:19:46 +0000 (UTC) (envelope-from bakul@bitblocks.com) Received: from mail.bitblocks.com (ns1.bitblocks.com [173.228.5.8]) by mx1.freebsd.org (Postfix) with ESMTP id F3C408FC18 for ; Tue, 21 Jun 2011 17:19:45 +0000 (UTC) Received: from bitblocks.com (localhost [127.0.0.1]) by mail.bitblocks.com (Postfix) with ESMTP id ADA33B827; Tue, 21 Jun 2011 10:01:34 -0700 (PDT) To: Ewart Tempest In-reply-to: Your message of "Mon, 13 Jun 2011 10:05:15 EDT." <4DF6191B.2030407@jnpr.net> References: <4DF6191B.2030407@jnpr.net> Comments: In-reply-to Ewart Tempest message dated "Mon, 13 Jun 2011 10:05:15 -0400." Date: Tue, 21 Jun 2011 10:01:34 -0700 From: Bakul Shah Message-Id: <20110621170134.ADA33B827@mail.bitblocks.com> Cc: freebsd-hackers@freebsd.org, Ewart Tempest Subject: Re: dwarf2 reader X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jun 2011 17:19:46 -0000 On Mon, 13 Jun 2011 10:05:15 EDT Ewart Tempest wrote: > I have developed some flight recording capability in the JUNOS FreeBSD > based kernel, with the flight recorded data being captured in binary > form for performance. All the subsequent formatting and display of this > data is performed by a user-space application. I would like to reduce > the amount of time that designers spend writing formatters to display > their flight recorded data. kgdb is perfectly capable of displaying all > kernel resident data structures, and the manner in which it does so is > perfectly acceptable for flight recording purposes. The code that kgdb > uses to support this framework is difficult to break out - does anyone > know of a dwarf2 reader s/w implementation that is more re-usable? In addition to lldb, there is the Path_DB debugger from Pathscale that has a dwarf reader. Path_DB seems fairly portable but don't know how hard it would be break out the dwarf2 code, about 2K+ lines of C++. Open sourced under CDDL. git://github.com/path64/debugger.git