This is the mail archive of the gdb@sourceware.org mailing list for the GDB 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: Will therefore GDB utilize C++? Not.


On 4/6/12 4:32 PM, John Gilmore wrote:

If people have the energy to rewrite large chunks of GDB, why argue about it? Go off and do it. It's free software -- you don't even have to start from scratch like GNU did. The world can always use a new debugger. You can make a politically correct debugger (pcdb?) with an identical interface but a C++ implementation under the hood. If it's better than GDB in the long run, maintainers will migrate to it, GDB will fall into disrepair, and GNU will adopt it.



My initial reaction on reading this was "oh that bomb-thrower Gilmore is at it again", but upon rereading, I'm not sure whether you're being serious, or maybe a little tongue-in-cheek.


In any case, one of the key underlying motivations for the C++ plan is that we *don't* have the energy to rewrite large chunks of GDB, nor to start over from scratch. (We delegated that to the LLVM folks. :-) ) Instead, we need to look for ways to keep growth under control, or to simplify things. For instance, these days we're much more likely to delete bits of code that are not in current use, even if one could imagine them being helpful in some future scenario.

Another way to simplify the code is to offload work to the compiler. Anybody that's known me for any length of time knows that I'm not a big fan of C++, but even I have to admit there are some things that can be done better in C++ than in C, such as compiler-checked exception handling. Also, it's not like we're working in a vacuum - our friends in GCC-land have done a lot to provide good C++ functionality, and I know that they would be happy to help us make effective use of C++ in GDB.

Stan




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