From: Nicholas Nethercote Date: Fri, 18 Apr 2003 12:54:24 +0000 (+0000) Subject: Better way to specify where gdb is -- now GDB_PATH is defined in config.h, X-Git-Tag: svn/VALGRIND_2_0_0~227 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=df7e5ac5ecb27f5ea23e4c6cfa00029765165a49;p=thirdparty%2Fvalgrind.git Better way to specify where gdb is -- now GDB_PATH is defined in config.h, which is global, rather than passing it in with -D to the file that needed it. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1532 --- diff --git a/configure.in b/configure.in index 840a985566..3c4dc2a1e0 100644 --- a/configure.in +++ b/configure.in @@ -24,6 +24,9 @@ AC_PATH_PROG(PERL, perl) # figure out where gdb lives AC_PATH_PROG(GDB, gdb) +# autoheader tries to execute the 3rd string or something; I get warnings when +# it's defined. So just leave it undefined. --njn 2002-Apr-18 +AC_DEFINE_UNQUOTED(GDB_PATH, "$GDB", "") # some older automake's don't have it so try something on our own ifdef([AM_PROG_AS],[AM_PROG_AS], diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am index cb4817492a..c50a0d40d1 100644 --- a/coregrind/Makefile.am +++ b/coregrind/Makefile.am @@ -89,4 +89,3 @@ vg_memory.o: vg_memory.c $(MANUAL_DEPS) vg_intercept.o vg_libpthread.o vg_replace_malloc.o: CFLAGS += -fno-omit-frame-pointer -vg_main.o: CFLAGS += -DWHERE_IS_GDB=@GDB@ diff --git a/coregrind/vg_main.c b/coregrind/vg_main.c index 165763d205..902b5f072b 100644 --- a/coregrind/vg_main.c +++ b/coregrind/vg_main.c @@ -1688,7 +1688,7 @@ extern void VG_(start_GDB_whilst_on_client_stack) ( void ) #define TO_STRING2(x) #x VG_(sprintf)(buf, "%s -nw /proc/%d/exe %d", - TO_STRING(WHERE_IS_GDB), VG_(getpid)(), VG_(getpid)()); + TO_STRING(GDB_PATH), VG_(getpid)(), VG_(getpid)()); VG_(message)(Vg_UserMsg, "starting GDB with cmd: %s", buf); res = VG_(system)(buf); if (res == 0) {