This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFC] gnulib (was: Re: [RFA] lmemmem.patch)
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Cc: Doug Evans <dje at google dot com>
- Date: Mon, 31 Mar 2008 12:03:59 -0400
- Subject: [RFC] gnulib (was: Re: [RFA] lmemmem.patch)
- References: <e394668d0803241050w6a1f341u585fb4906135a44b@mail.gmail.com> <200803241758.m2OHwDid017265@greed.delorie.com> <e394668d0803241333nedb753j9b7b1593c6d3989f@mail.gmail.com> <20080324203738.GC29991@ins.uni-bonn.de> <e394668d0803241346h5006b63du8997cf9e081dc907@mail.gmail.com> <20080324205119.GE29991@ins.uni-bonn.de> <e394668d0803241420w3db1813bj4aa7803b74f3d40b@mail.gmail.com> <20080324212354.GA16323@caradoc.them.org> <e394668d0803241436w5160a2dfodd33d44b174cb9bf@mail.gmail.com> <20080330213540.GA2856@caradoc.them.org>
On Sun, Mar 30, 2008 at 05:35:40PM -0400, Daniel Jacobowitz wrote:
> Here you go. How does this look? It frees us to rely on gnulib's
> stdint.h, string.h, and other useful modules should we want them. I
> didn't make gdbserver completely use gnulib, only build memmem; I
> tested this on Linux (memmem present) and Windows (memmem missing).
> GDB will use the included memmem even on Linux, since glibc's is known
> to be slower.
A word of explanation is probably called for, since there wasn't much
context.
GDB runs on many platforms. This calls for a certain amount of
portability goop to overcome their different limitations. Right now,
this is handled mostly in libiberty. One exception is gdb_stdint.h, which
comes from a macro in config.
A recent development on the portability scene is gnulib:
http://www.gnu.org/software/gnulib/
There's an explanation of it on that page. In summary, it's a
collection of source files and a script that can automatically copy
the necessary ones into your project or update existing copies
(gnulib-tool). It's much larger and more active than libiberty
and it has both portability and general utility routines, e.g.
checksum algorithms and Unicode support.
Two other things I would like to use it for are stdint.h and
automatic line wrapping in error messages.
--
Daniel Jacobowitz
CodeSourcery