From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2453 invoked by alias); 19 Jun 2019 15:14:14 -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 2442 invoked by uid 89); 19 Jun 2019 15:14:14 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.0 required=5.0 tests=AWL,BAYES_00,KAM_NUMSUBJECT,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx0b-0016f401.pphosted.com Received: from mx0b-0016f401.pphosted.com (HELO mx0b-0016f401.pphosted.com) (67.231.156.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 19 Jun 2019 15:14:13 +0000 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5JFCpiG014622; Wed, 19 Jun 2019 08:14:12 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=pfpt0818; bh=c7o/KH/ZlZZxL+94wT0BhD7tBTXRYAKdUjD3yTdxZs0=; b=MdCaXIWYENkCFrVOBnSxdvcVR7unRVze1fJfoS/7iNuf5IecHf1lVTd7pOW3Sgp9KTX6 enMENTdaUBZjlVYsqshTywFTyijJW6LRrkpnmfEeraHm0JhuL0bm+PN/7+vCIpDPDCH3 dOjFsLjzdgUWoRRbWw0/MMbHv4amA53SS3H0gMrsc/u7vUsRSutDUHaw5Byp6OfBNQ5l GytC66zUTprWElP1ZzHZJX+mWJZjBp9xdx1JaJSI0dB5iMmSztTFYLm+6HoW7cgSoFf5 s+S+pa6a5CVDnjsERo6LlY72cQ8Y+Lb0m3Zra40b/P/rVOggY9ckscTnGmhnuFfHJONB Rw== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0b-0016f401.pphosted.com with ESMTP id 2t7810k41b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 19 Jun 2019 08:14:12 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 19 Jun 2019 08:14:10 -0700 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.52) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Wed, 19 Jun 2019 08:14:10 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=c7o/KH/ZlZZxL+94wT0BhD7tBTXRYAKdUjD3yTdxZs0=; b=xuyHWYmJ+78eduW/wHjD4AkxjeSX6rFyPGGRGs7hmbYk+TmBO2NsnW9ht736CnbVmgMsq3STsflZVfxYFxnHKWs4+W7mgvWMIeLEYSTI+3vUbdnbIewA2g++MmtgSEoKn5XZV71wRZc7yD8aENabCKmOUa+f6CZ1dnVUNgFiQf4= Received: from MN2PR18MB3263.namprd18.prod.outlook.com (10.255.237.88) by MN2PR18MB3117.namprd18.prod.outlook.com (10.255.86.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1987.13; Wed, 19 Jun 2019 15:14:06 +0000 Received: from MN2PR18MB3263.namprd18.prod.outlook.com ([fe80::956b:cba3:bfa3:3112]) by MN2PR18MB3263.namprd18.prod.outlook.com ([fe80::956b:cba3:bfa3:3112%4]) with mapi id 15.20.1987.010; Wed, 19 Jun 2019 15:14:06 +0000 From: Steve Ellcey To: "gdb-patches@sourceware.org" , "tdevries@suse.de" Subject: Re: [EXT] Re: [PATCH][gdb] Fix build breaker with gcc 4.8 Date: Wed, 19 Jun 2019 15:14:00 -0000 Message-ID: <6b3d41d90d2899acb8714450fe9d2ab1378bf901.camel@marvell.com> References: <20190619110410.GA14131@delia> <0c2e64928ca6b526349f10ca073023fd50449f7f.camel@marvell.com> <0cedb79e-1423-90d8-0c61-1386f398ab20@suse.de> In-Reply-To: <0cedb79e-1423-90d8-0c61-1386f398ab20@suse.de> x-ms-oob-tlc-oobclassifiers: OLM:6108; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 Content-Type: text/plain; charset="utf-8" Content-ID: <984E9EF4207BC845A85E0B50FF67168D@namprd18.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: sellcey@marvell.com X-SW-Source: 2019-06/txt/msg00382.txt.bz2 T24gV2VkLCAyMDE5LTA2LTE5IGF0IDE3OjAwICswMjAwLCBUb20gZGUgVnJp ZXMgd3JvdGU6DQo+IA0KPiANCj4gSSB0aGluayB5b3UncmUgcnVubmluZyBp bnRvIHRoZSBzYW1lIGJ1aWxkIGJyZWFrZXIgYXMgbWUsIGZvciB3aGljaCBJ DQo+IGp1c3QgcHVzaGVkIGEgZml4IChhbmQgbm90IHRoaXMgb25lKS4NCj4g DQo+IFRoYW5rcywNCj4gLSBUb20NCg0KWWVzLCB0aGF0IHBhdGNoIGZpeGVz IG15IGJ1aWxkLiBUaGFua3MuDQoNClN0ZXZlIEVsbGNleQ0Kc2VsbGNleUBt YXJ2ZWxsLmNvbQ0K >From gdb-patches-return-156909-listarch-gdb-patches=sources.redhat.com@sourceware.org Wed Jun 19 15:19:24 2019 Return-Path: Delivered-To: listarch-gdb-patches@sources.redhat.com Received: (qmail 10575 invoked by alias); 19 Jun 2019 15:19:24 -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 Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 10567 invoked by uid 89); 19 Jun 2019 15:19:24 -0000 Authentication-Results: sourceware.org; auth=none 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,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 19 Jun 2019 15:19:22 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id AACB7AD12; Wed, 19 Jun 2019 15:19:20 +0000 (UTC) Subject: Re: [PATCH 3/4] gdbserver: Ensure all debug output uses debug functions To: Tom Tromey Cc: Alan Hayward , "gdb-patches@sourceware.org" , nd References: <20190416101729.16176-1-alan.hayward@arm.com> <20190416101729.16176-4-alan.hayward@arm.com> <87sguhsplu.fsf@tromey.com> <8e0c4e58-abc3-d078-1628-2297e4e7d4d7@suse.de> <8736k5hfyq.fsf@tromey.com> From: Tom de Vries Message-ID: <1c6b9535-0248-3e7f-d63a-34446967fcf7@suse.de> Date: Wed, 19 Jun 2019 15:19:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <8736k5hfyq.fsf@tromey.com> Content-Type: multipart/mixed; boundary="------------647D0A805E3D19AB9DA8236D" X-IsSubscribed: yes X-SW-Source: 2019-06/txt/msg00383.txt.bz2 This is a multi-part message in MIME format. --------------647D0A805E3D19AB9DA8236D Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-length: 231 On 19-06-19 15:17, Tom Tromey wrote: >>>>>> "Tom" == Tom de Vries writes: > > Tom> This seems to fix it. > > This needs a ChangeLog entry but is otherwise ok. Thanks. > Committed as attached. Thanks, - Tom --------------647D0A805E3D19AB9DA8236D Content-Type: text/x-patch; name="0001-gdb-Fix-clang-buildbreaker.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="0001-gdb-Fix-clang-buildbreaker.patch" Content-length: 1906 [gdb] Fix clang buildbreaker Building gdb with clang, I run into: ... src/gdb/gdbserver/linux-low.c:6190:41: error: comparison of unsigned \ expression < 0 is always false [-Werror,-Wtautological-compare] if (debug_write ("sigchld_handler\n", sizeof ("sigchld_handler\n") - 1) < 0) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ ... This regression is introduced by commit a7e559cc08 "gdbserver: Ensure all debug output uses debug functions", which replaces calls to write with result type ssize_t with calls to debug_write with result type size_t. Fix this by making debug_write return ssize_t. Build and reg-tested on x86_64-linux. gdb/gdbserver/ChangeLog: 2019-06-19 Tom de Vries * debug.h (debug_write): Change return type to ssize_t. * debug.c (debug_write): Same. --- gdb/gdbserver/debug.c | 2 +- gdb/gdbserver/debug.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/gdbserver/debug.c b/gdb/gdbserver/debug.c index a1cf5dbf7a..19f11fc17c 100644 --- a/gdb/gdbserver/debug.c +++ b/gdb/gdbserver/debug.c @@ -133,7 +133,7 @@ do_debug_exit (const char *function_name) /* See debug.h. */ -size_t +ssize_t debug_write (const void *buf, size_t nbyte) { int fd = fileno (debug_file); diff --git a/gdb/gdbserver/debug.h b/gdb/gdbserver/debug.h index 29e58ad8a4..07e94eac6e 100644 --- a/gdb/gdbserver/debug.h +++ b/gdb/gdbserver/debug.h @@ -36,7 +36,7 @@ void do_debug_enter (const char *function_name); void do_debug_exit (const char *function_name); /* Async signal safe debug output function that calls write directly. */ -size_t debug_write (const void *buf, size_t nbyte); +ssize_t debug_write (const void *buf, size_t nbyte); /* These macros are for use in major functions that produce a lot of debugging output. They help identify in the mass of debugging output --------------647D0A805E3D19AB9DA8236D--