[PATCH] Update a stab string to reflect gcc3

Jim Ingham jingham@apple.com
Fri Mar 15 18:24:00 GMT 2002


Daniel,

No real reason (for instance I was NOT planning on cluing a per objfile 
C++ ABI setting off of it right now.)  But the whole gdb "set cp-abi" 
bit set me to thinking that there are in fact differences between gcc2 & 
gcc3 compiled code that gdb does need to know about, so just for grins I 
wanted it to be right as soon as possible.  Then, if we ever care about 
some of the differences we will have the info we need to act on it.

It is, after all, pretty gross that gdb has to grub through symbols 
looking for functions with an initial _Z to determine that we are using 
the gnu-v3 ABI.  Wouldn't it be a lot cleaner if there was a 
gcc3_compiled stab that we could read?

Jim


On Friday, March 15, 2002, at 06:16  PM, Daniel Jacobowitz wrote:

> On Fri, Mar 15, 2002 at 03:21:46PM -0800, Jim Ingham wrote:
>> Oh, yeah, I forgot about this.  Probably the best course is to emit 
>> both
>> the "gcc2_compiled" and the "gcc3_compiled" stabs.  As gdb is currently
>> written, it will pick up the former, and totally ignore the latter.  
>> But
>> then we can change it to read the latter as well, and do whatever we
>> want with it.
>
> Just curious - what did you want this knowledge for?
>
>> On Friday, March 15, 2002, at 03:02  PM, Ira Ruben wrote:
>>
>>> At 5:21 PM -0300 3/15/02, Alexandre Oliva wrote:
>>>
>>>> AFAIK at least GDB used to rely on a symbol named explicitly
>>>> `gcc2_compiled', not something that actually reflected the exact GCC
>>>> major version number.
>>>
>>> At 5:15 PM -0500 3/15/02, Daniel Jacobowitz wrote:
>>>
>>>> It still does.  It's not clear how many of the uses are still
>>>> necessary, but the code is definitely still there.
>>>
>>> Well, it was one of the guys working on gdb here that asked for it to
>>> be changed...until I told him about what you said :-)  He went back to
>>> verify it and you are correct.  So if, when, and until he submits any
>>> (accepted) gdb patches that want that string changed consider my patch
>>> withdrawn.
>>>
>>> Sorry for the "noise" and thanks for pointing this out.
>>>
>>> Ira
>>>
--
Jim Ingham                                   jingham@apple.com
Developer Tools - gdb
Apple Computer
>>
>>
>
> --
> Daniel Jacobowitz                           Carnegie Mellon University
> MontaVista Software                         Debian GNU/Linux Developer



More information about the Gcc-patches mailing list