This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Auto-load safe-path and auto-load scripts-directory on Windows
- From: asmwarrior <asmwarrior at gmail dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: jan dot kratochvil at redhat dot com, gdb at sourceware dot org
- Date: Sat, 10 Oct 2015 21:24:45 +0800
- Subject: Re: Auto-load safe-path and auto-load scripts-directory on Windows
- Authentication-results: sourceware.org; auth=none
- References: <83io7y3249 dot fsf at gnu dot org> <83h9ni2zij dot fsf at gnu dot org> <20150829112713 dot GB3298 at host1 dot jankratochvil dot net> <83egim2uqz dot fsf at gnu dot org> <20150829114356 dot GA3766 at host1 dot jankratochvil dot net> <83a8ta2qsq dot fsf at gnu dot org> <56186C66 dot 1090907 at gmail dot com> <83egh3tc84 dot fsf at gnu dot org>
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?