You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

224 lines
10KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1991-2020 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3
  6. or any later version published by the Free Software Foundation;
  7. with no Invariant Sections, with no Front-Cover Texts, and with no
  8. Back-Cover Texts. A copy of the license is included in the
  9. section entitled "GNU Free Documentation License".
  10. -->
  11. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  12. <head>
  13. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  14. <title>Bug Reporting (GNU Binary Utilities)</title>
  15. <meta name="description" content="Bug Reporting (GNU Binary Utilities)">
  16. <meta name="keywords" content="Bug Reporting (GNU Binary Utilities)">
  17. <meta name="resource-type" content="document">
  18. <meta name="distribution" content="global">
  19. <meta name="Generator" content="makeinfo">
  20. <link href="index.html#Top" rel="start" title="Top">
  21. <link href="Binutils-Index.html#Binutils-Index" rel="index" title="Binutils Index">
  22. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  23. <link href="Reporting-Bugs.html#Reporting-Bugs" rel="up" title="Reporting Bugs">
  24. <link href="GNU-Free-Documentation-License.html#GNU-Free-Documentation-License" rel="next" title="GNU Free Documentation License">
  25. <link href="Bug-Criteria.html#Bug-Criteria" rel="prev" title="Bug Criteria">
  26. <style type="text/css">
  27. <!--
  28. a.summary-letter {text-decoration: none}
  29. blockquote.indentedblock {margin-right: 0em}
  30. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  31. blockquote.smallquotation {font-size: smaller}
  32. div.display {margin-left: 3.2em}
  33. div.example {margin-left: 3.2em}
  34. div.lisp {margin-left: 3.2em}
  35. div.smalldisplay {margin-left: 3.2em}
  36. div.smallexample {margin-left: 3.2em}
  37. div.smalllisp {margin-left: 3.2em}
  38. kbd {font-style: oblique}
  39. pre.display {font-family: inherit}
  40. pre.format {font-family: inherit}
  41. pre.menu-comment {font-family: serif}
  42. pre.menu-preformatted {font-family: serif}
  43. pre.smalldisplay {font-family: inherit; font-size: smaller}
  44. pre.smallexample {font-size: smaller}
  45. pre.smallformat {font-family: inherit; font-size: smaller}
  46. pre.smalllisp {font-size: smaller}
  47. span.nolinebreak {white-space: nowrap}
  48. span.roman {font-family: initial; font-weight: normal}
  49. span.sansserif {font-family: sans-serif; font-weight: normal}
  50. ul.no-bullet {list-style: none}
  51. -->
  52. </style>
  53. </head>
  54. <body lang="en">
  55. <a name="Bug-Reporting"></a>
  56. <div class="header">
  57. <p>
  58. Previous: <a href="Bug-Criteria.html#Bug-Criteria" accesskey="p" rel="prev">Bug Criteria</a>, Up: <a href="Reporting-Bugs.html#Reporting-Bugs" accesskey="u" rel="up">Reporting Bugs</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Binutils-Index.html#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  59. </div>
  60. <hr>
  61. <a name="How-to-Report-Bugs"></a>
  62. <h3 class="section">19.2 How to Report Bugs</h3>
  63. <a name="index-bug-reports"></a>
  64. <a name="index-bugs_002c-reporting"></a>
  65. <p>A number of companies and individuals offer support for <small>GNU</small>
  66. products. If you obtained the binary utilities from a support
  67. organization, we recommend you contact that organization first.
  68. </p>
  69. <p>You can find contact information for many support companies and
  70. individuals in the file <samp>etc/SERVICE</samp> in the <small>GNU</small> Emacs
  71. distribution.
  72. </p>
  73. <p>In any event, we also recommend that you send bug reports for the binary
  74. utilities to <a href="http://www.sourceware.org/bugzilla/">http://www.sourceware.org/bugzilla/</a>.
  75. </p>
  76. <p>The fundamental principle of reporting bugs usefully is this:
  77. <strong>report all the facts</strong>. If you are not sure whether to state a
  78. fact or leave it out, state it!
  79. </p>
  80. <p>Often people omit facts because they think they know what causes the
  81. problem and assume that some details do not matter. Thus, you might
  82. assume that the name of a file you use in an example does not matter.
  83. Well, probably it does not, but one cannot be sure. Perhaps the bug is
  84. a stray memory reference which happens to fetch from the location where
  85. that pathname is stored in memory; perhaps, if the pathname were
  86. different, the contents of that location would fool the utility into
  87. doing the right thing despite the bug. Play it safe and give a
  88. specific, complete example. That is the easiest thing for you to do,
  89. and the most helpful.
  90. </p>
  91. <p>Keep in mind that the purpose of a bug report is to enable us to fix the bug if
  92. it is new to us. Therefore, always write your bug reports on the assumption
  93. that the bug has not been reported previously.
  94. </p>
  95. <p>Sometimes people give a few sketchy facts and ask, &ldquo;Does this ring a
  96. bell?&rdquo; This cannot help us fix a bug, so it is basically useless. We
  97. respond by asking for enough details to enable us to investigate.
  98. You might as well expedite matters by sending them to begin with.
  99. </p>
  100. <p>To enable us to fix the bug, you should include all these things:
  101. </p>
  102. <ul>
  103. <li> The version of the utility. Each utility announces it if you start it
  104. with the <samp>--version</samp> argument.
  105. <p>Without this, we will not know whether there is any point in looking for
  106. the bug in the current version of the binary utilities.
  107. </p>
  108. </li><li> Any patches you may have applied to the source, including any patches
  109. made to the <code>BFD</code> library.
  110. </li><li> The type of machine you are using, and the operating system name and
  111. version number.
  112. </li><li> What compiler (and its version) was used to compile the utilities&mdash;e.g.
  113. &ldquo;<code>gcc-2.7</code>&rdquo;.
  114. </li><li> The command arguments you gave the utility to observe the bug. To
  115. guarantee you will not omit something important, list them all. A copy
  116. of the Makefile (or the output from make) is sufficient.
  117. <p>If we were to try to guess the arguments, we would probably guess wrong
  118. and then we might not encounter the bug.
  119. </p>
  120. </li><li> A complete input file, or set of input files, that will reproduce the
  121. bug. If the utility is reading an object file or files, then it is
  122. generally most helpful to send the actual object files.
  123. <p>If the source files were produced exclusively using <small>GNU</small> programs
  124. (e.g., <code>gcc</code>, <code>gas</code>, and/or the <small>GNU</small> <code>ld</code>), then it
  125. may be OK to send the source files rather than the object files. In
  126. this case, be sure to say exactly what version of <code>gcc</code>, or
  127. whatever, was used to produce the object files. Also say how
  128. <code>gcc</code>, or whatever, was configured.
  129. </p>
  130. </li><li> A description of what behavior you observe that you believe is
  131. incorrect. For example, &ldquo;It gets a fatal signal.&rdquo;
  132. <p>Of course, if the bug is that the utility gets a fatal signal, then we
  133. will certainly notice it. But if the bug is incorrect output, we might
  134. not notice unless it is glaringly wrong. You might as well not give us
  135. a chance to make a mistake.
  136. </p>
  137. <p>Even if the problem you experience is a fatal signal, you should still
  138. say so explicitly. Suppose something strange is going on, such as your
  139. copy of the utility is out of sync, or you have encountered a bug in
  140. the C library on your system. (This has happened!) Your copy might
  141. crash and ours would not. If you told us to expect a crash, then when
  142. ours fails to crash, we would know that the bug was not happening for
  143. us. If you had not told us to expect a crash, then we would not be able
  144. to draw any conclusion from our observations.
  145. </p>
  146. </li><li> If you wish to suggest changes to the source, send us context diffs, as
  147. generated by <code>diff</code> with the <samp>-u</samp>, <samp>-c</samp>, or <samp>-p</samp>
  148. option. Always send diffs from the old file to the new file. If you
  149. wish to discuss something in the <code>ld</code> source, refer to it by
  150. context, not by line number.
  151. <p>The line numbers in our development sources will not match those in your
  152. sources. Your line numbers would convey no useful information to us.
  153. </p></li></ul>
  154. <p>Here are some things that are not necessary:
  155. </p>
  156. <ul>
  157. <li> A description of the envelope of the bug.
  158. <p>Often people who encounter a bug spend a lot of time investigating
  159. which changes to the input file will make the bug go away and which
  160. changes will not affect it.
  161. </p>
  162. <p>This is often time consuming and not very useful, because the way we
  163. will find the bug is by running a single example under the debugger
  164. with breakpoints, not by pure deduction from a series of examples.
  165. We recommend that you save your time for something else.
  166. </p>
  167. <p>Of course, if you can find a simpler example to report <em>instead</em>
  168. of the original one, that is a convenience for us. Errors in the
  169. output will be easier to spot, running under the debugger will take
  170. less time, and so on.
  171. </p>
  172. <p>However, simplification is not vital; if you do not want to do this,
  173. report the bug anyway and send us the entire test case you used.
  174. </p>
  175. </li><li> A patch for the bug.
  176. <p>A patch for the bug does help us if it is a good one. But do not omit
  177. the necessary information, such as the test case, on the assumption that
  178. a patch is all we need. We might see problems with your patch and decide
  179. to fix the problem another way, or we might not understand it at all.
  180. </p>
  181. <p>Sometimes with programs as complicated as the binary utilities it is
  182. very hard to construct an example that will make the program follow a
  183. certain path through the code. If you do not send us the example, we
  184. will not be able to construct one, so we will not be able to verify that
  185. the bug is fixed.
  186. </p>
  187. <p>And if we cannot understand what bug you are trying to fix, or why your
  188. patch should be an improvement, we will not install it. A test case will
  189. help us to understand.
  190. </p>
  191. </li><li> A guess about what the bug is or what it depends on.
  192. <p>Such guesses are usually wrong. Even we cannot guess right about such
  193. things without first using the debugger to find the facts.
  194. </p></li></ul>
  195. <hr>
  196. <div class="header">
  197. <p>
  198. Previous: <a href="Bug-Criteria.html#Bug-Criteria" accesskey="p" rel="prev">Bug Criteria</a>, Up: <a href="Reporting-Bugs.html#Reporting-Bugs" accesskey="u" rel="up">Reporting Bugs</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Binutils-Index.html#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  199. </div>
  200. </body>
  201. </html>