From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from userp2120.oracle.com (userp2120.oracle.com [156.151.31.85]) by sourceware.org (Postfix) with ESMTPS id 087C03861039 for ; Tue, 4 Aug 2020 14:58:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 087C03861039 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 074Ew1O5107204; Tue, 4 Aug 2020 14:58:01 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 32n11n4rd9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 04 Aug 2020 14:58:00 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 074EqvTd088847; Tue, 4 Aug 2020 14:57:57 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 32pdhc86gp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 04 Aug 2020 14:57:57 +0000 Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 074EvtaG027090; Tue, 4 Aug 2020 14:57:55 GMT Received: from termi.oracle.com (/10.175.23.64) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 04 Aug 2020 07:57:55 -0700 From: "Jose E. Marchesi" To: Andrew Burgess Cc: "Aktemur, Tankut Baris" , "gdb-patches@sourceware.org" Subject: Re: [PATCH V6 1/3] gdb: support for eBPF References: <20200803140237.14476-1-jose.marchesi@oracle.com> <20200803140237.14476-2-jose.marchesi@oracle.com> <87o8nrengw.fsf@oracle.com> <20200804134154.GV853475@embecosm.com> Date: Tue, 04 Aug 2020 16:57:51 +0200 In-Reply-To: <20200804134154.GV853475@embecosm.com> (Andrew Burgess's message of "Tue, 4 Aug 2020 14:41:54 +0100") Message-ID: <87ft928nm8.fsf@oracle.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9703 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 phishscore=0 spamscore=0 bulkscore=0 malwarescore=0 mlxscore=0 mlxlogscore=661 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008040112 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9703 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 clxscore=1015 priorityscore=1501 impostorscore=0 lowpriorityscore=0 malwarescore=0 spamscore=0 mlxscore=0 suspectscore=0 mlxlogscore=652 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008040113 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Aug 2020 14:58:04 -0000 >> Hello. >> >> > On Monday, August 3, 2020 4:03 PM, Jose E. Marchesi wrote: >> >> This patch adds basic support for the eBPF target: tdep and build >> >> machinery. The accompanying simulator is introduced in subsequent >> >> patches. >> >> >> >> +/* Internal debugging facilities. */ >> >> + >> >> +/* When this is set to non-zero debugging information will be >> >> + printed. */ >> >> + >> >> +static unsigned int bpf_debug_flag = 0; >> >> + >> >> +/* The show callback for 'show debug bpf'. */ >> >> + >> >> +static void >> >> +show_bpf_debug (struct ui_file *file, int from_tty, >> >> + struct cmd_list_element *c, const char *value) >> > >> > Just my two cents. The 'struct' keyword can be removed in numerous places >> > throughout the file. Also, NULL can be replaced with nullptr. >> >> I prefer to write (and maintain) C. > > GDB is written in C++. Though it's C history shows in many places, > the code base is ever moving towards C++, IMHO new code should be > quality C++. I don't think anything in the proposed patch is invalid C++. I was just expressing a personal preference in style, call it Cish C++ if not C. Of course, if the global maintainers decide that "quality" C++ requires avoiding `struct' keywords and using nullptr instead of NULL, and that it is important for new code to stick to it, then sure I will just change it without further discussion :)