public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* 2.2.1(0.289/5/3), GCC5.2.0 Possible Bug
@ 2015-09-10 12:22 Sebastian Götzinger
  2015-09-10 12:36 ` Qian Hong
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Götzinger @ 2015-09-10 12:22 UTC (permalink / raw)
  To: cygwin

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 <http://gnu.org/licenses/gpl.html>
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:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 2.2.1(0.289/5/3), GCC5.2.0 Possible Bug
  2015-09-10 12:22 2.2.1(0.289/5/3), GCC5.2.0 Possible Bug Sebastian Götzinger
@ 2015-09-10 12:36 ` Qian Hong
  2015-09-10 12:39   ` Qian Hong
  0 siblings, 1 reply; 3+ messages in thread
From: Qian Hong @ 2015-09-10 12:36 UTC (permalink / raw)
  To: cygwin

Hi,

On Thu, Sep 10, 2015 at 8:21 PM, Sebastian Götzinger
<bastiangoe@hotmail.com> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 2.2.1(0.289/5/3), GCC5.2.0 Possible Bug
  2015-09-10 12:36 ` Qian Hong
@ 2015-09-10 12:39   ` Qian Hong
  0 siblings, 0 replies; 3+ messages in thread
From: Qian Hong @ 2015-09-10 12:39 UTC (permalink / raw)
  To: cygwin

On Thu, Sep 10, 2015 at 8:36 PM, Qian Hong <fracting@gmail.com> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-10 12:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-10 12:22 2.2.1(0.289/5/3), GCC5.2.0 Possible Bug Sebastian Götzinger
2015-09-10 12:36 ` Qian Hong
2015-09-10 12:39   ` Qian Hong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).