Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Simon Marchi <simark@simark.ca>
Cc: Tom Tromey <tom@tromey.com>,
	 Andrew Burgess <aburgess@redhat.com>,
	gdb-patches@sourceware.org,
	 Guinevere Larsen <guinevere@redhat.com>
Subject: Re: [PATCH] gdbserver: convert program_args to a single string
Date: Tue, 14 Jan 2025 16:07:57 -0700	[thread overview]
Message-ID: <87ikqhuh82.fsf@tromey.com> (raw)
In-Reply-To: <ab73dd4f-56c5-449d-b524-334446ea5ad7@simark.ca> (Simon Marchi's message of "Tue, 14 Jan 2025 12:34:49 -0500")

>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:

The approach I normally take is:

Simon> struct base
Simon> {
Simon>   /* 1 */
Simon>   virtual void method ();
Simon> };

... documentation of the contract here.

Simon> -- base.c
Simon> /* 2 */

"See blah.h" here.

Simon> struct impl : public base
Simon> {
Simon>   /* 3 */
Simon>   void method () override;

Nothing here.

Simon> /* 4 */

Simon> void impl::method ()

Not sure what I do here in practice.

Simon>  - #1 is where you should have the documentation about the behavior of
Simon>    `method`
Simon>  - #2 would be the typical /* See base.h.  */, although I find these
Simon>    comments a bit useless

Yeah they are.

Over time I've kind of come around to Doug's view which was that the
comments should be on the implementations.  But oh well, kind of late to
change that.

Simon>  - I never know what to put for #4, you can't put /* See impl.c.  */,
Simon>    since you're already in impl.c.  Again, I feel like a "See whatever"
Simon>    comment is a bit useless: if you know C++, you know you need to go
Simon>    look at the declaration of struct/class `impl`.

Yeah.  We could just leave off the comment here I suppose.

Tom

  reply	other threads:[~2025-01-14 23:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-14 13:39 Andrew Burgess
2025-01-14 15:32 ` Simon Marchi
2025-01-14 17:23   ` Tom Tromey
2025-01-14 17:34     ` Simon Marchi
2025-01-14 23:07       ` Tom Tromey [this message]
2025-01-15 10:21       ` Andrew Burgess
2025-01-15 10:09   ` Andrew Burgess

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=87ikqhuh82.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=guinevere@redhat.com \
    --cc=simark@simark.ca \
    /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