[PATCH] Share more common target structures between gdb and gdbserver

Tom Tromey tromey@redhat.com
Tue Jul 30 18:11:00 GMT 2013


>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro> I'd very much prefer avoiding "common" in file names, instead
Pedro> naming the files for what they contain, not for the fact that they're
Pedro> "common" to two programs (gdb, gdbserver) presently.  I think of it
Pedro> this way -- when we finally end up with only one backend (or one
Pedro> backend using a foo-common.c file), I'd rather avoid
Pedro> renaming these files to something else, because they're no longer
Pedro> "common".  Or, yet IOW, think of common/ as a library.  Can you
Pedro> imagine if all libraries in a distro named their implementation
Pedro> files "foo-common.c" ?  Because that's what should happen given
Pedro> they're used by lots of programs, right?  :-)  The direction I prefer
Pedro> is, when moving things to common/ we take the opportunity to split them
Pedro> into smaller, more atomic, leaner units.  E.g., that's how we ended up
Pedro> with ptid.h/ptid.c, instead of inferior-common.h (or some such).

This all makes sense to me.

I think it would be best to write this down in the "Common" page of the
wiki.  We can add other guidelines there too.  This will make it simpler
for people to work on the commonizing project.

Tom



More information about the Gdb-patches mailing list