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.
Assume tools(cygwin, mingw) are not in the system PATH. Add tool collection in Tools/Options/C/C++/Build Tools, set gdb there. If to choose step into in project context menu then in debugger console user can see only "Launching...", but all debugger tools are not acceptible.
This is not limited to debugging. I get similar behavior trying to run a project on Windows. I looked at the gdb log when this happened and the program is correctly loaded but fails when given the run command (with an unknown target exception). Running the project also fails. I suspect that runtime libraries aren't found because the compiler path isn't in the path. I think we need to add the compiler path directory when we run or debug a program. I think this is a P1 on the project system because the ability to develop without either Cygwin or MinGW directories in the user's path was intended to be a significant feature in this release. But it doesn't work because runtime libraries aren't found.
See also http://www.netbeans.org/issues/show_bug.cgi?id=120836
Yes, it's the same core problem: path to environment (that's where the compilers are) is not added to run environment. I added the path(s) to the run environment and GdbLite needs to do the same. Here is the code I added: // Append compilerset base to run path. (IZ 120836) ArrayList<String> env1 = new ArrayList<String>(); String csname = ((MakeConfiguration) pae.getConfiguration()).getCompilerSet().getOption(); String csdirs = CompilerSetManager.getDefault().getCompilerSet(csname).getDirectory(); if (((MakeConfiguration)pae.getConfiguration()).getCompilerSet().getFlavor().equals(CompilerFlavor.MinGW.toString())) { // Also add msys to path. Thet's where sh, mkdir, ... are. String msysBase = CppUtils.getMSysBase(); if (msysBase != null && msysBase.length() > 0) { csdirs = csdirs + File.pathSeparator + msysBase + File.separator + "bin"; // NOI18N } } boolean gotpath = false; String pathname = Path.getPathName() + '='; int i; for (i = 0; i < env.length; i++) { if (env[i].startsWith(pathname)) { env1.add(env[i] + File.pathSeparator + csdirs); // NOI18N gotpath = true; } else { env1.add(env[i]); } } if (!gotpath) { env1.add(pathname + Path.getPathAsString() + File.pathSeparator + csdirs); } env = env1.toArray(new String[env1.size()]); GdbLite needs to add some similar code where it handles the debug environment. Reassigning to Gordon.
Note: I found (and fixed) a bug in CppUtils.getMSysBase. It didn't work on (my) Vista. I changed the logic so it looks for ':' and not '\t'. There are no tabs in the value on my Vista! You should double check that getCygwinBase and getMinGWBase also work on Vista. They seems to have been coded after the same pattern as getMSysBase.
Changing back to gdb subcat, since thats where the fix needs to be.
Created attachment 59636 [details] Patch containing the fix
Fixed in trunk and the patch is attached. QA please verify the patch works so I can integrate into release61.
verified in trunk 200804040003
Fixed in trunk with http://hg.netbeans.org/main?cmd=changeset;node=b89dc7d05d97. Fixed in release61 with http://hg.netbeans.org/release61/rev/d16e512b86ca.
verified in NB6.1RC1 (build 200804082140)