This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Share more common target structures between gdb and gdbserver
- From: Tom Tromey <tromey at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: lgustavo at codesourcery dot com, "'gdb-patches\ at sourceware dot org'" <gdb-patches at sourceware dot org>
- Date: Tue, 30 Jul 2013 12:11:29 -0600
- Subject: Re: [PATCH] Share more common target structures between gdb and gdbserver
- References: <51E595A0 dot 6090500 at codesourcery dot com> <51F7FC4E dot 3050604 at redhat dot com>
>>>>> "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