Move GDB to C++ ?

Andrew Cagney cagney@gnu.org
Fri Jul 11 14:27:00 GMT 2008


Vladimir Prus wrote:
> Joel Brobecker wrote:
>
>   
>> I am way out of my league on this, but isn't it the case that:
>>   - there's still some progress to be made to help debugging C++
>>     in general (I might be VERY wrong on that one)
>>     
>
>   

These are good points.  They offer pointers to some of the areas that 
GDB is lacking.  The cheap comment to make here though is that, were GDB 
written in C++ and used these features, we'd have these debugging 
problems fixed - of course, for instance, GDB is managing to be a good 
Ada debugger, without being written in Ada :-)

This does, I think, raise an interesting question: is, or should, be 
being the a good (best?) C++ debugger be a high priority for GDB?


> I think that the biggest issue with debugging C++ is that whenever you
> have pointer to class Base, which actually points to object of class
> Derived, and you want GDB to print the real type, GDB gives fits.
> (Or maybe, I'm not sufficiently trained in asking GDB politely).
>
> Second issue is that I don't think "step" via throw statement works -- you
> need "catch catch".
>
> I don't think the above issues are showstoppers -- there are workarounds,
> and the issues must be fixed anyway.
>
> The inline functions are not specific to C++, and templates -- well, there
> are no issues debugging templates, and who needs templates outside of 
> (well-debugged already) STL, anyway (*)?
>
> Last time I checked, GDB had some bizarre logic to handle C++ namespaces,
> but well, who needs namespaces (*)?
>
> - Volodya
>
> (*) Both templates and namespaces have important uses; but it does not seem
> GDB, specifically, has much need of them.
>
>
>
>
>   



More information about the Gdb mailing list