Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 90120 - "pause" (on Windows) does not work
"pause" (on Windows) does not work
Status: RESOLVED FIXED
Product: cnd
Classification: Unclassified
Component: Debugger
5.x
All Windows XP
: P2 (vote)
: 6.x
Assigned To: _ gordonp
issues@cnd
waive
:
Depends on:
Blocks: 90222
  Show dependency treegraph
 
Reported: 2006-11-28 00:40 UTC by julieg
Modified: 2009-06-25 10:59 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description julieg 2006-11-28 00:40:46 UTC
Given the source below, the pause button does not work, and as a result,
the "Finish Debugger Session" does not work as well.

The process has to be killed from the task manager.

Source code provided by Nik:

int main(int argc, char**argv) {
   int i;
      // Prints arguments
   printf("Arguments:\n");
   for (i = 0; i < argc; i++) {
       printf("%i: %s\n", i, argv[i]);
   }
   for (i=1; i>0; i);
   return 0;
}
Comment 1 julieg 2006-11-28 23:49:10 UTC
The description should say:
"pause or pause followed by finish debugging" does not work
from the source code provided.

In order to verify that the process is not terminated, please
check the performance tab in the task manager.  You will find
out that the process is running with 100% cpu cycle after
"pause button or pause followed by finish debugging" is pushed.
Comment 2 _ gordonp 2007-07-19 00:26:21 UTC
Defer until next release (possibly longer because this may require gdb fixes).
Comment 3 Alexander Pepin 2007-09-22 17:50:14 UTC
Now the debugger toolbar switches to pause state and debug session can be terminated but it looks that the process is
not stopped in fact (no cursor, no LV). I use following code:
int main(int argc, char** argv) {
    
    int a = 0;
    while(a == 0){
        int b = a;
    }
    
    return (EXIT_SUCCESS);
}

 If a user set a breakpoint inside the endless loop it behaves the same way as pause.  After continuing debuggers stops
at the newly created breakpoint.  
Comment 4 _ gordonp 2007-09-29 22:33:37 UTC
Fixed with the following caveats.

1. If Cygwin's gdb is being used and the program is in a tight loop like Nik's and
   Alexander's examples in this issue, then it takes 20-30 seconds before gdb responds.
   If MinGW's gdb is being used the the program stops immediately. I tested this on the
   latest Eclipse+CDT and it had a timeout and couldn't stop Alexander's test program at
   all (I only tried twice, not an exhaustive test). 

2. When stopping on Windows, you very seldom get a stack trace which includes any user
   code. This is a Windows issue and I'm asking the gdb and Cygwin communities if there
   is any way of reaching a valid stack. At first I thought it might just be the trace
   of a different thread, but thats not the case (although I do switch back to the user's
   thread). If someone in either the gdb or Cygwin community can provide answers on how
   to do this, I'll file another issue and fix it.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo