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]

Re: [PATCH] -gused



On Friday, June 20, 2003, at 11:14 AM, Richard Henderson wrote:


On Fri, Jun 20, 2003 at 09:25:25AM -0700, Devang Patel wrote:
Here it is. I'd like to continue to provide -gused for Darwin GCC
users' benefit.

Hum. I'd rather it not be available generally though. Perhaps this can be done with CC1_SPECS in darwin.h.

(dbxout_flush_symbol_queue): New static function.

I think I also mentioned moving the queueing out of dbxout.c. There's no reason I can see that it should be done here, and doing it say in final.c means that all debug formats benefit.

How about this version? OK to commit if it passes dejagnu tests?


I'd also like to mention (thanks, Dale) that use of -gused makes
linker's life difficult in removing duplicate headers.

-Devang


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


* final.c (debug_flush_symbol_queue): New function.
(debug_queue_symbol): New function.
(debug_nesting): New variable.
(symbol_queue): New variable.
(symbol_queue_index): Same.
(symbol_queue_size): Same.
* final.h (debug_flush_symbol_queue): New.
(debug_queue_symbol): New.
(debug_nesting): New.
(symbol_queue): New.
(symbol_queue_index): New.
(symbol_queue_size): New.
* dbxout.c (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.
(dbxout_parms): Increment dbxout nesting.
(dbxout_reg_parms): Same.
* flags.h (flag_debug_only_used_symbols): New.
* toplevl.c (flag_debug_only_used_symbols): New variable.
* doc/invoke.texi (Debugging Options): Document -feliminate-unused-debug-symbols.


Attachment: gused.take3.diff
Description: Binary data



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