This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 186336 - Pause does not work with Mingw64
Summary: Pause does not work with Mingw64
Status: STARTED
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: PC Windows 7 x64
: P4 normal (vote)
Assignee: Maria Tishkova
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-19 02:52 UTC by SiGeM
Modified: 2016-07-06 14:38 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
MinGW64 Log Broken Breakpoints (18.59 KB, application/octet-stream)
2010-05-19 12:16 UTC, SiGeM
Details
Modified pause utility (109.39 KB, application/octet-stream)
2010-05-24 14:47 UTC, Egor Ushakov
Details
gdbLog With x64 GdbKillProc (13.65 KB, application/octet-stream)
2010-05-24 14:58 UTC, SiGeM
Details

Note You need to log in before you can comment on or make changes to this bug.
Description SiGeM 2010-05-19 02:52:44 UTC
Hi,

I am testing the debugging C++ in Mingw64 for Windows (nothing of cygwin) and don't works, if i set a breakpoint before application start it works, but if i set a breakpoint in a bucle(While,For) after application start and application is touring a while, the breakpoint don't works and get a broken breakpoint.

Thanks and sorry for my bad english,

Grettins.
Comment 1 Egor Ushakov 2010-05-19 08:22:08 UTC
please specify NB version, gdb version and attach gdblog (http://wiki.netbeans.org/GdbLog).
Comment 2 Egor Ushakov 2010-05-19 09:19:49 UTC
also specify how you compile your application, is it 64 bits?
Comment 3 Egor Ushakov 2010-05-19 10:27:36 UTC
The problem is that our "pausing" utility on Windows does not work with 64 bits executables. For some reason DebugBreakProcess fails. Need to investigate.
Comment 4 SiGeM 2010-05-19 12:16:12 UTC
Created attachment 99200 [details]
MinGW64 Log Broken Breakpoints

Ho aigan,

My versions is:
C Compiler: gcc.exe (GCC) 4.4.4.20100429 (release) [svn/rev.158895 - mingw-w64/oz]
C++ Compiler: g++.exe (GCC)  4.4.4.20100429 (release) [svn/rev.158895 - mingw-w64/oz]
Fortran Compiler: GNU Fortran (GCC)  4.4.4.20100429 (release) [svn/rev.158895 - mingw-w64/oz]
Assembler: GNU assembler (GNU Binutils) 2.20.51.20100505
Make Tool: GNU MAKE 3.81
Debugger: GNU gdb (GDB) 7.1.50.20100505-cvs

i attach the log in mingw64 failed.
Comment 5 Egor Ushakov 2010-05-19 12:23:32 UTC
Thanks, problem is confirmed.
Pause (and breakpoint setting on the fly) does not work for with MinGW64.
Comment 6 Egor Ushakov 2010-05-19 13:01:49 UTC
I'm not sure the problem is in our code. We just use win API.
Comment 7 Alexander Pepin 2010-05-19 13:19:37 UTC
Anyway it's not P2 as breakpoints can be set if the application is paused.
Comment 8 Egor Ushakov 2010-05-19 13:26:22 UTC
I've created new topic at the MinGW64 help forum:
http://sourceforge.net/projects/mingw-w64/forums/forum/723798/topic/3714618
Comment 9 Egor Ushakov 2010-05-23 17:26:25 UTC
we need to use 64 bit helper for 64 bits applications.

2 SiGeM:
can you please try this workaround to check that it will work for you:
- download this source: http://hg.netbeans.org/cnd-main/file/tip/cnd.debugger.gdb/windows/GdbKillProc.c
- compile it on your machine with <MinGW64>/bin/gcc.exe 
- replace NB/cnd/bin/GdbKillProc.exe with this file (do not forget to backup original file)
- try to use pause in NB after that
Comment 10 SiGeM 2010-05-24 00:17:18 UTC
I am try and recive this message:
"The GDB Debugger has exited unexpectedly" 
And don't start the application.

¿Any idea?
Comment 11 Egor Ushakov 2010-05-24 11:39:31 UTC
this executable only affects pause, can you revert the GdbKillProc.exe file and try again? Maybe you've changes something in projects settings?
Comment 12 SiGeM 2010-05-24 13:23:35 UTC
Hi again,

I rebuild the exe, and start with ADMIN the netbeans and don't works :(, 1 error in gdb.log ("error,msg="Function \"WinMain\" not defined.").

C++ code: 

int main(int argc,char* argv[])
{
    int i= 0;
    int d= 0;
    while (true)
    {
         d = 1234;
        d *= 2;
        d++;
        d--;
    }
    return 0;
}

start, and set breakpoint in d= 1234;. don't works.
Comment 13 Egor Ushakov 2010-05-24 14:47:35 UTC
Created attachment 99394 [details]
Modified pause utility

Please replace your NB/cnd/bin/GdbKillProc.exe with this file and try to pause your 64 bits application once again and attach here GdbLog as before. Thanks!
Comment 14 SiGeM 2010-05-24 14:58:26 UTC
Created attachment 99395 [details]
gdbLog With x64 GdbKillProc

Sorry but don't work i attach the log.
Comment 15 SiGeM 2010-05-24 15:03:44 UTC
¡YES!! WORKS THANKS!!

The really problem is my NetBeans using the "C:\Users\UserPC\.netbeans\dev\bin" path for the .exe and not the ProgramFiles. i dont understand i have 2 path with installation.

Sorry and thanks.

PD: I love you ;) finnaly i can program in x64 ^^.
Comment 16 Egor Ushakov 2010-05-24 15:17:15 UTC
Glad to hear that :)
Comment 17 Egor Ushakov 2010-12-02 14:02:11 UTC
so is the problem fixed without a new GdbKillProc.exe?