This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Will therefore GDB utilize C++ or not?
- From: Tom Tromey <tromey at redhat dot com>
- To: <Paul_Koning at Dell dot com>
- Cc: <gdb at sourceware dot org>
- Date: Fri, 18 May 2012 13:20:51 -0600
- Subject: Re: Will therefore GDB utilize C++ or not?
- References: <20120330161403.GA17891@host2.jankratochvil.net> <87aa2rjkb8.fsf@fleche.redhat.com> <4F832D5B.9030308@redhat.com> <20120409190519.GA524@host2.jankratochvil.net> <4F833D29.4050102@redhat.com> <20120416065456.GA30097@host2.jankratochvil.net> <4F8ECB72.70708@redhat.com> <20120418151553.GA16768@host2.jankratochvil.net> <4F8EDD7B.2010602@redhat.com> <20120418155354.GA17912@host2.jankratochvil.net> <201204181748.q3IHm1cF002815@new.toad.com> <87pqb4q2on.fsf@fleche.redhat.com> <201204182309.q3IN9FcF019607@new.toad.com> <87k409gwv0.fsf@fleche.redhat.com> <35C0C41D-6D07-4612-B0C5-DB00CFD2F975@dell.com>
>>>>> "Paul" == <Paul_Koning@Dell.com> writes:
Tom> For example, look at the Python layer. Despite patch review and our
Tom> knowledge of the issues, we still have error-checking and
Tom> reference-counting bugs in the code. You can go through the list
Tom> archives and find them.
Paul> How would C++ help with reference counting bugs? I could see how it
Paul> might (or might not) help with the subset related to error handling
Paul> that can be made clearer with exceptions. But the reference counting
Paul> errors I remember were straight algorithmic mistakes that, as far as I
Paul> can see, would have existed in the exact same form if the algorithm
Paul> had been expressed in C++.
We'd use RAII to ensure that refcounts were automatically managed by the
C++ compiler.
Tom