This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Patches to the FAQ and the fatal error messages for guiding bug-reports better



Here's my attempt to remedy part of the (lack of) full bug-report situation.
I tried to "augment" the places mentioning egcs-bugs, providing an URL as a
FAQ entry with minimal but enough information for the clueless.

 If this should be on a www-page separate from the FAQ, I guess we should still
have a FAQ entry to start from.
 If someone could actually provide an info2www-gateway for the latest
egcs-info-files to point to, things could be really smooth, as not many people
reporting bugs seem to know where or what the info-pages are or how to access
them (or we wouldn't have this problem, right?).

This set of patches might be incomplete as well as duplicating information in
a lot of places, but I hope such details can be fixed with a cost
approximately the same as a few "you forgot to include vital information,
stupid"-replies to peoples attempts at bug-reports.
 But then again, it is more fun to flip people off, right? ;-)

Hopefully someone will beat me to the clock with a better solution, else I
guess you might call it a starting-point.

The BUGS file is really cute; it looks like someone has attempted to help the
situation for people without info-tools.

BTW: Can someone construct a better cvsweb-pointer to view the latest "BUGS"?


gcc/ChangeLog:

Tue Aug 25 03:03:36 1998  Hans-Peter Nilsson  <hp@axis.se>

	* gcc.c (main): Added more guidance when asking for a bug-report.
	* expr.c (expand_builtin): Ditto.


gcc/f/ChangeLog:

Tue Aug 25 03:07:46 1998  Hans-Peter Nilsson  <hp@axis.se>

	* g77spec.c (lang_specific_driver): Added more guidance when asking
	for a bug-report.


gcc/cp/ChangeLog:

Tue Aug 25 03:10:52 1998  Hans-Peter Nilsson  <hp@axis.se>

	* typeck2.c (my_friendly_abort): Added more guidance when asking for
	a bug-report.


Index: egcs/gcc/expr.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/expr.c,v
retrieving revision 1.93
diff -p -c -r1.93 expr.c
*** expr.c	1998/08/21 19:32:19	1.93
--- expr.c	1998/08/25 01:10:55
*************** expand_builtin (exp, target, subtarget, 
*** 8849,8854 ****
--- 8849,8857 ----
  		{
  		  warning ("Delayed evaluation of __builtin_constant_p not supported on this target.");
  		  warning ("Please report this as a bug to egcs-bugs@cygnus.com.");
+ 		  warning ("See the GCC info manual (section Bugs) first,");
+ 		  warning ("the file BUGS (included with the sources),");
+ 		  warning ("or <URL:http://egcs.cygnus.com/faq.html#bugreport>.");
  		  return const0_rtx;
  		}
  	      return gen_rtx_CONSTANT_P_RTX (TYPE_MODE (integer_type_node),
Index: egcs/gcc/gcc.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/gcc.c,v
retrieving revision 1.52
diff -p -c -r1.52 gcc.c
*** gcc.c	1998/07/28 21:33:43	1.52
--- gcc.c	1998/08/25 01:11:20
*************** main (argc, argv)
*** 4947,4953 ****
        if (! verbose_flag)
  	{
  	  printf ("\nReport bugs to egcs-bugs@cygnus.com.\n");
! 	  printf ("Please see the file BUGS (included with the sources) first.\n");
  	  
  	  exit (0);
  	}
--- 4947,4955 ----
        if (! verbose_flag)
  	{
  	  printf ("\nReport bugs to egcs-bugs@cygnus.com.\n");
! 	  printf ("Please see the GCC info manual (section Bugs) first,\n");
! 	  printf ("the file BUGS (included with the sources),\n");
! 	  printf ("or <URL:http://egcs.cygnus.com/faq.html#bugreport>.\n");
  	  
  	  exit (0);
  	}
*************** main (argc, argv)
*** 5137,5143 ****
    if (print_help_list)
      {
        printf ("\nReport bugs to egcs-bugs@cygnus.com.\n");
!       printf ("Please see the file BUGS (included with the sources) first.\n");
      }
    
    exit (error_count > 0 ? (signal_count ? 2 : 1) : 0);
--- 5139,5147 ----
    if (print_help_list)
      {
        printf ("\nReport bugs to egcs-bugs@cygnus.com.\n");
!       printf ("Please see the GCC info manual (section Bugs) first,\n");
!       printf ("the file BUGS (included with the sources),\n");
!       printf ("or <URL:http://egcs.cygnus.com/faq.html#bugreport>.\n");
      }
    
    exit (error_count > 0 ? (signal_count ? 2 : 1) : 0);
Index: egcs/gcc/cp/typeck2.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/typeck2.c,v
retrieving revision 1.28
diff -p -c -r1.28 typeck2.c
*** typeck2.c	1998/07/28 14:00:46	1.28
--- typeck2.c	1998/08/25 01:12:37
*************** my_friendly_abort (i)
*** 384,389 ****
--- 384,392 ----
  	  else
  	    ack ("Internal compiler error %d.", i);
  	  ack ("Please submit a full bug report to `egcs-bugs@cygnus.com'.");
+ 	  ack ("See the GCC info manual (section BUGS) first,");
+ 	  ack ("the file BUGS (included with the sources),");
+ 	  ack ("or <URL:http://egcs.cygnus.com/faq.html#bugreport>.");
  	}
        else
  	error ("confused by earlier errors, bailing out");
*************** my_friendly_abort (i)
*** 397,403 ****
    else
      error ("Internal compiler error %d.", i);
  
!   fatal ("Please submit a full bug report to `egcs-bugs@cygnus.com'.");
  }
  
  void
