From patchwork Fri Feb 24 10:12:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Hayward X-Patchwork-Id: 19369 Received: (qmail 62418 invoked by alias); 24 Feb 2017 10:12:44 -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 62059 invoked by uid 89); 24 Feb 2017 10:12:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.6 required=5.0 tests=AWL, 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=5426 X-HELO: EUR01-HE1-obe.outbound.protection.outlook.com Received: from mail-he1eur01on0089.outbound.protection.outlook.com (HELO EUR01-HE1-obe.outbound.protection.outlook.com) (104.47.0.89) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 24 Feb 2017 10:12:42 +0000 Received: from VI1PR0801MB1822.eurprd08.prod.outlook.com (10.168.68.7) by VI1PR0801MB1824.eurprd08.prod.outlook.com (10.168.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.919.13; Fri, 24 Feb 2017 10:12:39 +0000 Received: from VI1PR0801MB1822.eurprd08.prod.outlook.com ([10.168.68.7]) by VI1PR0801MB1822.eurprd08.prod.outlook.com ([10.168.68.7]) with mapi id 15.01.0919.018; Fri, 24 Feb 2017 10:12:39 +0000 From: Alan Hayward To: "gdb-patches@sourceware.org" CC: nd Subject: [PATCH] Remove MAX_REGISTER_SIZE from sol-thread.c Date: Fri, 24 Feb 2017 10:12:39 +0000 Message-ID: <9C2B8A71-1050-4B8B-A27A-C620E46AB9A2@arm.com> authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-office365-filtering-correlation-id: 775401ea-cd2f-43c6-5f6d-08d45c9da9dc x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:VI1PR0801MB1824; x-microsoft-exchange-diagnostics: 1; VI1PR0801MB1824; 7:RQM6f6Ub4DzrIIckweZyBsf1tb4Gt2DYgnsv6R7MOFNK32AT5v4cefdK75SgEqvB6ysvAYap694tyhVg1MhzbzXZJwUxKWTUMAXmbitDTWxRi2Ro3PhR1Kaoctq+ga8K2g00nmuv0ZQVaBweG4Xsbhdlv5L5TKaM1QQMfaKKLxHIlp3Wcv6WSpiD1FdzJZZPwXMlCrktuSs9KJZH4uSotCdrx75DcxpwAa5jtZa/af3qvjAYr7vFVDIPfej13VN1E83v3iW4EUUTikUH4ikh8vhMAwEA416aoirpGO0bfyBJBxJBa310l9G7iV1TGoGuu451LPhyPW5IZ99b9yggUA== nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123555025)(20161123564025)(20161123562025)(20161123560025)(20161123558025)(6072148); SRVR:VI1PR0801MB1824; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0801MB1824; x-forefront-prvs: 0228DDDDD7 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39450400003)(39410400002)(39850400002)(39840400002)(39860400002)(199003)(189002)(377424004)(5660300001)(6512007)(2900100001)(2351001)(6916009)(122556002)(66066001)(6436002)(99286003)(105586002)(106116001)(106356001)(6506006)(6486002)(4326007)(77096006)(2501003)(2906002)(36756003)(6116002)(3846002)(102836003)(82746002)(53936002)(54356999)(3280700002)(8936002)(8676002)(33656002)(68736007)(575784001)(3660700001)(86362001)(101416001)(81156014)(50986999)(83716003)(305945005)(81166006)(7736002)(97736004)(189998001)(110136004)(450100001)(5640700003)(38730400002)(25786008)(92566002)(104396002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0801MB1824; H:VI1PR0801MB1822.eurprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: <711B08E881EFFA468A7F0E60662A710A@eurprd08.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Feb 2017 10:12:39.4194 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1824 Regcache calls in sol-thread.c are bogus and do nothing. The code in between will not change or update regcache. Removed. Ok to commit? Alan. 2017-02-24 Alan Hayward * sol-thread.c (sol_thread_store_registers): Remove regcache calls. diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c index a09a3ab9a8bc56f367e3ba1537f5674f0a7f491f..06b146c314a10be0e360a7242bab229ced1c00b1 100644 --- a/gdb/sol-thread.c +++ b/gdb/sol-thread.c @@ -534,12 +534,6 @@ sol_thread_store_registers (struct target_ops *ops, if (regnum != -1) { - /* Not writing all the registers. */ - char old_value[MAX_REGISTER_SIZE]; - - /* Save new register value. */ - regcache_raw_collect (regcache, regnum, old_value); - val = p_td_thr_getgregs (&thandle, gregset); if (val != TD_OK) error (_("sol_thread_store_registers: td_thr_getgregs %s"), @@ -548,9 +542,6 @@ sol_thread_store_registers (struct target_ops *ops, if (val != TD_OK) error (_("sol_thread_store_registers: td_thr_getfpregs %s"), td_err_string (val)); - - /* Restore new register value. */ - regcache_raw_supply (regcache, regnum, old_value); } fill_gregset (regcache, (gdb_gregset_t *) &gregset, regnum);