Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Burgess <andrew.burgess@embecosm.com>
To: "Jose E. Marchesi" <jose.marchesi@oracle.com>
Cc: "Aktemur, Tankut Baris" <tankut.baris.aktemur@intel.com>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH V6 1/3] gdb: support for eBPF
Date: Wed, 5 Aug 2020 10:21:12 +0100	[thread overview]
Message-ID: <20200805092112.GA853475@embecosm.com> (raw)
In-Reply-To: <87ft928nm8.fsf@oracle.com>

* Jose E. Marchesi <jose.marchesi@oracle.com> [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 :)


  parent reply	other threads:[~2020-08-05  9:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-03 14:02 [PATCH V6 0/3] eBPF support Jose E. Marchesi
2020-08-03 14:02 ` [PATCH V6 1/3] gdb: support for eBPF Jose E. Marchesi
2020-08-03 14:52   ` Eli Zaretskii
2020-08-03 15:04     ` Jose E. Marchesi
2020-08-03 14:55   ` Aktemur, Tankut Baris
2020-08-03 15:52     ` Jose E. Marchesi
2020-08-03 16:00       ` Simon Marchi
2020-08-03 16:46         ` Jose E. Marchesi
2020-08-04 13:41       ` Andrew Burgess
2020-08-04 14:57         ` Jose E. Marchesi
2020-08-04 16:29           ` Simon Marchi
2020-08-05  9:21           ` Andrew Burgess [this message]
2020-08-05 13:00             ` Simon Marchi
2020-08-03 14:02 ` [PATCH V6 2/3] sim: eBPF simulator Jose E. Marchesi
2020-08-04 14:50   ` Andrew Burgess
2020-08-04 15:32     ` Jose E. Marchesi
2020-08-03 14:02 ` [PATCH V6 3/3] sim: generated files for the " Jose E. Marchesi
2020-08-04 13:51   ` Andrew Burgess
2020-08-04 14:59     ` Jose E. Marchesi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200805092112.GA853475@embecosm.com \
    --to=andrew.burgess@embecosm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jose.marchesi@oracle.com \
    --cc=tankut.baris.aktemur@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox