This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] new command to search memory
- From: "Doug Evans" <dje at google dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 8 May 2008 19:51:29 -0700
- Subject: Re: [RFA] new command to search memory
- References: <20080214021915.F3FE51C72F0@localhost> <20080226022335.GB4456@caradoc.them.org> <e394668d0802281844q23f860e7hd4ee9977fdf9b4b3@mail.gmail.com> <20080229031252.GA2897@caradoc.them.org> <e394668d0804161946n687aab63u51e44b51b6118de6@mail.gmail.com> <20080502151742.GM29202@caradoc.them.org>
On Fri, May 2, 2008 at 8:17 AM, Daniel Jacobowitz <drow@false.org> wrote:
>> Index: gdbserver/Makefile.in
>> ===================================================================
>> RCS file: /cvs/src/src/gdb/gdbserver/Makefile.in,v
>> retrieving revision 1.57
>> diff -u -p -u -p -r1.57 Makefile.in
>> --- gdbserver/Makefile.in 14 Apr 2008 18:04:00 -0000 1.57
>> +++ gdbserver/Makefile.in 17 Apr 2008 02:35:24 -0000
>> @@ -81,11 +81,15 @@ BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC)
>> READLINE_DIR = ${srcdir}/../readline
>> READLINE_DEP = $$(READLINE_DIR)
>>
>> +# gnulib
>> +INCGNULIB = -I$(srcdir)/../gnulib -I../gnulib
>> +
>> # All the includes used for CFLAGS and for lint.
>> # -I. for config files.
>> # -I${srcdir} for our headers.
>> # -I$(srcdir)/../regformats for regdef.h.
>> -INCLUDE_CFLAGS = -I. -I${srcdir} -I$(srcdir)/../regformats -I$(INCLUDE_DIR)
>> +INCLUDE_CFLAGS = -I. -I${srcdir} -I$(srcdir)/../regformats -I$(INCLUDE_DIR) \
>> + $(INCGNULIB)
>>
>> # M{H,T}_CFLAGS, if defined, has host- and target-dependent CFLAGS
>> # from the config/ directory.
>> @@ -143,7 +147,7 @@ TAGFILES = $(SOURCES) ${HFILES} ${ALLPAR
>>
>> OBS = inferiors.o regcache.o remote-utils.o server.o signals.o target.o \
>> utils.o version.o \
>> - mem-break.o hostio.o \
>> + mem-break.o memmem.o hostio.o \
>> $(XML_BUILTIN) \
>> $(DEPFILES) $(LIBOBJS)
>> GDBSERVER_LIBS = @GDBSERVER_LIBS@
>
> The gdbserver configure script should already be taking care of all
> these. In particular we don't want to reference ../gnulib in the
> objdir since it won't exist if you're just building gdbserver. And I
> know it will add memmem.o, I tested that.
I thought gnulib/memmem.o was always going to be used. We started
down this path because, in part, libc's memmem is O(n^2).
configure ...
checking for memmem... yes
after making gdbserver ...
$ nm gdbserver | grep memmem
U memmem@@GLIBC_2.0
> Does that leave just the declaration? You can stick it somewhere in
> gdbserver instead of bringing in all the replacement gnulib headers.