Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

Bug-Reporting.html 10KB

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