Move GDB to C++ ?

Stan Shebs
Tue Jul 29 19:45:00 GMT 2008

Eli Zaretskii wrote:
> So will someone please tell, loud and clear: what do we want to do the
> day after GDB is rewritten in C++?  Let's suppose that we magically
> fast-forward to the day after everything was refactored and GDB is
> 110% pure, OO, C++ -- what will we do the next day that we cannot or
> have difficulties doing today?
Speaking for myself, I hope to spend less of my time reading code, 
especially idiosyncratic implementations that seemed like clever ideas 
twenty years ago. 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.
> Unless we can answer this question, refactoring and rewriting is
> simply waste of resources, nothing less, nothing more.
Indeed, refactoring alone is pointless. The theory is supposed to be 
that it enables other changes. For instance, when I broke up 
wait_for_inferior ages ago, my immediate goal was to preserve 
functionality exactly; nobody understood any more how all the gotos 
interacted, and I didn't want to throw GDB into any more of a muddle 
than it had already gotten into. But once that was done, it facilitated 
additiional changes for async event handling, nonstop debugging, etc.


More information about the Gdb mailing list