]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Better way to specify where gdb is -- now GDB_PATH is defined in config.h,
authorNicholas Nethercote <njn@valgrind.org>
Fri, 18 Apr 2003 12:54:24 +0000 (12:54 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Fri, 18 Apr 2003 12:54:24 +0000 (12:54 +0000)
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

configure.in
coregrind/Makefile.am
coregrind/vg_main.c

index 840a985566551cd17160f9f0b256b9917e9d4caf..3c4dc2a1e02d9dd43247a7e20d84ca76e07eb391 100644 (file)
@@ -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],
index cb4817492ae05ca3beeecd25ca23a5c4be0e1b7f..c50a0d40d1b12f3cbac4bfe3768de31cf2c6b36f 100644 (file)
@@ -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@
index 165763d2051d111c71292360a920144b8daf7727..902b5f072bee5cfd9d7b33a4e51c20b2e28d7c7b 100644 (file)
@@ -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) {