From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by sourceware.org (Postfix) with ESMTPS id B9D103851C2F for ; Wed, 5 Aug 2020 09:21:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B9D103851C2F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wm1-x343.google.com with SMTP id g8so5149110wmk.3 for ; Wed, 05 Aug 2020 02:21:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=TDUKM1boByUzq+T+ui0Toc3ezu/alSCib+4ky0+9vds=; b=a+8uXAApexxZAsGg6xuN545sbX79tdlPZb+PTBfO9VrgAyewdhNqVu9SfrX/jLJ4gt y1V/AYdunJOxHXVMdwNeCnBYfZSlEnmiW6QEuDGHlETh9B1MgVpLLR8svUnt3VUzzPgL yMD4NBWkI5B5aEDJW2ubzHnqTSxCSuIXGeW++NmdWfHO1bbZqzOuUxo561Ozu+vG82ZJ lcyvTFA0GCP26vFySwtcEwbVNP5IXWrYzuwh5RdBUoTN30wT9FP63v35s38fM+/HEf8H R9bkXvsfoLTLk2eIy8+qvl/pcAfMl10PU00F4AYcHnkZQs5IGOa5OnO/XtEUFxHQhjEP p12A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=TDUKM1boByUzq+T+ui0Toc3ezu/alSCib+4ky0+9vds=; b=MR8E1zTOkDl9rN2pHpordmEwW2Q8EO/g9XplLABj1e/tnn8LxjE+VjswLchzk8yJGq TIc217CDxc+LHw/is3JGgLrj00ZMhUkO6wiuLu+7Xxmcx06nse+1RyH+SMHs/2tnkyHl b22w4hqIWK5sFerPtNcj8tDr73KQQucR8rR/si858HmL0UaX7F5vOrje+ZY4tbiP0r2S 9er6+6tRPqdA3GxvN6htIC+u8MNq13yN2r0lQL8v0lQ3dsS3YH2oQAth7DtH1OBypp/F fdSrkZ5mfxAX8dPxIo69sADb2ifrH3WSk9mfjTTHIcx3IAOJCM5zYgQoEBkZlMwMEW98 UC/Q== X-Gm-Message-State: AOAM532X10iob6zTsmWJIhT75MoObXfRxcfHMuRSKiSvqKCthSGcUoaJ PHlQJvxKm9cjfXy3CL93xXoO7Q== X-Google-Smtp-Source: ABdhPJyQNXEpfeQtK+IgJIKqbvtrMstor1tn6Ns+1AaMc1X7thoogr/CRFlFbysAwsYm3EiZWUGnpw== X-Received: by 2002:a1c:9952:: with SMTP id b79mr2466771wme.68.1596619273804; Wed, 05 Aug 2020 02:21:13 -0700 (PDT) Received: from localhost (host86-140-161-92.range86-140.btcentralplus.com. [86.140.161.92]) by smtp.gmail.com with ESMTPSA id l18sm1932411wrm.52.2020.08.05.02.21.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Aug 2020 02:21:13 -0700 (PDT) Date: Wed, 5 Aug 2020 10:21:12 +0100 From: Andrew Burgess To: "Jose E. Marchesi" Cc: "Aktemur, Tankut Baris" , "gdb-patches@sourceware.org" Subject: Re: [PATCH V6 1/3] gdb: support for eBPF Message-ID: <20200805092112.GA853475@embecosm.com> References: <20200803140237.14476-1-jose.marchesi@oracle.com> <20200803140237.14476-2-jose.marchesi@oracle.com> <87o8nrengw.fsf@oracle.com> <20200804134154.GV853475@embecosm.com> <87ft928nm8.fsf@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87ft928nm8.fsf@oracle.com> X-Operating-System: Linux/5.6.15-200.fc31.x86_64 (x86_64) X-Uptime: 10:06:21 up 17 days, 18:20, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no 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: Wed, 05 Aug 2020 09:21:16 -0000 * Jose E. Marchesi [2020-08-04 16:57:51 +0200]: > > >> 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. I was thinking about this last night and I realised that "quality" was absolutely the wrong word for me to use, so I apologise for that. The issue here is not what is good (or quality) vs bad, which is what I implied. As you said, your code is perfectly valid C++. What I should have said is that your preferences don't take precedent over the projects agreed coding standard. There are many non-functional alternatives to the current coding standard, but people are not free to just go with their personal preferences. We all stick to some agreed rules, and hopefully, over time we end up with a consistent looking code base. That said, as a more junior maintainer, I certainly defer to Simon on this. If he's happy with this patch being merged then I'm not going to block it. Once again, apologise for miss-speaking in my previous email. Thanks, Andrew > > 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 :)