164234Sobrien
264234Sobrien			Contributing to GDB
364234Sobrien
464234SobrienGDB is a collaborative project and one which wants to encourage new
564234Sobriendevelopment.  You may wish to fix GDB bugs, improve testing, port GDB
664234Sobriento a new platform, update documentation, add new GDB features, and the
764234Sobrienlike. To help with this, there is a lot of documentation
864234Sobrienavailable.. In addition to the user guide and internals manual
964234Sobrienincluded in the GDB distribution, the GDB web pages also contain much
1064234Sobrieninformation.
1164234Sobrien
1264234SobrienYou may also want to submit your change so that can be considered for
1364234Sobrienconclusion in a future version of GDB (see below).  Regardless, we
1464234Sobrienencourage you to distribute the change yourself.
1564234Sobrien
1664234SobrienIf you don't feel up to hacking GDB, there are still plenty of ways to
1764234Sobrienhelp!  You can answer questions on the mailing lists, write
1864234Sobriendocumentation, find bugs, create a GDB related website (contribute to
1964234Sobrienthe official GDB web site), or create a GDB related software
2064234Sobrienpackage. We welcome all of the above and feel free to ask on the GDB
2164234Sobrienmailing lists if you are looking for feedback or for people to review
2264234Sobriena work in progress.
2364234Sobrien
2498944SobrienRef: http://www.gnu.org/software/gdb/
2564234Sobrien
2664234SobrienFinally, there are certain legal requirements and style issues which
2764234Sobrienall contributors need to be aware of.
2864234Sobrien
2964234Sobrieno	Coding Standards
3064234Sobrien
3164234Sobrien	All contributions must conform to the GNU Coding Standard.
3264234Sobrien	Submissions which do not conform to the standards will be
3364234Sobrien	returned with a request to reformat the changes.
3464234Sobrien
3598944Sobrien	GDB has certain additional coding requirements.  Those
3698944Sobrien	requirements are explained in the GDB internals documentation
3798944Sobrien	in the gdb/doc directory.
3864234Sobrien
3998944Sobrien	Ref: http://www.gnu.org/prep/standards_toc.html
4064234Sobrien
4164234Sobrien
4264234Sobrieno	Copyright Assignment
4364234Sobrien
4464234Sobrien	Before we can accept code contributions from you, we need a
4598944Sobrien	copyright assignment form filled out and filed with the FSF.
4664234Sobrien
4798944Sobrien	See some documentation by the FSF for details and contact us
4898944Sobrien	(either via the GDB mailing list or the GDB maintainer that is
4998944Sobrien	taking care of your contributions) to obtain the relevant
5098944Sobrien	forms.
5164234Sobrien
5298944Sobrien	Small changes can be accepted without a copyright assignment form on file.
5364234Sobrien
5498944Sobrien	Ref: http://www.gnu.org/prep/maintain.html#SEC6
5564234Sobrien
5664234Sobrien
5764234Sobrieno	Submitting Patches
5864234Sobrien
5964234Sobrien	Every patch must have several pieces of information before we
6064234Sobrien	can properly evaluate it.
6164234Sobrien
6264234Sobrien	A description of the bug and how your patch fixes this
6364234Sobrien	bug. A reference to a testsuite failure is very helpful. For
6464234Sobrien	new features a description of the feature and your
6564234Sobrien	implementation.
6664234Sobrien
6764234Sobrien	A ChangeLog entry as plaintext (separate from the patch); see
6864234Sobrien	the various ChangeLog files for format and content. Note that,
6964234Sobrien	unlike some other projects, we do require ChangeLogs also for
7064234Sobrien	documentation (i.e., .texi files).
7164234Sobrien
7298944Sobrien	The patch itself. If you are accessing the CVS repository use
7398944Sobrien	"cvs update; cvs diff -cp"; else, use "diff -cp OLD NEW" or
7498944Sobrien	"diff -up OLD NEW". If your version of diff does not support
7598944Sobrien	these options, then get the latest version of GNU diff.
7664234Sobrien
7764234Sobrien	We accept patches as plain text (preferred for the compilers
7864234Sobrien	themselves), MIME attachments (preferred for the web pages),
7964234Sobrien	or as uuencoded gzipped text.
8064234Sobrien
8164234Sobrien	When you have all these pieces, bundle them up in a mail
8298944Sobrien	message and send it to gdb-patches@sources.redhat.com. All
8364234Sobrien	patches and related discussion should be sent to the
8464234Sobrien	gdb-patches mailinglist. For further information on the GDB
8564234Sobrien	CVS repository, see the Anonymous read-only CVS access and
8664234Sobrien	Read-write CVS access page.
8764234Sobrien
8864234Sobrien--
8964234Sobrien
9064234SobrienSupplemental information for GDB:
9164234Sobrien
9264234Sobrieno	Please try to run the relevant testsuite before and after
9364234Sobrien	committing a patch
9464234Sobrien
9564234Sobrien	If the contributor doesn't do it then the maintainer will.  A
9664234Sobrien	contributor might include before/after test results in their
9764234Sobrien	contribution.
9864234Sobrien
9964234Sobrien
10064234Sobrieno	For bug fixes, please try to include a way of
10164234Sobrien	demonstrating that the patch actually fixes something.
10264234Sobrien
10364234Sobrien	The best way of doing this is to ensure that the
10464234Sobrien	testsuite contains one or more test cases that
10564234Sobrien	fail without the fix but pass with the fix.
10664234Sobrien
10764234Sobrien	People are encouraged to submit patches that extend
10864234Sobrien	the testsuite.
10964234Sobrien
11064234Sobrien
11164234Sobrieno	Please read your patch before submitting it.
11264234Sobrien
11364234Sobrien	A patch containing several unrelated changes or
11464234Sobrien	arbitrary reformats will be returned with a request
11564234Sobrien	to re-formatting / split it.
11664234Sobrien
11764234Sobrien
11864234Sobrieno	If ``gdb/configure.in'' is modified then you don't
11964234Sobrien	need to include patches to the regenerated file
12064234Sobrien	``configure''.
12164234Sobrien
12264234Sobrien	The maintainer will re-generate those files
12364234Sobrien	using autoconf (2.13 as of 2000-02-29).
12498944Sobrien
12598944Sobrien
12698944Sobrieno	If ``gdb/gdbarch.sh'' is modified, you don't
12798944Sobrien	need to include patches to the generated files
12898944Sobrien	``gdbarch.h'' and ``gdbarch.c''.
12998944Sobrien
13098944Sobrien	See ``gdb/configure.in'' above.
13198944Sobrien
13298944Sobrien
13398944Sobrieno	When submitting a patch that fixes a bug
13498944Sobrien	in GDB's bug database a brief reference
13598944Sobrien	to the bug can be included in the ChangeLog
13698944Sobrien	vis
13798944Sobrien
13898944Sobrien	* CONTRIBUTE: Mention PR convention.
13998944Sobrien	Fix PR gdb/4705.
14098944Sobrien
14198944Sobrien	The text ``PR gdb/4705'' should also be included
14298944Sobrien	in the CVS commit message.  That causes the
14398944Sobrien	patch to automatically be archived with the PR.
144