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] Update a stab string to reflect gcc3


I was mostly just bugged that we have a major revision of the compiler, 
but the only record we are leaving around for the debugger lies about 
the version.  That just seems like it is asking for trouble.

In the case of the ABI difference, presumably gcc3 will always implement 
the same C++ ABI, and if it is changed again, it will be called gcc4.  
That is an incompatible change, so it had better be.  So if there is a 
gcc3_compiled stab in the debug info, I can know that this is gcc3, AND 
I can know that the C++ ABI is IA-64 whatever, whatever, whatever.  If 
we wanted to be more general, we could always have an ABI identifier as 
well, which other compilers that use this ABI could adopt.  Not sure I 
care so much about this, however...

Jim

On Friday, March 15, 2002, at 06:50  PM, Daniel Berlin wrote:

> On Fri, 15 Mar 2002, Jim Ingham wrote:
>
>> 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?
>
> No.
> The ABI is not defined by GCC.
> It's defined by the IA-64 C++ ABI document.
>
> Thus, we use something not compiler specific to detect it, because it's
> not compiler specific itself (of course, there are a few vendor
> extensions, but this is in mangling).
>
> Please try to keep that in mind when mucking about in the V3 abi stuff.
> It's not just g++'s abi anymore, so you can't rely on only changing gcc 
> to
> get some desired behavior.
> :)
> --Dan
>
>
--
Jim Ingham                                   jingham@apple.com
Developer Tools - gdb
Apple Computer


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