This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Auto-load safe-path and auto-load scripts-directory on Windows


I did some test under msys(MSYS-20111123.zip)
Which comes from: 
http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/MSYS%20%2832-bit%29/MSYS-20111123.zip

The test code was just copied from "configure" and configure.ac" file:

--------------------
#!/bin/bash

with_auto_load_dir='$debugdir:$datadir/auto-load'
escape_dir=`echo $with_auto_load_dir | sed 's/[[$]]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
echo $escape_dir

ac_define_dir=`eval echo $escape_dir`
ac_define_dir=`eval echo $ac_define_dir`
echo $ac_defefine_dir
--------------------

The result is: $debugdir:$datadir/auto-load
This is the default value, and I have

/* Directories from which to load auto-loaded scripts. */
#define AUTO_LOAD_DIR "$debugdir:$datadir/auto-load"

in config.h

But if I change the line to: (note I use the semicolon)
with_auto_load_dir='$debugdir;$datadir/auto-load'

Then, I get an error:
$ ./mytest.sh
$debugdir;$datadir/auto-load
./mytest.sh: line 7: /auto-load: No such file or directory

So, it looks like an issue in the eval command?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]