Re: [common] Merge duplicated macros in linux-nat.c and linux-low.c

Pedro Alves
2011-02-18T15:46:38Z

One general comment I have with moving things under common/,
--- just a though towards the whole sharing process
itself; not on this particular patch --- is that I'd very
much like us to avoid putting "common" on the filename of
files we end up putting under common/. That's just
redundant. Imagine we end up moving one of these files
elsewhere. Then we'd need to rename them again. Or that
we end up with a single implementation of the target
backend (we get rid of all the linux-nat.c code, for
example) --- then "common" on the filename stops making
sense at that point as well.

Let's name the files according to their contents instead.
Let's take the opportunity to split independent things
into separate files if it makes sense to factor them out.

E.g., x86 watchpoint related macros -> x86-watch.h
or x86-nat-watch.h or i386-watchpoint.h, or something
like that, not x86-common.h.

E.g., linux ptrace related macros and definition
-> linux-ptrace.h or something like that.

I realize that there are some files where "common"
will make most sense, and we shouldn't spend time
bikeshedding on filenames. This patch may well be
one of those. Again, I'm speaking to the whole
process, not particularly to this patch.

--
Pedro Alves