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]
Other format: [Raw text]

[PATCH] -gused


This patch introduces different way of emitting debugging info stabs.
It emits stabs for only symbols which are actually used. Symbols are
collected in a queue and at the right time queue is flushed. It is enabled
by -gused command line option. This is default debugging option
in Darwin GCC for some time. This approach helps to reduce size of
object files. This approach is more useful with PCH.


Dejagnu test on powerpc-apple-darwin did not report any regression.

OK to commit ?
Thank you,
-Devang

2003-06-11 Devang Patel <dpatel@apple.com>

* dbxout.c (dbxout_nesting): New static variable.
(dbxout_flush_symbol_queue): New static function.
(dbxout_queue_symbol): Same.
(symbol_queue): New static variable.
(symbol_queue_index): Same.
(symbol_queue_size): Same.
(DBXOUT_DECR_NESTING): New macro.
(DBXOUT_DECR_NESTING_AND_RETURN): New macro.
(dbxout_init): Delay symbol output.
(dbxout_global_decl): Save, set and reset TREE_USED bit around dbxout_symbol() call.
(dbxout_begin_function): Same.
(dbxout_finish): Free symbol queue.
(dbxout_type): Put appropriate symbols in queue.
(dbxout_symbol): Put info for symbol's type in queue. Decrement/Increment nesting counts
flush symbol queue appropriately.
* flags.h (flag_debug_only_used_symbols): New.
* toplevl.c (flag_debug_only_used_symbols): New variable.
(decode_g_option): Decode -gused.
* doc/invoke.texi (Debugging Options): Document -gused.


Attachment: gused.diff
Description: Binary data




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