From: Nicholas N. <nj...@ca...> - 2003-04-16 09:59:01
|
On Thu, 20 Mar 2003, Ruben Garcia wrote: > In valgrind 1.0.4 (dont know if this is fixed in development) > the location of gdb is hardcoded in vg_main.c as /usr/bin/gdb. > > Gdb sources, on the other hand, install by default in /usr/local/bin/gdb. > Surely a patch to the ./configure to check where gdb is installed cannot > be difficult. I have this working, but I'm not certain if I've done it the best way. Here's what I did: - added this to configure.in: AC_PATH_PROG(GDB, gdb) - added this to coregrind/Makefile.am: vg_main.o: CFLAGS += -DWHERE_IS_GDB=@GDB@ - changed coregrind/vg_main.c to use WHERE_IS_GDB for the path. This works, but it would be better if the GDB variable was put into a .h file, so it's available everywhere -- that's better than having to feed it in to every file that needs it with -D. This could be done by introducing eg. vg_skin.h.in, but that would be a pain, especially just for one variable. I tried various ways to get the WHERE_IS_GDB variable put into config.h, but didn't manage... this would be a better solution. Does anyone know how to do this? Thanks very much. N |