This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb sources


It looks like you don't have a copyright assignment or employer
disclaimer on file.  Is that correct?  If so, we should sort it out
now before you contribute anything larger.

On Fri, Sep 19, 2008 at 04:12:14PM +0200, André Pönitz wrote:
> Ok. Something tiny attached for starters. It is as harmless as it can be.
> I hope this is uncontroversial, but before going further into this
> direction I have two related questions:
> 
> 1. How would the prefered way to call, say,  xfree on a 'conceptionally const
> char *' item look like? Are casts to non-const (void *) acceptable
> here?

Probably acceptable, but if you know it is allocated by xfree, should
it really be returned as const?

> 2. Recording every such change in the ChangeLog basically duplicates
> the work. Are there any shortcuts available/acceptable?

If you have to update the call sites, you can say "all callers
updated" or something like that in the changelog entry, though if any
of the changes are more than mechanical then it's better to list
the complicated ones explicitly.  But for just a change to a prototype
and a definition, I think the changelog entry is still appropriate.

BTW, your changelog is too verbose in another way; there is normally
only one starred entry for a file and you can combine similar changes.
Like this:

	* symfile.c (allocate_symtab, allocate_psymtab, free_named_symtabs)
	(deduce_language_from_filename): Accept a const argument.

Please use diff -up for patches; with the default diff arguments, it's
impossible to see what you've changed.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]