This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 0/7] Refactor shared code in {i386,amd64}-linux-nat.c


Hi Mark,

Mark Kettenis wrote:
> > From: Gary Benson <gbenson@redhat.com>
> > Date: Fri, 27 Jun 2014 10:10:02 +0100
> > 
> > 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.
[snip]
> > Is this ok to commit?
> 
> Sorry, no.  Perhaps more code can be shared between i386-linux-nat.c
> and amd64-linux-nat.c, but this goes too far and turns things into
> #ifdef spagetthi.  It also breaks established naming conventions.

In hindsight the "Merge {i386,amd64}_linux_read_description" patch
is pretty ugly.  I'll rework it as per Pedro's suggestion elsewhere
in this thread.

Regarding the naming convention, there's a problem on the GDB
side (as opposed to gdbserver) in that "i386" is overloaded.
In some places it means "i386 and amd64" and in other places
it means "i386 (not amd64)".  This makes things difficult to
understand, so I've adopted the gdbserver's convention where
"x86" means "i386 and x86_64" and "i386" means "i386 (not amd64)".

Thanks,
Gary

-- 
http://gbenson.net/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]