From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Berlin To: Jim Wilson Cc: Daniel Berlin , "Zack Weinberg" , Mark Mitchell , gcc-patches@gcc.gnu.org Subject: Re: killing ASM_IDENTIFY_GCC [branch] Date: Wed, 11 Apr 2001 12:46:00 -0000 Message-id: References: <200104111855.LAA22991@wilson.cygnus.com> X-SW-Source: 2001-04/msg00638.html Jim Wilson writes: > >A little more investigation shows I missed the small part of the > >source that sets the value of a global variable that *is* used > >(because it's really in dbxread.c, not stabsread.c, where one would > >expect it). > > Is this from eyeballing the code, or is this from running the gdb > testsuite? The second. > As far as I know (from many discussions with Stu Grossman), the gcc2_compiled > label is not used at all anymore. Gdb did try to use it long ago, but it > turned out to be far too hard to use, because the info was in the > wrong place. I meant the stab, not the label. Sorry (it was late, i had a paper, ...). > > What does get used is a gcc2_compiled stab that gcc emits. In fact, on a > Sun Solaris system, we don't emit the gcc2_compiled label by default, so > eliminating it is extremely unlikely to break anything. See ASM_IDENTIFY_GCC > and ASM_IDENTIFY_GCC_AFTER_SOURCE in gcc/config/dbxelf.h. Right, however, removing the stab will break stuff. > > So the way that this is supposed to work is gcc emits the gcc2_compiled stab > for gdb, and the gcc2_compiled label is completely useless. Thus eliminating > the gcc2_compiled label should not break gdb. Right, but he eliminated the STAB as well. If he just doesn't eliminate the STAB, all should be well. > > One flaw with the current system though is that we only emit the gcc2_compiled > stab on systems that include dbxelf.h, and not all ELF systems do. Certainly > no COFF systems do, but those are less interesting nowadays. If this shows > up as gdb testsuite problems, then it shouldn't be hard to fix by adding > the gcc2_compiled stab to targets that need it. It's used in weird ways, like determining whether to use structure returns in hand function calling on some systems, etc. This one little flag starts pervading all kinds of places. Personally, I wouldn't care if we break STABS accidently. I'm in the middle of adding all kinds of dwarf2 stuff to GDB from the GDB rewrite in C++ I had done (location expression evaluation at runtime, rather than trying to turn them into other types of gdb locations, using the call frame info to the frame stuff, etc), as well as support for the -feliminate-dwarf2-dups. STABS is the bane of my C++ maintainership in GDB. But i'm sure someone would be annoyed, so i just wanted to make sure the gcc2_compiled STAB stays, or someone alerts the GDB mailing list that it's going away, and whatever breaks as a result needs to be fixed. In other words, just inter-group communication. > > Jim -- What's another word for Thesaurus?