This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 02/11] Generalize varobj iterator
- From: Doug Evans <xdje42 at gmail dot com>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: Yao Qi <yao at codesourcery dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 21 Jan 2014 17:06:59 -0800
- Subject: Re: [PATCH 02/11] Generalize varobj iterator
- Authentication-results: sourceware.org; auth=none
- References: <1385258996-26047-1-git-send-email-yao at codesourcery dot com> <1385258996-26047-3-git-send-email-yao at codesourcery dot com> <52DEDC0E dot 50201 at redhat dot com>
On Tue, Jan 21, 2014 at 12:43 PM, Keith Seitz <keiths@redhat.com> wrote:
> [...]
>> diff --git a/gdb/varobj.h b/gdb/varobj.h
>> index 978d9b9..0f68311 100644
>> --- a/gdb/varobj.h
>> +++ b/gdb/varobj.h
>> @@ -308,6 +308,8 @@ extern int varobj_has_more (struct varobj *var, int
>> to);
>>
>> extern int varobj_pretty_printed_p (struct varobj *var);
>>
>> +extern struct cleanup *varobj_ensure_python_env (struct varobj *var);
>> +
>
>
> IIRC, we are now adding documentation near declarations, too. Many are often
> as simple as "See description in varobj.c."
I could be wrong of course, but the rules are either:
1) Document at point of definition, and nothing at point of declaration.
2) Document at point of declaration, and add a comment at point of
definition saying something along the lines of "See foo.h".
ref: grep -F '/* See' *.c
As for which to pick, I can argue either point, and don't impose a
particular choice, as long as the choice isn't imposed on me either.
doxygen can make this moot so I'm not worrying about it too much at the moment.