Hello, this is the command that I gave me some results: $ ./pre-inst-guile-env ./libtool --mode=execute gdb --args libguile/guile.exe -c '(display "foo")'
As you can see I added "--args" option to GDB. Without "--args" option, GDB says: C:\msys\1.0\home\Carlo\guile/(display "foo"): Invalid argument. argc=1 argv[0]=C:/msys/1.0/home/Carlo/guile/libguile/.libs/guile.exe With "--args" option I had this: argc=4 argv[0]=C:/msys/1.0/home/Carlo/guile/libguile/.libs/guile.exe argv[1]=-c argv[2]=\(display\ argv[3]="foo"\) Since I had no idea about those unknown '\' characters, I added some debug prints before scm_boot_guile(): int main (int argc, char **argv) { int x; printf("argc=%d\n",argc); for (x=0; x<argc; x++) printf("argv[%d]=%s\n",x,argv[x]); scm_boot_guile (argc, argv, inner_main, 0); return 0; /* never reached */ } Then I launched libguile/guile.exe normally and I got this: argc=4 argv[0]=C:/msys/1.0/home/Carlo/guile/libguile/.libs/guile.exe argv[1]=-c argv[2]=(display argv[3]=foo) In this case, no more '/' but the '"' characters around the "foo" word are disappeared. Anyways, I seems that the parameter has been split in two... Sincerely, Carlo Bramini. ---------- Initial Header ----------- >From : "Neil Jerram" n...@ossau.uklinux.net To : "carlo.bramix" carlo.bra...@libero.it Cc : "guile-devel" guile-devel@gnu.org Date : Wed, 17 Jun 2009 22:09:08 +0100 Subject : Re: Again on Windows support (2) > Neil Jerram <n...@ossau.uklinux.net> writes: > > > "carlo.bramix" <carlo.bra...@libero.it> writes: > > > >> $ ./pre-inst-guile -c '(display "foo")' > >> Backtrace: > >> In unknown file: > >> ?: 0* (begin (eval-string "(display") (quit)) > >> ?: 1* [eval-string "(display"] > > > > That is weird. > > > > Can we first rule out a problem with your shell? What output do you > > get from this? > > > > $ set - '(display "foo")' && echo "--${1}--" && echo "--${2}--" > > Assuming that that gives the expected output, i.e. > > --(display "foo")-- > ---- > > my next suggestion would be to run under GDB, with a breakpoint on > scm_shell(). The invocation for doing that is > > ./pre-inst-guile-env ./libtool --mode=execute gdb libguile/guile -c '(display > "foo")' > > In scm_shell, I would expect: > argc to be 3 > argv[1] to be "-c" > argv[2] to be "(display \"foo\")" > scm_get_meta_args () to return 0 > and hence not to execute the "if (new_argv)" block of code. > > Can you check those points? > > Regards, > Neil >