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.
Split from issue #151492 Steps to reproduce: - add MinGW tool collection and set it as default - create any application which waits for input (e.g. Quote) - clean and build it - run application from IDE - try to attach to the application process Result: Attach dialog contains only /usr/bin/ps
Fixed in changeset http://hg.netbeans.org/main?cmd=changeset;node=3c35f4b29305 and http://hg.netbeans.org/main?cmd=changeset;node=edd647b62be9
Integrated into 'main-golden', will be available in build *200810310201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/3c35f4b29305 User: Gordon Prieur <gordonp@netbeans.org> Log: Fixed IZ #151610 Can't attach to MinGW projects on Windows. Also reformatted the file (which has looked ugly since NB switched tab size from 8 to 4).
Fix failed in build 20081113. IMO the problem is that 'ps' is called from cygwin but program is run from MSYS. We should somehow work with both possibilities or as the first step we could call 'ps' for default tool collection.
In what way did the fix fail? Did you see the process you wanted to attach to and have the attach fail? Or did you not see the desired process? I tested this a lot today (I added the -W flag which shows *all* processes on Windows) and had no problems attaching. I can run the Cygwin ps and attach to either a Cygwin or MinGW process. Actually the only problem I had was when I had a MinGW process and the psys ps didn't show it (thats when I decided to add the -W flag to the ps command).
Gordon, your only problem is the main problem which I'm trying to explain you :) Short answer is: I can't see MinGW/MSYS processes in Attach debugger dialog. One more scenario: - create Quote_1 using cygwin tool collection - create Quote_2 using MinGW tool collection - run Quote_1 from IDE - open Attach Debugger dialog, I can see and attach Quote_1 process - close Quote_1 - run Quote_2 from IDE - open Attach Debugger dialog Result: I can not see Quote_2 process. The only visible process is /usr/bin/ps
Please retest on Windows with a nightly built after 11/18/2008.
A related issue (IZ #125773) was related to many Windows processes not being shown. It was fixed for Windows by http://hg.netbeans.org/main?cmd=changeset;node=3e580ba55ebf and http://hg.netbeans.org/main?cmd=changeset;node=ce719a8ea94e. With respect to NB65 patch1, all 4 changesets should be delivered in the patch.
Closed too fast. Alexander's 1st email led me to close it. A subsequent email said he was still having problems...
Created attachment 73950 [details] Gdb timed out log
after partial fixing issue #125773 Attach dialog shows all Windows processes but an attempt to attach to desired process causes IDE hang and appearing of the information window with a message "Gdb timed out attempting to attach tothe selected process". Gdb log for this state is attached (see above) Steps to reproduce: - open IDE - add MinGW tool collection - set "Make Command" to msys make - set MinGW tool collection as Default - create Quote project - clean and build it - run Quote from IDE, "C:\msys\1.0\bin\sh.exe" terminal window appears - open Attach to Process dialog - find 'quote' process there, select it and press OK Result: IDE hangs for a while then an information window appears with a message "Gdb timed out attempting to attach tothe selected process".
Created attachment 74027 [details] gdb log for the latest dev build with "-J-Dgdb.logger.level=WARNING"
The issue didn't pass the nomination process by nomination cut-off date. It has been marked as 65fixes2-candidate.
The gdb command log (attachment ID 74027) shows that an attempt to load symbols for "C:/working/nb_dev_working/Quote_mw\dist/Debug/MinGW-Windows/quote_mw" was made (token 104) and the failure for 104 shows .../Quote_mwdist/... which looks like the basedir and build result were incorrectly concatenated to create an invalid file name. This has been fixed in http://hg.netbeans.org/main/rev/b6b6ed87ee55 which guarantees that the path contains forward slashes (gdb requires forward slashes). Another problem is that when an attach failure is recognized a warning dialog is posted using SwingUtilities.invokeLater(). However, the main thread executes more gdb commands, even though we've failed to attach. So I've added "return"s after the invokeLater calls so we don't ask gdb for registers. This is resolved by http://hg.netbeans.org/main?cmd=changeset;node=fe5ed6a732c3. There was also a error posted from the main start debugger thread (instead of with SwingUtilities.invokeLater). I put this into an invokeLater so that shouldn't be a problem. The changeset for this last fix was http://hg.netbeans.org/main?cmd=changeset;node=d24dcc804512. So I've fixed several minor issues, but none of them address why the gdb binary couldn't attach to the process and timed out. Please retest and let me know if the timeout is a repeatable problem. If so, then please attach both another gdb-cmds* log and a process list (taken outside of the IDE) showing all system processes (ps -W). Also, are you using the MinGW/msys ps or the Cygwin ps (both should work, but I'd like to know if one vs the other somehow caused the problem).
Since there were a number of changesets involved in this fix, I'm putting them all into a single update to make it easier for support to track: http://hg.netbeans.org/main?cmd=changeset;node=3c35f4b29305 http://hg.netbeans.org/main?cmd=changeset;node=edd647b62be9 http://hg.netbeans.org/main?cmd=changeset;node=3e580ba55ebf http://hg.netbeans.org/main?cmd=changeset;node=ce719a8ea94e http://hg.netbeans.org/main?cmd=changeset;node=b6b6ed87ee55 http://hg.netbeans.org/main?cmd=changeset;node=fe5ed6a732c3 http://hg.netbeans.org/main?cmd=changeset;node=d24dcc804512 Note: Changeset d24dcc804512 removed the unset private method GdbDebugger.getGdbVersion(). The removal of this method had nothing to do with the fix and doesn't need to be back ported to patch2.
It seems to be an issue with my gdb. I could not attach to process from console either. I reinstalled both MinGW and gdb-6.8. Now everything is working as expected. verified in build 20081204
Integrated into 'main-golden', will be available in build *200812050201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/d24dcc804512 User: Gordon Prieur <gordonp@netbeans.org> Log: Added another "return" after a debugger startup error. I also moved a DialogDispaly.notify to be called from SwingUtilities.invokeLater. This *possibly* is the cause of the hang in IZ #151610 (because it required EDT and EDT is blocked by the debuggercore during debugger startup).
Hello, it impossible to apply mentioned changeset(s) to release65_fixes [ref1] branch because a lot of non-this IZ related changes were made and other changesets pushed into main [ref2] repository between release65_fixes branching time and mentioned changeset(s) pushing time. Please provide cumulative changeset/ set of changesets applicable to release65_fixes branch otherwise this fix will be skipped for current NB65 patch. This problem is common for following IZs: 151761, 151610, 151577, 133134, 155487 [ref1]: http://hg.netbeans.org/release65_fixes [ref2]: http://hg.netbeans.org/main
verified in NB6.5 with provided jar files
Cumulative backport of fixes of IZ 151481(rebackport), 151577, 151610, 153473, 151640, 151761, 155487, 151631, 133134 provided by developer. Backported into release65_fixes branch http://hg.netbeans.org/release65_fixes/rev/84a0c7175a4b
verified in patch2