This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 0/7 v2] Refactor shared code in {i386,amd64}-linux-nat.c
- From: Gary Benson <gbenson at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Mark Kettenis <mark dot kettenis at xs4all dot nl>, Pedro Alves <palves at redhat dot com>
- Date: Fri, 27 Jun 2014 15:12:24 +0100
- Subject: [PATCH 0/7 v2] Refactor shared code in {i386,amd64}-linux-nat.c
- Authentication-results: sourceware.org; auth=none
Hi all,
This series is an updated version of the series I posted this morning.
Mark Kettenis rightly pointed out that x86_linux_read_description was
a mess of #ifdef spaghetti so I have rewritten it.
Patch 2 has changed because that's where the x86_linux_read_description
merge is. Patch 6 has changed because that's where the code is pulled
from {i386,amd64}-linux-nat.c into x86-linux-nat.c. The remaining
patches are the same.
I've inlined the original description of the series below.
Is this ok to commit?
Thanks,
Gary
--
This series refactors the shared code in {i386,amd64}-linux-nat.c into
the new files x86-linux-nat.[ch] and i386-linux-nat.h. The first five
patches remove spurious changes between the files so that the code to
be shared is identical:
1/7 - Rename identical functions
2/7 - Merge {i386,amd64}_linux_read_description
3/7 - Merge ps_get_thread_area
4/7 - Pull out common parts of _initialize_{i386,amd64}_linux_nat
5/7 - Comment and whitespace changes
The sixth patch moves the shared code into the new files and does all
the makefile and build system updates:
6/7 - Move duplicated code into new files
The seventh patch tidies the blocks of #include directives at the
tops of {i386,amd64}-linux-nat.c:
7/7 - Tidy #include lists
This final patch is not strictly necessary for the series, but it
makes things tidier.