dpatel 02/11/07 12:34:33 Modified: live/gcc3/gcc Tag: pre-import-2002-10-21 c-objc-common.c flags.h toplev.c live/gcc3/gcc/cp Tag: pre-import-2002-10-21 lex.c Log: Use -gused by default for C and Objective-C. Use -gfull (FSF -g) by default for C++ and Objective-C. Here by default means: when user just supply -g. Revision Changes Path No revision No revision 1.17.2.1 +7 -0 src/live/gcc3/gcc/c-objc-common.c Index: c-objc-common.c =================================================================== RCS file: /cvs/Darwin/src/live/gcc3/gcc/c-objc-common.c,v retrieving revision 1.17 retrieving revision 1.17.2.1 diff -u -r1.17 -r1.17.2.1 --- c-objc-common.c 2002/08/17 06:29:03 1.17 +++ c-objc-common.c 2002/11/07 20:34:31 1.17.2.1 @@ -260,6 +260,13 @@ /* APPLE LOCAL PFE */ VARRAY_TREE_INIT (deferred_fns, 32, PFE_VARRAY "deferred_fns"); +/* APPLE LOCAL gdb only used symbols */ +#ifdef DBX_ONLY_USED_SYMBOLS + /* By default we want to use -gused for C and Objective-C. */ + if (flag_debug_only_used_symbols == -1) + flag_debug_only_used_symbols = 1; +#endif + return filename; } 1.37.2.1 +5 -0 src/live/gcc3/gcc/flags.h Index: flags.h =================================================================== RCS file: /cvs/Darwin/src/live/gcc3/gcc/flags.h,v retrieving revision 1.37 retrieving revision 1.37.2.1 diff -u -r1.37 -r1.37.2.1 --- flags.h 2002/09/23 22:52:36 1.37 +++ flags.h 2002/11/07 20:34:31 1.37.2.1 @@ -738,4 +738,9 @@ #define HONOR_SIGN_DEPENDENT_ROUNDING(MODE) \ (MODE_HAS_SIGN_DEPENDENT_ROUNDING (MODE) && !flag_unsafe_math_optimizations) +/* APPLE LOCAL gdb only used symbols */ +#ifdef DBX_ONLY_USED_SYMBOLS +/* Nonzero if generating debugger info for used symbols only. */ +extern int flag_debug_only_used_symbols; +#endif #endif /* ! GCC_FLAGS_H */ 1.161.2.1 +3 -9 src/live/gcc3/gcc/toplev.c Index: toplev.c =================================================================== RCS file: /cvs/Darwin/src/live/gcc3/gcc/toplev.c,v retrieving revision 1.161 retrieving revision 1.161.2.1 diff -u -r1.161 -r1.161.2.1 --- toplev.c 2002/10/18 20:58:16 1.161 +++ toplev.c 2002/11/07 20:34:31 1.161.2.1 @@ -338,7 +338,7 @@ /* Type(s) of debugging information we are producing (if any). See flags.h for the definitions of the different possible types of debugging information. */ -enum debug_info_type write_symbols = NO_DEBUG; +extern enum debug_info_type write_symbols = NO_DEBUG; /* Level of debugging information we are producing. See flags.h for the definitions of the different possible levels. */ @@ -353,7 +353,7 @@ /* APPLE LOCAL gdb only used symbols */ #ifdef DBX_ONLY_USED_SYMBOLS /* Nonzero if generating debugger info for used symbols only. */ -int flag_debug_only_used_symbols = 0; +int flag_debug_only_used_symbols = -1; #endif /* Nonzero means do optimizations. -O. @@ -4376,7 +4376,7 @@ #ifdef DBX_ONLY_USED_SYMBOLS if (strncmp (arg, "full", 4) == 0 || strncmp (arg, "-full", 5) == 0) { - /* -fgull and -g are now identical. */ + flag_debug_only_used_symbols = 0; char *p = (char *)arg + (*(char *)arg == '-') + 4; if (*p == '-') ++p; @@ -5971,12 +5971,6 @@ sleep (1); #endif /* APPLE LOCAL end testsuite OS flush bug workaround */ - - /* APPLE LOCAL work around Radar 2844245. */ - fflush(stdout); fflush(stderr); -#if 0 /* this helps test results sometimes */ - sleep (2); -#endif if (errorcount || sorrycount) return (FATAL_EXIT_CODE); No revision No revision 1.54.2.1 +7 -0 src/live/gcc3/gcc/cp/lex.c Index: lex.c =================================================================== RCS file: /cvs/Darwin/src/live/gcc3/gcc/cp/lex.c,v retrieving revision 1.54 retrieving revision 1.54.2.1 diff -u -r1.54 -r1.54.2.1 --- lex.c 2002/08/26 05:41:00 1.54 +++ lex.c 2002/11/07 20:34:32 1.54.2.1 @@ -754,6 +754,13 @@ init_repo (filename); + /* APPLE LOCAL gdb only used symbols */ +#ifdef DBX_ONLY_USED_SYMBOLS + /* By default we want to use -gfull for C++ and Objective-C++. */ + if (flag_debug_only_used_symbols == -1) + flag_debug_only_used_symbols = 0; +#endif + return filename; }