Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Qian Hong <fracting@gmail.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 00/11] C++/MinGW patches
Date: Mon, 09 Nov 2015 09:53:00 -0000	[thread overview]
Message-ID: <CALd+sZSU6q0ff7FVWpX0uQjx0iWOmtbg28LGqMgvRnSgAMEf0w@mail.gmail.com> (raw)
In-Reply-To: <563937B4.7080800@redhat.com>

Hi Pedro,

Thanks for the info, I did some tests with your code.

On Wed, Nov 4, 2015 at 6:39 AM, Pedro Alves <palves@redhat.com> wrote:
> So it seems to me that something is wrong with C++ exceptions
> support in the mingw toolchain you used.  I suggest trying a simple
> test like:
>
> int
> main ()
> {
>   try
>     {
>       throw 1;
>     }
>   catch(...)
>     {
>     }
>
>   return 0;
> }
>
> ... to check whether C++ exceptions work at all.

The above test case works for me.
I tried several thing:
1. build the above code with MINGW-w64 g++ from MSYS2, run on MSYS2.
It works on both Windows and Wine.
2. build the above code with MinGW-w64 cross compiler from my Ubuntu,
runs on Wine, works as expected.
3. build the above code with Linux native g++ (i386), runs on Linux,
works as expected.
4. Added customer printf statement to the source code, retest on all
configuration above, and I can confirm all executed code path are the
same.


> One issue to look out for is what flavor of C++ exceptions your mingw
> toolchain uses.  There are flavors using dwarf2, others using sjlj.  Also, we
> link gdb with -static-libstdc++ -static-libgcc, which may make a difference.

I tried all 4 combination of with/without
-static-libstdc++/-static-libgcc, the test case works for me on
Windows with MinGW-w64 g++ from MSYS2.

MSYS2 g++ has --disable-sjlj-exceptions --with-dwarf2, not sure if it
does matter.


Here is the MinGW-w64 g++ provided by MSYS2:
Using built-in specs.
COLLECT_GCC=E:\msys32\mingw32\bin\g++.exe
COLLECT_LTO_WRAPPER=E:/msys32/mingw32/bin/../lib/gcc/i686-w64-mingw32/5.2.0/lto-wrapper.exe
Target: i686-w64-mingw32
Configured with: ../gcc-5.2.0/configure --prefix=/mingw32
--with-local-prefix=/mingw32/local --build=i686-w64-mingw32
--host=i686-w64-mingw32 --target=i686-w64-mingw32
--with-native-system-header-dir=/mingw32/i686-w64-mingw32/include
--libexecdir=/mingw32/lib
--with-gxx-include-dir=/mingw32/include/c++/5.2.0 --enable-bootstrap
--with-arch=i686 --with-tune=generic
--enable-languages=c,lto,c++,objc,obj-c++,fortran,ada --enable-shared
--enable-static --enable-libatomic --enable-threads=posix
--enable-graphite --enable-fully-dynamic-string
--enable-libstdcxx-time=yes --disable-libstdcxx-pch
--disable-libstdcxx-debug --enable-version-specific-runtime-libs
--disable-isl-version-check --enable-lto --enable-libgomp
--disable-multilib --enable-checking=release --disable-rpath
--disable-win32-registry --disable-nls --disable-werror
--disable-symvers --with-libiconv --with-system-zlib
--with-gmp=/mingw32 --with-mpfr=/mingw32 --with-mpc=/mingw32
--with-isl=/mingw32 --with-pkgversion='Rev4, Built by MSYS2 project'
--with-bugurl=http://sourceforge.net/projects/msys2 --with-gnu-as
--with-gnu-ld --disable-sjlj-exceptions --with-dwarf2
Thread model: posix
gcc version 5.2.0 (Rev4, Built by MSYS2 project)

I've forwarded the question to MSYS2 maintainers in #msys2 (OFTC),
will update once I have more information.

Thanks!


