Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp309222imm; Tue, 16 Oct 2018 23:58:05 -0700 (PDT) X-Google-Smtp-Source: ACcGV63bql5XcfxmdqakBxE32ihiUVG9XUPgl13ptMEWWvgZKdAiyYHfQ/NiRmY+2BYCZKyMUObt X-Received: by 2002:a17:902:7e0b:: with SMTP id b11-v6mr24469713plm.246.1539759485888; Tue, 16 Oct 2018 23:58:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539759485; cv=none; d=google.com; s=arc-20160816; b=c596ObHZZWDMX1gpjVGYZgbJ0mMNBqZwjPThd8Eha5ewsBvxm3ozhMZJuptOXXu6OZ YK7aFLye+b+ju1zqqEyF8DNtfxCugNHAfMpkk+gqe6uW31olckyE1xv4qtXFjoyUMcQ3 VZkWBP10MbdzQ6UPJ6xhI3mnvAitSsZUsXDHVX8c5YA0STsr46i4lysoGfWcmaiG09wd 2QjMHWkAvfzOIJadCUZtduDcLQ7JNbz6/9pnZhS3MEeRFp/GVRD5Ith2ezVuw92F6xWi VlYDjgm1h+Iok6wCxJC8M4lUVv0hzis5AnGn1D/EAPfIbwQzpE04Pv4srIdM0svufZVP x1Wg== 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=W4g5ppvhJsg9pYcu3nLfoqlFSlaRpwnCS40XSMoQlV0=; b=tl9N/YxjcOoDWvzsVtkc3CnYiVaXzIa0Chd+G5S8urYsBGdAqQ5jTR3FSkNV6A62DX oi/kW8vS+8Yrs+8VHv/o1ySeIe/aVIf6rR6OiyAlIo6HMRMHwXtU3QLMpAgLjU/7JcQ5 V5+cBsIEyTUpgXNp5wXBPXf2PRJhJAk2+fNSKOgZA3On2+9bqBdcBl+MXKFFSpwxYTFw lyEFSJtWCTD1ekDF/hQXP5gcDihNocIXwOnnXR20+uz8EeO+hr0N1ma3ob4QHhmn4Gto 5qUmkbpvRot19Pa2oz3HcX77JgzcYqFFoUsPOLQQMcPLla/F3/SZoVfs9KN5ayq5wFHS 8ihA== 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 l4-v6si14791298pgg.503.2018.10.16.23.57.49; Tue, 16 Oct 2018 23:58:05 -0700 (PDT) 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 S1727507AbeJQOvD (ORCPT + 99 others); Wed, 17 Oct 2018 10:51:03 -0400 Received: from david.siemens.de ([192.35.17.14]:58918 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727182AbeJQOvD (ORCPT ); Wed, 17 Oct 2018 10:51:03 -0400 Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id w9H6ujJG014575 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 17 Oct 2018 08:56:45 +0200 Received: from [167.87.8.95] ([167.87.8.95]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id w9H6uilx019682; Wed, 17 Oct 2018 08:56:45 +0200 Subject: Re: [PATCH] scripts/gdb: fix lx-version for gdb 7.3- To: Du Changbin , kbingham@kernel.org Cc: linux-kernel@vger.kernel.org References: <20181017023652.6867-1-changbin.du@gmail.com> From: Jan Kiszka Message-ID: <62b6aff8-8ca2-7d6c-d810-64d10a25f2d4@siemens.com> Date: Wed, 17 Oct 2018 08:56:44 +0200 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: <20181017023652.6867-1-changbin.du@gmail.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 17.10.18 04:36, Du Changbin wrote: > For gdb version less than 7.3, lx-version only one character. ^^^ prints? > (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 > > gdb 7.4 seems to be no such issue. > > Signed-off-by: Du Changbin > --- > 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() > > Looks good to me otherwise. Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux