From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754816AbdEHOky (ORCPT ); Mon, 8 May 2017 10:40:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31703 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753905AbdEHOkx (ORCPT ); Mon, 8 May 2017 10:40:53 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0CA6223E6E5 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jpoimboe@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 0CA6223E6E5 Date: Mon, 8 May 2017 09:40:49 -0500 From: Josh Poimboeuf To: Andy Lutomirski Cc: Linus Torvalds , Jiri Slaby , Andrew Morton , live-patching@vger.kernel.org, Linux Kernel Mailing List , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , the arch/x86 maintainers , Andy Lutomirski , Jiri Kosina Subject: Re: [PATCH 7/7] DWARF: add the config option Message-ID: <20170508144049.6x67526a677g2miw@treble> References: <20170505122200.31436-1-jslaby@suse.cz> <20170505122200.31436-7-jslaby@suse.cz> <20170507165524.cdxfuwbd5alr7v6k@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 08 May 2017 14:40:52 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -- Josh