This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Move GDB to C++ ?
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.
Stan