This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Code cleanup: Make function typedef for find memory region
On Mon, 30 Aug 2010 16:58:15 +0200, Joel Brobecker wrote:
> > I am also for requiring comment to be placed at the function definition and
> > not at its declaration. Using tag jumps one will never find the declaration
> > and I have considered these functions to have no comment (randomly found now
> > simple_displaced_step_copy_insn, it was a different function I had the problem
> > with).
>
> That has been my approach as well, so I'm not the one that needs
> convincing. However, proponents of comments with the definition
^^^^^^^^^^->declaration
[ The mail would not make sense otherwise. ]
> also have a good point. When you have a nice public API declared
> in a .h file, it's convenient to have the documentation there.
> I still think that it's better to be consistent in the location
> of the documentation, particularly if the names we choose in the API
> are clear enough that it gives us a general idea of what each entity
> is about. We can then read the comment of the functions of interest.
Yes, I understand the reasons of the "wrong" placement but IMHO it is not
worth the pain, one can very easily jump forth and back while reading it.
Thanks,
Jan