From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121578 invoked by alias); 10 Aug 2018 19:08:29 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 121551 invoked by uid 89); 10 Aug 2018 19:08:28 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 spammy=corrupted, HX-ClientProxiedBy:910 X-HELO: sesbmg22.ericsson.net Received: from sesbmg22.ericsson.net (HELO sesbmg22.ericsson.net) (193.180.251.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 10 Aug 2018 19:08:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; d=ericsson.com; s=mailgw201801; c=relaxed/simple; q=dns/txt; i=@ericsson.com; t=1533928104; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:CC:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=NME4NNoqdb713/K9XAa7F4qmPiNVQvqHLD+cqmcplVY=; b=diMsytcDTtw64OpLJ0TzdNpvuT0jfY5+kUO6+eTFwL7NlJ/lZbezPb1OUtX69ra3 MgCt5LLC0wUSxkgaHsIbn5npHNyh+QVwRA7abshlNseglFi8HF1ylePxsTIGODrL iah0McrvtG6UEG1yLk4/xpte/6pm+Ij/0dsVLck9PJg=; Received: from ESESBMB505.ericsson.se (Unknown_Domain [153.88.183.118]) by sesbmg22.ericsson.net (Symantec Mail Security) with SMTP id C1.23.21978.8A2ED6B5; Fri, 10 Aug 2018 21:08:24 +0200 (CEST) Received: from ESESBMR501.ericsson.se (153.88.183.129) by ESESBMB505.ericsson.se (153.88.183.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Fri, 10 Aug 2018 21:08:24 +0200 Received: from ESESSMB503.ericsson.se (153.88.183.164) by ESESBMR501.ericsson.se (153.88.183.129) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Fri, 10 Aug 2018 21:08:24 +0200 Received: from NAM01-SN1-obe.outbound.protection.outlook.com (153.88.183.157) by ESESSMB503.ericsson.se (153.88.183.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3 via Frontend Transport; Fri, 10 Aug 2018 21:08:23 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IFpMyrghkfDPDS8RP0QjxXOnfkE0fvj0du9TECKRUC4=; b=AEtdV04Fkae5ceS3HVQelfXeXUj4AhNJtXWCY5LJd5NTC8yJfZQfjJ1pqRC+FuY8ui87zpaVl3hXr46P9yjxnmX7ANuKPl1Kwx9KeQ1oCjPE33ueUXhAqxfbodVnOYJfazOO+R35j11WKoPQ3NS5WV959OlsN7Diciyl3CbZyjs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=simon.marchi@ericsson.com; Received: from [142.133.48.48] (192.75.88.130) by BN7PR15MB2385.namprd15.prod.outlook.com (2603:10b6:406:8c::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.15; Fri, 10 Aug 2018 19:08:21 +0000 Subject: Re: [PATCH v3 2/3] Detect SVE when reading aarch64 core files To: Alan Hayward , CC: References: <20180810160849.68985-1-alan.hayward@arm.com> <20180810160849.68985-3-alan.hayward@arm.com> From: Simon Marchi Message-ID: Date: Fri, 10 Aug 2018 19:08:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180810160849.68985-3-alan.hayward@arm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-Path: simon.marchi@ericsson.com Received-SPF: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts) X-IsSubscribed: yes X-SW-Source: 2018-08/txt/msg00294.txt.bz2 Hi Alan, LGTM with a nit/suggestion. > + uint64_t vl = extract_unsigned_integer (header + SVE_HEADER_VL_OFFSET, > + SVE_HEADER_VL_LENGTH, byte_order); > + uint64_t vq = sve_vq_from_vl (vl); > + > + if (vq > AARCH64_MAX_SVE_VQ || vq == 0) > + { > + warning (_("sve header invalid in " > + "'.reg-aarch-sve' section in core file.")); > + return 0; > + } If higher vq/vl values are expected to be supported in the future (the definition of AARCH64_MAX_SVE_VQ says "Increase if required"), it might be good to provide a more specific error message in that case. Something that says "this value of vq/vl (32) is not supported by this GDB" (but in user-friendly). Otherwise, a user might think that the core file is corrupted, when actually they have an old GDB that did not support that vector size. It's just a suggestion, I leave that up to you. The patch is good either way. Simon