toplev.c (main): A debug option without a level defaults to level 2.

* toplev.c (main): A debug option without a level defaults to
        level 2.

From-SVN: r25884
This commit is contained in:
Jeffrey A Law 1999-03-21 16:38:34 +00:00 committed by Jeff Law
parent 088e716060
commit 43c2d67a1a
2 changed files with 19 additions and 2 deletions

View File

@ -1,3 +1,8 @@
Sun Mar 21 17:33:48 1999 Jeffrey A Law (law@cygnus.com)
* toplev.c (main): A debug option without a level defaults to
level 2.
Sun Mar 21 12:13:01 1999 Nick Clifton <nickc@cygnus.com>
* flow.c (can_delete_label_p): Do not allow user specified

View File

@ -5128,8 +5128,20 @@ main (argc, argv)
if (*p && (*p < '0' || *p > '9'))
continue;
level = read_integral_parameter (p, 0,
max_debug_level + 1);
/* A debug flag without a level defaults to level 2.
Note we do not want to call read_integral_parameter
for that case since it will call atoi which
will return zero.
??? We may want to generalize the interface to
read_integral_parameter to better handle this case
if this case shows up often. */
if (*p)
level = read_integral_parameter (p, 0,
max_debug_level + 1);
else
level = 2;
if (da_len > 1 && !strncmp (str, "gdwarf", da_len))
{
error ("use -gdwarf -g%d for DWARF v1, level %d",