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]

-g does not work anymore


I believe the following change broke the -g option (default debugging):

Fri Mar 19 01:54:30 1999  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>

	* toplev.c (read_integral_parameter): Constify.  Better control of
	error messages.
	(main): Use read_integral_parameter to set optimize, id_clash_len,
	larger_than_size, and the debugging level.
	* toplev.h (read_integral_parameter): Update prototype.

Below is a patch.

Regards,
Martin

Sun Mar 21 19:45:58 1999  Martin von L÷wis  <loewis@informatik.hu-berlin.de>

	* toplev.c (read_integral_parameter): Return default if there was
	no number.
	(main): Set default debugging level to 2.

Index: toplev.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/toplev.c,v
retrieving revision 1.164
diff -c -p -r1.164 toplev.c
*** toplev.c	1999/03/20 19:21:31	1.164
--- toplev.c	1999/03/21 18:44:14
*************** read_integral_parameter (p, pname, defva
*** 1272,1277 ****
--- 1272,1280 ----
        return defval;
      }
  
+   if (endp == p)
+     return defval;
+ 
    return atoi (p);
  }
  
*************** main (argc, argv)
*** 5128,5135 ****
  		      if (*p && (*p < '0' || *p > '9'))
  			continue;
  		      
! 		      level = read_integral_parameter (p, 0,
! 						       max_debug_level + 1);
  		      if (da_len > 1 && !strncmp (str, "gdwarf", da_len))
  			{
  			  error ("use -gdwarf -g%d for DWARF v1, level %d",
--- 5131,5137 ----
  		      if (*p && (*p < '0' || *p > '9'))
  			continue;
  		      
! 		      level = read_integral_parameter (p, 0, 2);
  		      if (da_len > 1 && !strncmp (str, "gdwarf", da_len))
  			{
  			  error ("use -gdwarf -g%d for DWARF v1, level %d",


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