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: [rfa/rfc] Build libcommon.a for gdb and gdbserver


Haven't you lost -DGDBSERVER in the process?  I haven't looked closely at
the patch, but think you're including gdb/ headers in
gdbserver's build of libcommon as well.  You can't do that,
particularly defs.h.

We/Kwok have some patches that move some gdb files
to gdb/common/ , we should coordinate.
gdb/common/ in our tree contains:

 buffer.c
 buffer.h
 common-utils.c
 common-utils.h
 gdb_assert.h
 gdb_dirent.h
 gdb_locale.h
 gdb_signals.h
 i386-xstate.h
 linux-osdata.c
 linux-osdata.h
 ptid.c
 ptid.h
 signals.c
 xml-utils.c
 xml-utils.h

I'll be working on pushing some patches Kwok's
patches sit on top next week.

On Saturday 15 January 2011 23:54:39, Yao Qi wrote:
> Hi,
> re. "duplicated code in gdb and gdbserver"
> http://sourceware.org/ml/gdb-patches/2011-01/msg00153.html I propose to
> move common code to dir common/, and build files in it to libcommon.a,
> which can be used by both gdb and gdbserver.  tdep code can be the first
> batch to move to common/ dir, and different object files are selected to
> be archived into libcommon.a according to configure result.  In order to
> achieve that, configure.ac and Makefile.in will be created in common/ dir.
> 
> In this patch, there is *no* change related to tdep part, but build
> signals.c into libcommon.a only.  With this patch, we can move common
> tdep code into libcommon.a more easily in the future.
> 
> If this change is acceptable, I'll start on i386 tdep code as a "proof
> of concept", to move some common code in i386-nat.c and i386-low.c into
> i386-common.c.
> 
> Once it is done, some target-independent part of code, such as functions
> in regcache.c and infrun.c, can be moved into libcommon.a.
> 
> Comments are welcome.

-- 
Pedro Alves


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