Move GDB to C++ ?

Stan Shebs stanshebs@earthlink.net
Wed Jul 30 19:05:00 GMT 2008


Eli Zaretskii wrote:
>> Date: Tue, 29 Jul 2008 12:35:02 -0700
>> From: Stan Shebs <stanshebs@earthlink.net>
>> CC: gdb@sources.redhat.com
>>
>> For instance, at this very moment I'm looking at 
>> ALL_OBJFILES and friends, wondering if the introduction of multiple 
>> execs is going to impact overall performance.
>>     
>
> And how would that change with C++?
>
>   
C++ collection classes would be very effective here. And sure, the same 
things could be constructed manually in C, but then you're using piles 
of macro trickery a la vec.h and you lose all your typechecking etc, or 
if you use function dispatching to iterate, you blow your optimization 
opportunities in code that is known to be time-critical. Good use of C++ 
machinery effectively moves functionality out of the GDB source tree and 
lets the compiler do the work instead.

Stan



More information about the Gdb mailing list