This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 00/11] C++/MinGW patches
- From: Qian Hong <fracting at gmail dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 3 Nov 2015 18:46:39 +0800
- Subject: Re: [PATCH 00/11] C++/MinGW patches
- Authentication-results: sourceware.org; auth=none
- References: <1446492970-21432-1-git-send-email-palves at redhat dot com> <5637C1FA dot 2060708 at redhat dot com> <CALd+sZThHQQFq4DSw9Dd0pXVfYmAq=RFj0GM1OtmSXv8OwL4sg at mail dot gmail dot com> <5637CB96 dot 4010106 at redhat dot com>
- Reply-to: fracting at gmail dot com
Hi Pedro,
On Tue, Nov 3, 2015 at 4:46 AM, Pedro Alves <palves@redhat.com> wrote:
> Thanks! Note you'll need to configure gdb with --enable-build-with-cxx
> in order to make it build with a C++ compiler.
I think I have some interesting testing result for you ;-)
I compiled latest gdb in your branch on MSYS2 on Windows [1], with my
additional modification to enable build-with-cxx.
It compiles fine. However, when debugging a simple hello world
program, I got error below:
"This application has requested the Runtime to terminate it in an
unusual way. Please contact the application's support team for more
information." when debugging a simple hello world program. "
Steps to reproduce:
1. $ cat hello.c
# include <stdio.h>
int main(void)
{
int a = 10;
printf("haha a is %d\n", 10);
return 0;
}
2. compile with MSYS2 mingw gcc
$ gcc hello.c -g -O0 -o hello.exe
3. debugging hello.exe with gdb (build with cxx)
$ gdb hello.exe
3.1. set a breakpoint on main()
3.2. type `c`
expect result:
gdb should report that the program is not start yet.
actual result:
gdb exit with error message: "This application has requested the
Runtime to terminate it in an unusual way. Please contact the
application's support team for more information." when debugging a
simple hello world program. "
Then I tried build gdb again without build-with-cxx, and this error
disappear, gdb works as expect, at least for simple hello world.
Cross-reference: feature request for gdb-git package in MSYS2 [2]
[1] https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-gdb-git
[2] https://github.com/Alexpux/MINGW-packages/issues/862
--
Regards,
Qian Hong
-
http://www.winehq.org