From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755400AbdEHTEw convert rfc822-to-8bit (ORCPT ); Mon, 8 May 2017 15:04:52 -0400 Received: from terminus.zytor.com ([65.50.211.136]:46555 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752364AbdEHTEv (ORCPT ); Mon, 8 May 2017 15:04:51 -0400 Date: Mon, 08 May 2017 11:57:59 -0700 User-Agent: K-9 Mail for Android In-Reply-To: <20170508144049.6x67526a677g2miw@treble> References: <20170505122200.31436-1-jslaby@suse.cz> <20170505122200.31436-7-jslaby@suse.cz> <20170507165524.cdxfuwbd5alr7v6k@treble> <20170508144049.6x67526a677g2miw@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [PATCH 7/7] DWARF: add the config option To: Josh Poimboeuf , Andy Lutomirski CC: Linus Torvalds , Jiri Slaby , Andrew Morton , live-patching@vger.kernel.org, Linux Kernel Mailing List , Thomas Gleixner , Ingo Molnar , the arch/x86 maintainers , Andy Lutomirski , Jiri Kosina From: hpa@zytor.com Message-ID: <5EAB44CD-482B-485F-A0E0-0AE7937FFF2C@zytor.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On May 8, 2017 7:40:49 AM PDT, Josh Poimboeuf wrote: >On Sun, May 07, 2017 at 10:35:28PM -0700, Andy Lutomirski wrote: >> I think that, if the code were sufficiently robust, it would be handy >> if the unwinder displayed function arguments. DWARF can do that to a >> limited extent. > >Honestly I get the feeling that displaying function arguments wouldn't >be realistic (DWARF or no DWARF). On x86-64, arguments are passed in >registers, so tracking down their values is a lot more involved than >just looking at the stack. > >The DWARF CFI only shows you the callee-saved registers. To figure out >the other registers you'd have to dive into the other DWARF sections >and >examine previous stack frames for clues. I think it's not a >deterministic process, based on how often I see gdb complain with >''. I'd bet it's a lot harder than a basic stack >dump. > >Also, most kernel functions rely on pointer arguments, which are pretty >much useless without dumping the contents of the structs they point to. >But then doing that properly would be a whole new level of difficulty. At some point you are just reinventing k(g)db... -- Sent from my Android device with K-9 Mail. Please excuse my brevity.