--- 400,409 ----
    else
      error ("Internal compiler error %d.", i);
  
!   error ("Please submit a full bug report to `egcs-bugs@cygnus.com'.");
!   error ("See the GCC info manual (section Bugs) first,");
!   error ("the file BUGS (included with the sources),");
!   fatal ("or <URL:http://egcs.cygnus.com/faq.html#bugreport>.");
  }
  
  void
Index: egcs/gcc/f/g77spec.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/f/g77spec.c,v
retrieving revision 1.12
diff -p -c -r1.12 g77spec.c
*** g77spec.c	1998/07/21 22:34:23	1.12
--- g77spec.c	1998/08/25 01:12:44
*************** code-generation methodology, and so on.\
*** 427,433 ****
  For more information on g77 and gcc, type the commands `info -f g77'\n\
  and `info -f gcc' to read the Info documentation.\n\
  \n\
! Report bugs to <egcs-bugs@cygnus.org>.\n");
  	  exit (0);
  	  break;
  #endif
--- 427,435 ----
  For more information on g77 and gcc, type the commands `info -f g77'\n\
  and `info -f gcc' to read the Info documentation.\n\
  \n\
! Report bugs to <egcs-bugs@cygnus.org>, but first see the\n\
! documentation (section Bugs), the file BUGS (included with the source)\n\
! or <URL:http://egcs.cygnus.com/faq.html#bugreport>.\n");
  	  exit (0);
  	  break;
  #endif
Index: wwwdocs/htdocs/faq.html
===================================================================
RCS file: /egcs/carton/cvsfiles/wwwdocs/htdocs/faq.html,v
retrieving revision 1.45
diff -p -c -r1.45 faq.html
*** faq.html	1998/08/24 14:56:23	1.45
--- faq.html	1998/08/25 01:13:20
***************
*** 21,26 ****
--- 21,27 ----
    <li><a href="#dejagnu">Unable to run the testsuite</a>
    <li><a href="#cross">How to build a cross compiler</a>
    <li><a href="#multiple">How to install both gcc2 and egcs</a>
+   <li><a href="#bugreport">How to report bugs</a>
    <li><a href="#snapshot">Snapshots, how, when, why</a>
    <li><a href="#linuxkernel">Problems building Linux kernels</a>
    <li><a href="#memexhausted">Virtual memory exhausted</a>
*************** nm utilities will be found.
*** 345,350 ****
--- 346,386 ----
  <p>binutils-2.8 builds those files as gas.new, ld.new and nm.new; egcs gcc
  looks for them using gas-new, ld-new and nm-new, so you may have to arrange
  for any symlinks which point to &lt;file&gt;.new to be changed to &lt;file&gt;-new.
+ 
+ <hr>
+ <h2> <a name="bugreport">How to report bugs</a></h2>
+ <p>There are complete instructions in the egcs info manual, section Bugs.  The
+ manual can be read using `<i>M-x <tt>info</tt></i>' in Emacs, or if the GNU
+ <tt>info</tt> program is installed on your system by
+  `<tt>info --node "(gcc)Bugs"</tt>'.
+ Or see the file <a href="/cgi-bin/cvsweb/gcc/BUGS?rev=1.1">BUGS</a> included
+ with the egcs source code.
+ 
+ <p>In short, if egcs says <tt>Internal compiler error</tt>, mail a bug report
+ to <a href="mailto:egcs-bugs@cygnus.com">egcs-bugs@cygnus.com</a> including:
+ 
+ <ul>
+   <li>The egcs version
+ 
+   <li>The system type
+ 
+   <li>All options you passed to egcs
+ 
+   <li>Preprocessed output of the source file that caused the compiler error
+ </ul>
+ 
+ <p>All this can normally be accomplished by mailing the command line, the
+ output of the command, and the resulting `<tt><i>your-file</i>.i</tt>' for C,
+ or `<tt><i>your-file</i>.ii</tt>' for C++, corresponding to:
+ 
+ <p><tt>egcs -v --save-temps <i>all-your-options</i> <i>your-file</i>.c</tt>
+ 
+ <p>You may want to compress <tt><i>your-file</i>.i</tt> with <tt>gzip</tt>,
+ <tt>bzip2</tt> or <tt>pkzip</tt> and include it in an attachment, since
+ egcs-bugs@cygnus.com has a message limit of 40 K bytes.
+ 
+ <p>If your source code is larger, put it at an accessible location and mail its
+ URL, or instructions for how to access it.
  
  <hr>
  <h2> <a name="snapshot">Snapshots, how, when, why</a></h2>

brgds, H-P

-- 
Hans-Peter Nilsson, Axis Communications AB, S - 223 70 LUND, SWEDEN
Hans-Peter.Nilsson@axis.se | Tel +46 462701867,2701800
Fax +46 46136130 | RFC 1855 compliance implemented; report loss of brain.


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