-- 
Regards,
Qian Hong

-
http://www.winehq.org


  reply	other threads:[~2015-11-09  9:53 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-02 19:36 Pedro Alves
2015-11-02 19:36 ` [PATCH 01/11] [C++/mingw] ser-mingw.c casts Pedro Alves
2015-11-02 19:36 ` [PATCH 06/11] [C++/mingw] ser-tcp.c casts Pedro Alves
2015-11-02 20:40   ` Simon Marchi
2015-11-02 20:55     ` Pedro Alves
2015-11-02 21:06       ` Pedro Alves
2015-11-02 19:36 ` [PATCH 04/11] [C++/mingw] windows-nat.c casts Pedro Alves
2015-11-02 19:36 ` [PATCH 02/11] [C++/mingw] Misc alloca casts Pedro Alves
2015-11-02 19:36 ` [PATCH 03/11] [C++/mingw] gdb-dlfcn.c casts Pedro Alves
2015-11-02 19:36 ` [PATCH 10/11] [C++/mingw] Fix windows-nat.c::xlate Pedro Alves
2015-11-02 19:36 ` [PATCH 11/11] [C++/mingw] gdbserver: gdb/host signal mixup Pedro Alves
2015-11-02 19:43 ` [PATCH 09/11] [C++/mingw] handle_output_debug_string Pedro Alves
2015-11-02 19:44 ` [PATCH 07/11] [C++/mingw] Define __STDC_CONSTANT_MACROS / __STDC_LIMIT_MACROS for stdint.h Pedro Alves
2015-11-02 20:47   ` Simon Marchi
2015-11-03 13:58     ` Simon Marchi
2015-11-03 14:07       ` Pedro Alves
2015-11-03 14:15         ` Simon Marchi
2015-11-03 15:13           ` Pedro Alves
2015-11-02 19:44 ` [PATCH 05/11] [C++/mingw] gdbserver casts Pedro Alves
2015-11-02 19:45 ` [PATCH 08/11] [C++/mingw] Simplify first chance exception handling Pedro Alves
2015-11-02 21:01   ` Simon Marchi
2015-11-02 21:09     ` Pedro Alves
2015-11-02 20:05 ` [PATCH 00/11] C++/MinGW patches Pedro Alves
2015-11-02 20:22   ` Qian Hong
2015-11-02 20:46     ` Pedro Alves
2015-11-02 21:17       ` Qian Hong
2015-11-02 23:31         ` Pedro Alves
2015-11-03  9:06           ` Qian Hong
2015-11-03 10:47       ` Qian Hong
2015-11-03 11:15         ` Qian Hong
2015-11-03 11:26           ` Pedro Alves
2015-11-03 11:41             ` Qian Hong
2015-11-03 12:11               ` Qian Hong
2015-11-03 12:34               ` Pedro Alves
2015-11-03 11:20         ` Pedro Alves
2015-11-03 16:54           ` Pedro Alves
2015-11-03 18:59             ` Qian Hong
2015-11-03 21:03             ` Qian Hong
2015-11-03 22:39               ` Pedro Alves
2015-11-09  9:53                 ` Qian Hong [this message]
2015-11-17 14:50                   ` Pedro Alves
2015-11-30 15:03                     ` Qian Hong
2015-11-30 15:48                       ` Pedro Alves
2015-11-03 12:24     ` Qian Hong
2015-11-03 12:27       ` Pedro Alves
2015-11-03 12:56         ` Qian Hong
2015-11-03 13:08           ` Pedro Alves
2015-11-03 13:23             ` Qian Hong
2015-11-03 16:52               ` Pedro Alves
2015-11-03 13:10           ` Pedro Alves
2015-11-02 21:04 ` Simon Marchi
2015-11-17 15:28   ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALd+sZSU6q0ff7FVWpX0uQjx0iWOmtbg28LGqMgvRnSgAMEf0w@mail.gmail.com \
    --to=fracting@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox