[PATCH] gdbserver: convert program_args to a single string
Tom Tromey
tom@tromey.com
Tue Jan 14 23:07:57 GMT 2025
>>>>> "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
More information about the Gdb-patches
mailing list