From patchwork Fri Aug 10 09:26:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Hayward X-Patchwork-Id: 28835 Received: (qmail 94897 invoked by alias); 10 Aug 2018 09:26:37 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 94888 invoked by uid 89); 10 Aug 2018 09:26:36 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=Hayward, OBV, min_size, hayward X-HELO: EUR04-DB3-obe.outbound.protection.outlook.com Received: from mail-eopbgr60066.outbound.protection.outlook.com (HELO EUR04-DB3-obe.outbound.protection.outlook.com) (40.107.6.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 10 Aug 2018 09:26:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SZTzMSpM9gmQqmgACYGhkGgwg/mEcw8qDn2+z7sYv70=; b=BBWmoY/4qLpRTNlsAO2XKZN06XaSNkb6yqDyPEK/sTOLxMfFks291ekHmfksf4AkWwKGJx7+UuAvvDgN0s86GJ8HVju0xhZw6x6k/GEF+2NtWLxLwjm5UzM7R2lEZDXzQb3h2ZOkwZ5jagRTVP2UkB8AVqUFcR0hrS3I2xQ5HoA= Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com (10.172.226.148) by DB6PR0802MB2392.eurprd08.prod.outlook.com (10.172.250.145) 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 09:26:31 +0000 Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::6c67:c822:7f7d:d62d]) by DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::6c67:c822:7f7d:d62d%6]) with mapi id 15.20.1017.021; Fri, 10 Aug 2018 09:26:31 +0000 From: Alan Hayward To: GDB Patches CC: nd Subject: [OBV/pushed] Rename min_size in get_core_register_section Date: Fri, 10 Aug 2018 09:26:31 +0000 Message-ID: <14123507-D435-47F7-BB00-BAC2A8378BD7@arm.com> authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) Content-ID: MIME-Version: 1.0 X-IsSubscribed: yes Pushed as obvious. As suggested in https://sourceware.org/ml/gdb-patches/2018-08/msg00099.html Make it clearer that the size field indicates the size of the section. 2018-08-10 Alan Hayward * corelow.c (core_target::get_core_register_section): Rename min_size to section_min_size. diff --git a/gdb/corelow.c b/gdb/corelow.c index 059ce2f6ebd33b994191b34f1e0cb7095567f2ea..d3336cf7857e7dc995901fdf5860ad24493acc87 100644 --- a/gdb/corelow.c +++ b/gdb/corelow.c @@ -106,7 +106,7 @@ public: void get_core_register_section (struct regcache *regcache, const struct regset *regset, const char *name, - int min_size, + int section_min_size, int which, const char *human_name, bool required); @@ -569,7 +569,7 @@ void core_target::get_core_register_section (struct regcache *regcache, const struct regset *regset, const char *name, - int min_size, + int section_min_size, int which, const char *human_name, bool required) @@ -592,13 +592,13 @@ core_target::get_core_register_section (struct regcache *regcache, } size = bfd_section_size (core_bfd, section); - if (size < min_size) + if (size < section_min_size) { warning (_("Section `%s' in core file too small."), section_name.c_str ()); return; } - if (size != min_size && !variable_size_section) + if (size != section_min_size && !variable_size_section) { warning (_("Unexpected size of section `%s' in core file."), section_name.c_str ());