From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Berlin To: Daniel Berlin Cc: Jim Blandy , gdb@sources.redhat.com Subject: Re: DWARF2 problem with g++-3.0 Date: Wed, 13 Jun 2001 22:55:00 -0000 Message-id: <87zobbhage.fsf@cgsoftware.com> References: <87k82hf3n5.fsf@cgsoftware.com> <87hexjitk9.fsf@cgsoftware.com> X-SW-Source: 2001-06/msg00113.html Daniel Berlin writes: > As Jason Merrill confirmed for me, for at least C and C++, we can > eliminate any symbols with the same name, declared in the same line, > of the same file. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ And before you worry, i've subsetted this elimination to only be performed for symbols in include files, and turned off by default, just to be on the safe side. Even though the subsetting makes it exactly equivalent to the BINCL/EINCL optimization STABS performs (in full form, you can generate pathological C code that isn't strictly legal, but gcc will allow you to compile. You can't do the same for C++, but i didn't want to special case the language). Literally. It will remove exactly the same symbols, hand verified. It provably has to, anyway. It's just an explicit form of EINCL/BINCL optimization. EINCL/BINCL tells you all the symbols in the include file for you. We have to calculate it approriately (which isn't particularly difficult, since we know which is the main source file for a CU, and which are the include files. And know what symbols go with what files. files). -- "I like to pick up hitchhikers. When they get in the car I say, "Put on your seat belt. I want to try something. I saw it once in a cartoon, but I think I can do it." "-Steven Wright