Re: 2.2.1(0.289/5/3), GCC5.2.0 Possible Bug

2015-09-10 Thread Qian Hong
On Thu, Sep 10, 2015 at 8:36 PM, Qian Hong  wrote:
> I'm not the person to answer this, but I can confirm same behavior here.

Oh, sorry, I mean it might not be a gcc bug, instead it might be a bug
of gdb who didn't translate double quotes correctly.


-- 
Regards,
Qian Hong

-
http://www.winehq.org

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



2.2.1(0.289/5/3), GCC5.2.0 Possible Bug

2015-09-10 Thread Sebastian Götzinger

Dear Ladies and Gentlemen,

We had some issues with our program (a wrapper for compiler).

Somehow, not all arguments have been transported correctly to the compiler.

We now bootstrapped gcc-5.2.0 and let it run alone with gdb for cygwin.

During that, we encountered, that during the compilerinvocation, the 
Doublequotes did not got escaped correctly. [1]


Because of that, gcc tells us, it has no input files... so how could we 
get rid of that?


Best regards,
Sebastian Götzinger.

[1]
$ gdb --args gcc-5.2.0.exe -v -E -DFOO=\"tt.h\" tt.c
GNU gdb (GDB) 7.8
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from gcc-5.2.0.exe...done.
(gdb) b main
Breakpoint 1 at 0x10046af36: file ../../gcc-5.2.0/gcc/gcc-main.c, line 42.
(gdb) r
Starting program: /usr/local/bin/gcc-5.2.0.exe -v -E -DFOO=\"tt.h\" tt.c
[New Thread 5764.0x1e54]
[New Thread 5764.0x8c4]

Breakpoint 1, main (argc=4, argv=0xc3caf0) at ../../gcc-5.2.0/gcc/gcc-main.c:42
42  {
(gdb) p argv[3]
$2 = 0x600042ab0 "-DFOO=\\tt.h\" tt.c"
(gdb)


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: 2.2.1(0.289/5/3), GCC5.2.0 Possible Bug

2015-09-10 Thread Qian Hong
Hi,

On Thu, Sep 10, 2015 at 8:21 PM, Sebastian Götzinger
 wrote:
> During that, we encountered, that during the compilerinvocation, the
> Doublequotes did not got escaped correctly. [1]

I'm not the person to answer this, but I can confirm same behavior here.

On Linux:
$ gdb --args bash -c "bash -c ls"
will run the `ls` program successfully after typing `r` inside the debugger.

However, on Cygwin, the above command will run into bash shell.

As a workaround, I use a command file like below:
$ cat command.txt
r -c "bash -c ls"

and then start gdb like below:
$ gdb bash --command command.txt

(hmm, I didn't realized it is a bug, that's why i have to use the
workaround, thanks for pointing out that)

-- 
Regards,
Qian Hong

-
http://www.winehq.org

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple