public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/50664] New: GDB rebuilt by i686-w64-mingw32-gcc4.6.2's "-Os" crahed when debuging, but "-O2" is OK.
@ 2011-10-08 14:33 xunxun1982 at gmail dot com
  2011-10-20  6:39 ` [Bug other/50664] GDB rebuilt by i686-w64-mingw32-gcc4.6.2's "-Os" crashed when debugging, " xunxun1982 at gmail dot com
  2011-10-20  6:40 ` xunxun1982 at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: xunxun1982 at gmail dot com @ 2011-10-08 14:33 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50664

             Bug #: 50664
           Summary: GDB rebuilt by i686-w64-mingw32-gcc4.6.2's "-Os"
                    crahed when debuging, but "-O2" is OK.
    Classification: Unclassified
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: xunxun1982@gmail.com


I don't know which section this issue can be reported in.

I rebuilt the latest gcc4.6 branch on Win7 and I found a weird probem.
When I use the editon to build gdb with "-Os", it won't list source code, and
if you input list twice, gdb will crash.

The debug log:
--------------------------------------------------------------
GNU gdb (GDB) 7.3.1.20110921-cvs
Copyright (C) 2011 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 "i686-w64-mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from E:\MyPack\MinGW\bin/gdb-1.exe...done.
(gdb) run
Starting program: E:\MyPack\MinGW\bin/gdb-1.exe
[New Thread 2212.0x1ba8]
GNU gdb (pcx32) 7.3.1
Copyright (C) 2011 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 "i686-w64-mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) file a.exe
Reading symbols from e:\t\temp\a.exe...done.
(gdb) l
(gdb) No source file named main.
l
[New Thread 2212.0xe34]
[New Thread 2212.0x654]

Program received signal SIGSEGV, Segmentation fault.
0x0041ad8b in exceptions_state_mc (action=CATCH_THROWING) at exceptions.c:126
126      switch (current_catcher->state)
(gdb) bt
#0  0x0041ad8b in exceptions_state_mc (action=CATCH_THROWING)
    at exceptions.c:126
#1  0x0041ad0d in throw_exception (exception=...) at exceptions.c:240
#2  0x0041ae68 in exceptions_state_mc (action=<optimized out>)
    at exceptions.c:191
#3  0x0041b1d4 in catch_errors (func=0x40181e <captured_main>,
    func_args=0x28fe90, errstring=0x614070 "", mask=6) at exceptions.c:519
#4  0x0040262c in gdb_main (args=0x28fe90) at ./main.c:949
#5  0x00608ef0 in main (argc=1, argv=0x3f2fc0) at gdb.c:35
(gdb) bt 30
#0  0x0041ad8b in exceptions_state_mc (action=CATCH_THROWING)
    at exceptions.c:126
#1  0x0041ad0d in throw_exception (exception=...) at exceptions.c:240
#2  0x0041ae68 in exceptions_state_mc (action=<optimized out>)
    at exceptions.c:191
#3  0x0041b1d4 in catch_errors (func=0x40181e <captured_main>,
    func_args=0x28fe90, errstring=0x614070 "", mask=6) at exceptions.c:519
#4  0x0040262c in gdb_main (args=0x28fe90) at ./main.c:949
#5  0x00608ef0 in main (argc=1, argv=0x3f2fc0) at gdb.c:35
(gdb) q
A debugging session is active.

    Inferior 1 [process 2212] will be killed.

Quit anyway? (y or n)
---------------------------------------------------------------------------- 

But if I replace "-Os" with "-O2" to rebuild again, gdb will work ok.

And gcc4.6.1 release haven't the issue.
I don't know why.
So it's gcc's -Os bug?
But I only found the issue when I built gdb, other projects with "-Os" work
well.


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

* [Bug other/50664] GDB rebuilt by i686-w64-mingw32-gcc4.6.2's "-Os" crashed when debugging, but "-O2" is OK.
  2011-10-08 14:33 [Bug other/50664] New: GDB rebuilt by i686-w64-mingw32-gcc4.6.2's "-Os" crahed when debuging, but "-O2" is OK xunxun1982 at gmail dot com
@ 2011-10-20  6:39 ` xunxun1982 at gmail dot com
  2011-10-20  6:40 ` xunxun1982 at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: xunxun1982 at gmail dot com @ 2011-10-20  6:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50664

--- Comment #1 from xunxun <xunxun1982 at gmail dot com> 2011-10-20 06:39:17 UTC ---
gcc-4.6.2-RC-20111019 has not the problem.
May be solved.


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

* [Bug other/50664] GDB rebuilt by i686-w64-mingw32-gcc4.6.2's "-Os" crashed when debugging, but "-O2" is OK.
  2011-10-08 14:33 [Bug other/50664] New: GDB rebuilt by i686-w64-mingw32-gcc4.6.2's "-Os" crahed when debuging, but "-O2" is OK xunxun1982 at gmail dot com
  2011-10-20  6:39 ` [Bug other/50664] GDB rebuilt by i686-w64-mingw32-gcc4.6.2's "-Os" crashed when debugging, " xunxun1982 at gmail dot com
@ 2011-10-20  6:40 ` xunxun1982 at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: xunxun1982 at gmail dot com @ 2011-10-20  6:40 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50664

xunxun <xunxun1982 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from xunxun <xunxun1982 at gmail dot com> 2011-10-20 06:39:50 UTC ---
gcc-4.6.2-RC-20111019 has not the problem.
May be solved.


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

end of thread, other threads:[~2011-10-20  6:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-08 14:33 [Bug other/50664] New: GDB rebuilt by i686-w64-mingw32-gcc4.6.2's "-Os" crahed when debuging, but "-O2" is OK xunxun1982 at gmail dot com
2011-10-20  6:39 ` [Bug other/50664] GDB rebuilt by i686-w64-mingw32-gcc4.6.2's "-Os" crashed when debugging, " xunxun1982 at gmail dot com
2011-10-20  6:40 ` xunxun1982 at gmail dot com

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).