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++ or not?


On 04/10/2012 12:23 AM, Stan Shebs wrote:

> On 4/4/12 1:47 PM, Tom Tromey wrote:
>> I don't believe we should convert all of GDB to C++.  In particular I
>> think gdbserver should remain as pure C, and likewise any code shared
>> between gdbserver and gdb should be kept as such.
> 
> I don't know that it matters that much for GDBserver anymore.  When giant C++ apps like Firefox are running on handheld devices, it's a little hard to see that a handful of C++ library functions and and EH data section in GDBserver are going to make it or break it on targets that people are developing for today.  


You're forgetting about all those uclibc (and musl's and other libc's of the world) targets
that most probably don't even have a display, and some which don't support C++, and that
still need to be debugged.  A debugger agent is a system component that
should aim lower than a bloated browser.  Again, even the Android NDK doesn't support
C++ exceptions properly (or maybe it does nowadays, but it didn't only a couple years ago),
one of the biggest justifications for a C++ move.

> Plus I note that GDBserver is picking up a load of functionality, and the truly space-conscious are better-advised to build a custom stub that is stripped down to just the bits they're going to use.

If that's a concern, we can make the load of functionality build time optional.  Heck, the Linux kernel
can scale from tiny machines to the super computers of the world that way (and that no doubt
contributes very much to its ever-growing ubiquitousness).  I see no reason gdbserver can't.

-- 
Pedro Alves


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