Dear developer:
Yesterday, I upgraded MSYS2 to the latest version. When I debug a 32 bit Qt 
project, the debugger ends when the first breakpoint is hit by an unknown 
signal.
This is also true in non Qt projects, even if it is an empty HelloWorld C++ 
program that will crash before the first breakpoint triggers.
Environmental Science:
Operating system: Windows 7 X64
MSYS2:MSYS2 x64 Edition
Upgrade date: North America time February 16, 2017
GCC version: gcc.exe (Rev1, Built by MSYS2 project) 6.3.0
GDB version: GNU GDB (GDB) 7.12.1
ENV: No anti-virus software is installed.
Test project see annex.
1. x64 gdb is OK:
        commands in shell started by mingw64.exe:
        $g++  -g test.cpp -o test.exe
        $gdb ./test.exe
        (gdb) b add(int,int)
        Breakpoint 1 at 0x4015be: file ./test.cpp, line 4.
        (gdb) r
        Starting program: C:\msys64\home\gougoumimi\dbgtest\test.exe
        [New Thread 5692.0x1eb4]
        Hello World!

        Breakpoint 1, add (a=12, b=13) at ./test.cpp:4
        4               int c = a + b;
        (gdb) list
        1       #include <iostream>
        2       int add (int a, int b)
        3       {
        4               int c = a + b;
        5               return c;
        6       }
        7       int main(int argc, char * argv[])
        8       {
        9               std::cout<<"Hello World!"<<std::endl;
        10              std::cout<<add(12,13)<<std::endl;
        (gdb) c
        Continuing.
        25
        Break point passed.
        [Inferior 1 (process 5692) exited normally]


2. x86 is NOT OK
        commands in shell started by mingw32.exe:
        $g++  -g test.cpp -o test.exe
        $gdb ./test.exe
        (gdb) b add(int,int)
        Breakpoint 1 at 0x401636: file ./test.cpp, line 4.
        (gdb) r
        Starting program: C:\msys64\home\gougoumimi\dbgtest\test.exe
        [New Thread 5584.0xeec]
        Hello World!

        This application has requested the Runtime to terminate it in an 
unusual way.
        Please contact the application's support team for more information.

        Breakpoint 1, add (

3. For examples above, it seems that, x86 edition gdb  has some problems in 
stdout display .

4. There was a same problem in qtcreator IDE

Thanks a lot!


goldenhawk...@163.com
邮件带有附件预览链接,若您转发或回复此邮件时不希望对方预览附件,建议您手动删除链接。
共有 2 个附件
dbgtest.pro(1K) 极速下载 test.cpp(1K) 极速下载 在线预览 

Attachment: dbgtest.pro
Description: Binary data

Attachment: test.cpp
Description: Binary data

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Msys2-users mailing list
Msys2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/msys2-users

Reply via email to