From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 22 17:30:51 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 F19F7106564A; Tue, 22 Mar 2011 17:30:51 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [IPv6:2607:f678:1010::34]) by mx1.freebsd.org (Postfix) with ESMTP id CD1478FC15; Tue, 22 Mar 2011 17:30:51 +0000 (UTC) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id p2MHUnkx013232 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 22 Mar 2011 10:30:51 -0700 (PDT) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id p2MHUnfA013231; Tue, 22 Mar 2011 10:30:49 -0700 (PDT) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA02254; Tue, 22 Mar 11 09:28:57 PST Date: Tue, 22 Mar 2011 10:28:51 -0700 From: perryh@pluto.rain.com To: panxingxing@mprc.pku.edu.cn Message-Id: <4d88dc53.+BnpvakcLKUHMZGE%perryh@pluto.rain.com> References: <20110319174115.GA33282@dchagin.static.corbina.ru> <20110320071847.GA10579@dchagin.static.corbina.ru> <20110320181911.GA79862@dchagin.static.corbina.ru> <20110321173204.GA7575@dchagin.static.corbina.ru> <20110321200025.GP78089@deviant.kiev.zoral.com.ua> In-Reply-To: User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: kostikbel@gmail.com, freebsd-hackers@freebsd.org, dchagin@freebsd.org Subject: Re: GSoC'11: DWARF2 call frame information 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, 22 Mar 2011 17:30:52 -0000 Xingxing Pan wrote: > Dose full register tracking means to emit DWARF for all the > registers's saving and restoring in the life time of the function? Most assembly functions are leaves, so saving/restoring around calls to lower-level functions will be infrequent. I suspect it would be more useful to emit debug records that show how the registers are being used, so that gdb can display meaningful names along with their values. And yes, this requires reading and understanding the comments if the code is well commented, or analyzing the code if it is not well commented. It can't be automated.