xref: /openbsd-src/gnu/usr.bin/binutils/gdb/CONTRIBUTE (revision b725ae7711052a2233e31a66fefb8a752c388d7a)
1*b725ae77Skettenis
2*b725ae77Skettenis			Contributing to GDB
3*b725ae77Skettenis
4*b725ae77SkettenisGDB is a collaborative project and one which wants to encourage new
5*b725ae77Skettenisdevelopment.  You may wish to fix GDB bugs, improve testing, port GDB
6*b725ae77Skettenisto a new platform, update documentation, add new GDB features, and the
7*b725ae77Skettenislike. To help with this, there is a lot of documentation
8*b725ae77Skettenisavailable.. In addition to the user guide and internals manual
9*b725ae77Skettenisincluded in the GDB distribution, the GDB web pages also contain much
10*b725ae77Skettenisinformation.
11*b725ae77Skettenis
12*b725ae77SkettenisYou may also want to submit your change so that can be considered for
13*b725ae77Skettenisconclusion in a future version of GDB (see below).  Regardless, we
14*b725ae77Skettenisencourage you to distribute the change yourself.
15*b725ae77Skettenis
16*b725ae77SkettenisIf you don't feel up to hacking GDB, there are still plenty of ways to
17*b725ae77Skettenishelp!  You can answer questions on the mailing lists, write
18*b725ae77Skettenisdocumentation, find bugs, create a GDB related website (contribute to
19*b725ae77Skettenisthe official GDB web site), or create a GDB related software
20*b725ae77Skettenispackage. We welcome all of the above and feel free to ask on the GDB
21*b725ae77Skettenismailing lists if you are looking for feedback or for people to review
22*b725ae77Skettenisa work in progress.
23*b725ae77Skettenis
24*b725ae77SkettenisRef: http://www.gnu.org/software/gdb/
25*b725ae77Skettenis
26*b725ae77SkettenisFinally, there are certain legal requirements and style issues which
27*b725ae77Skettenisall contributors need to be aware of.
28*b725ae77Skettenis
29*b725ae77Sketteniso	Coding Standards
30*b725ae77Skettenis
31*b725ae77Skettenis	All contributions must conform to the GNU Coding Standard.
32*b725ae77Skettenis	Submissions which do not conform to the standards will be
33*b725ae77Skettenis	returned with a request to reformat the changes.
34*b725ae77Skettenis
35*b725ae77Skettenis	GDB has certain additional coding requirements.  Those
36*b725ae77Skettenis	requirements are explained in the GDB internals documentation
37*b725ae77Skettenis	in the gdb/doc directory.
38*b725ae77Skettenis
39*b725ae77Skettenis	Ref: http://www.gnu.org/prep/standards_toc.html
40*b725ae77Skettenis
41*b725ae77Skettenis
42*b725ae77Sketteniso	Copyright Assignment
43*b725ae77Skettenis
44*b725ae77Skettenis	Before we can accept code contributions from you, we need a
45*b725ae77Skettenis	copyright assignment form filled out and filed with the FSF.
46*b725ae77Skettenis
47*b725ae77Skettenis	See some documentation by the FSF for details and contact us
48*b725ae77Skettenis	(either via the GDB mailing list or the GDB maintainer that is
49*b725ae77Skettenis	taking care of your contributions) to obtain the relevant
50*b725ae77Skettenis	forms.
51*b725ae77Skettenis
52*b725ae77Skettenis	Small changes can be accepted without a copyright assignment form on file.
53*b725ae77Skettenis
54*b725ae77Skettenis	Ref: http://www.gnu.org/prep/maintain.html#SEC6
55*b725ae77Skettenis
56*b725ae77Skettenis
57*b725ae77Sketteniso	Submitting Patches
58*b725ae77Skettenis
59*b725ae77Skettenis	Every patch must have several pieces of information before we
60*b725ae77Skettenis	can properly evaluate it.
61*b725ae77Skettenis
62*b725ae77Skettenis	A description of the bug and how your patch fixes this
63*b725ae77Skettenis	bug. A reference to a testsuite failure is very helpful. For
64*b725ae77Skettenis	new features a description of the feature and your
65*b725ae77Skettenis	implementation.
66*b725ae77Skettenis
67*b725ae77Skettenis	A ChangeLog entry as plaintext (separate from the patch); see
68*b725ae77Skettenis	the various ChangeLog files for format and content. Note that,
69*b725ae77Skettenis	unlike some other projects, we do require ChangeLogs also for
70*b725ae77Skettenis	documentation (i.e., .texi files).
71*b725ae77Skettenis
72*b725ae77Skettenis	The patch itself. If you are accessing the CVS repository use
73*b725ae77Skettenis	"cvs update; cvs diff -cp"; else, use "diff -cp OLD NEW" or
74*b725ae77Skettenis	"diff -up OLD NEW". If your version of diff does not support
75*b725ae77Skettenis	these options, then get the latest version of GNU diff.
76*b725ae77Skettenis
77*b725ae77Skettenis	We accept patches as plain text (preferred for the compilers
78*b725ae77Skettenis	themselves), MIME attachments (preferred for the web pages),
79*b725ae77Skettenis	or as uuencoded gzipped text.
80*b725ae77Skettenis
81*b725ae77Skettenis	When you have all these pieces, bundle them up in a mail
82*b725ae77Skettenis	message and send it to gdb-patches@sources.redhat.com. All
83*b725ae77Skettenis	patches and related discussion should be sent to the
84*b725ae77Skettenis	gdb-patches mailinglist. For further information on the GDB
85*b725ae77Skettenis	CVS repository, see the Anonymous read-only CVS access and
86*b725ae77Skettenis	Read-write CVS access page.
87*b725ae77Skettenis
88*b725ae77Skettenis--
89*b725ae77Skettenis
90*b725ae77SkettenisSupplemental information for GDB:
91*b725ae77Skettenis
92*b725ae77Sketteniso	Please try to run the relevant testsuite before and after
93*b725ae77Skettenis	committing a patch
94*b725ae77Skettenis
95*b725ae77Skettenis	If the contributor doesn't do it then the maintainer will.  A
96*b725ae77Skettenis	contributor might include before/after test results in their
97*b725ae77Skettenis	contribution.
98*b725ae77Skettenis
99*b725ae77Skettenis
100*b725ae77Sketteniso	For bug fixes, please try to include a way of
101*b725ae77Skettenis	demonstrating that the patch actually fixes something.
102*b725ae77Skettenis
103*b725ae77Skettenis	The best way of doing this is to ensure that the
104*b725ae77Skettenis	testsuite contains one or more test cases that
105*b725ae77Skettenis	fail without the fix but pass with the fix.
106*b725ae77Skettenis
107*b725ae77Skettenis	People are encouraged to submit patches that extend
108*b725ae77Skettenis	the testsuite.
109*b725ae77Skettenis
110*b725ae77Skettenis
111*b725ae77Sketteniso	Please read your patch before submitting it.
112*b725ae77Skettenis
113*b725ae77Skettenis	A patch containing several unrelated changes or
114*b725ae77Skettenis	arbitrary reformats will be returned with a request
115*b725ae77Skettenis	to re-formatting / split it.
116*b725ae77Skettenis
117*b725ae77Skettenis
118*b725ae77Sketteniso	If ``gdb/configure.in'' is modified then you don't
119*b725ae77Skettenis	need to include patches to the regenerated file
120*b725ae77Skettenis	``configure''.
121*b725ae77Skettenis
122*b725ae77Skettenis	The maintainer will re-generate those files
123*b725ae77Skettenis	using autoconf (2.13 as of 2000-02-29).
124*b725ae77Skettenis
125*b725ae77Skettenis
126*b725ae77Sketteniso	If ``gdb/gdbarch.sh'' is modified, you don't
127*b725ae77Skettenis	need to include patches to the generated files
128*b725ae77Skettenis	``gdbarch.h'' and ``gdbarch.c''.
129*b725ae77Skettenis
130*b725ae77Skettenis	See ``gdb/configure.in'' above.
131*b725ae77Skettenis
132*b725ae77Skettenis
133*b725ae77Sketteniso	When submitting a patch that fixes a bug
134*b725ae77Skettenis	in GDB's bug database a brief reference
135*b725ae77Skettenis	to the bug can be included in the ChangeLog
136*b725ae77Skettenis	vis
137*b725ae77Skettenis
138*b725ae77Skettenis	* CONTRIBUTE: Mention PR convention.
139*b725ae77Skettenis	Fix PR gdb/4705.
140*b725ae77Skettenis
141*b725ae77Skettenis	The text ``PR gdb/4705'' should also be included
142*b725ae77Skettenis	in the CVS commit message.  That causes the
143*b725ae77Skettenis	patch to automatically be archived with the PR.
144