Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp373382imu; Mon, 5 Nov 2018 02:17:42 -0800 (PST) X-Google-Smtp-Source: AJdET5fvJbLaN0k9tSuj7HP1elaYbBQaWjj93pdrztuwdiV3OwF7UJEur5OfbzQ6QkgRiiCCwCtQ X-Received: by 2002:a63:aa48:: with SMTP id x8-v6mr19218587pgo.87.1541413062172; Mon, 05 Nov 2018 02:17:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541413062; cv=none; d=google.com; s=arc-20160816; b=LWyS/AebcvArK7jfEZsTtMbxQh3eu/Iju2z/RGWHNBjQPJB5bHa8yOmqyzVzqGCnAj C/bLKtUDry0NsCeOFwGoRn5qKjb7OoJqKzJaoT/rHVjHBWdEDeuRrBMO7ir84ffG080S oQoYs8kfS9PFG9Tf2lcQUtEmY7HBIgB1zNBt8CMbHnXozDA/U2+nalew5rxb6DJshGvU klhCRW/PBZEHILc1moA0CXJs8oi8hlCHTcCW8od+C4r9FJisTIcGQ/JJwMZwitiZ5PUA INuJgZk8O/gEIgxld33IzafnynXzrqpX792NGJiT/R+TZYTrQk0HbOALeX6fIlxD9wmB cNcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=GlHEWV6xWNcjNWoZUMUB3S+ZEt/R/4IifuYapKNqw3k=; b=A10wI/0N0Ws4fcNGzGoETCfffK0TltZrqM7HH4KvkKyAFZ7Cma6P4CVbFyzD6l+7Wa v4XduBT7WSrhwrqjDqAJ3sUcT0Dz+3u3t/cpDWN5TLjrXcbih9jIGURAQMwj0OobnNml yscaZ5K23TOSZEweZ5kBCzuZ6nS+WDq/LA+Ooh51ADgzzPBmKQJG1n0g9QmQIlMhlvsL hx6ZuhX/SvtV+ER5KzEa0qGE1VwxKhJWqsmvETGArYDu1bSB6zS6MN7FX3hSIb3EE41q okzmLTD+H2NXZTFeuatgWLTxwsKlSD+NqpL8GtITep4sh1Ree7XqOGM+BC1Mvnzdag/6 qUaw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c10si6310332pgt.222.2018.11.05.02.17.26; Mon, 05 Nov 2018 02:17:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728122AbeKETeo (ORCPT + 99 others); Mon, 5 Nov 2018 14:34:44 -0500 Received: from lizzard.sbs.de ([194.138.37.39]:56050 "EHLO lizzard.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726319AbeKETen (ORCPT ); Mon, 5 Nov 2018 14:34:43 -0500 X-Greylist: delayed 947 seconds by postgrey-1.27 at vger.kernel.org; Mon, 05 Nov 2018 14:34:41 EST Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id wA59xoCH016436 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 5 Nov 2018 10:59:50 +0100 Received: from [139.25.68.37] (md1q0hnc.ad001.siemens.net [139.25.68.37] (may be forged)) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id wA59xoCr023185; Mon, 5 Nov 2018 10:59:50 +0100 Subject: Re: [PATCH v3] scripts/gdb: fix lx-version To: kieran.bingham@ideasonboard.com, Du Changbin , kbingham@kernel.org, Andrew Morton Cc: linux-kernel@vger.kernel.org, Peter Griffin References: <20181017142442.7818-1-changbin.du@gmail.com> <6a1ec497-acd7-cd4d-4541-5960e03d955c@ideasonboard.com> From: Jan Kiszka Message-ID: <45fb570d-3703-7ed5-c831-5613fe85ba66@siemens.com> Date: Mon, 5 Nov 2018 10:59:49 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 In-Reply-To: <6a1ec497-acd7-cd4d-4541-5960e03d955c@ideasonboard.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25.10.18 10:54, Kieran Bingham wrote: > Hi Du, > > Thank you for the updated patch, > > On 17/10/2018 15:24, Du Changbin wrote: >> For current gdb version (has tested with 7.3 and 8.1), 'lx-version' >> only prints one character. >> (gdb) lx-version >> L(gdb) >> >> This can be fixed by casting 'linux_banner' as (char *). >> (gdb) lx-version >> Linux version 4.19.0-rc1+ (changbin@acer) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #21 SMP Sat Sep 1 21:43:30 CST 2018 >> >> Signed-off-by: Du Changbin > > I'll update the upstream GDB bugzilla [0] regarding this issue - but I > think we need a workaround here, and this is it. > > Fixes: 2d061d999424 ("scripts/gdb: add version command") > Reviewed-by: Kieran Bingham > > And for reference, this already has an early LGTM from Jan as well. > > [0] https://sourceware.org/bugzilla/show_bug.cgi?id=20077 > Acked-by: Jan Kiszka Jan >> --- >> scripts/gdb/linux/proc.py | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/scripts/gdb/linux/proc.py b/scripts/gdb/linux/proc.py >> index 086d27223c0c..0aebd7565b03 100644 >> --- a/scripts/gdb/linux/proc.py >> +++ b/scripts/gdb/linux/proc.py >> @@ -41,7 +41,7 @@ class LxVersion(gdb.Command): >> >> def invoke(self, arg, from_tty): >> # linux_banner should contain a newline >> - gdb.write(gdb.parse_and_eval("linux_banner").string()) >> + gdb.write(gdb.parse_and_eval("(char *)linux_banner").string()) >> >> LxVersion() > > -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux