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.
To run on Windows the user needs to have various X11 cygwin modules loaded to set up a working X11 environment so PIO can be run in an xterm. This is not a limitation shared by either Eclipse or Visual Studio. We need the I/O window working 100% without any special configuration. Both use the native Windows command window for I/O. We should too! This is a showstopper for the next gdb-lite milestone.
The idea of the fix is to use native console on Windows. Debugger gdb has CLI command "set new-console", which tells gdb to create child process with console. The suggested fix is to send this command to gdb at the beginning of debugging session (before loading the inferior program). The fix is integrated in cnd-nb50-dev branch. ------------------- Contextual Diffs ---------------- Tag: cnd-nb50-dev User: NikMolchanov Date: 2006/08/03 14:59:10 Modified: cnd/gdb/src/org/netbeans/modules/cnd/debugger/gdb/GdbProxyCL.java Log: IZ 81533 PIO does not work on Windows IZ 80510 *Gdb-lite* Program I/O window Problem 5 (don't use X11 on Windows) - use gdb CLI command "set new-console" to create native console on Windows File Changes: Directory: /cnd/gdb/src/org/netbeans/modules/cnd/debugger/gdb/ ============================================================== File [changed]: GdbProxyCL.java Url: http://cnd.netbeans.org/source/browse/cnd/gdb/src/org/netbeans/modules/cnd/debugger/gdb/GdbProxyCL.java?r1=1.1.2.45&r2=1.1.2.46 Delta lines: +20 -1 -------------------- --- GdbProxyCL.java 1 Aug 2006 13:58:23 -0000 1.1.2.45 +++ GdbProxyCL.java 3 Aug 2006 21:59:08 -0000 1.1.2.46 @@ -95,6 +95,7 @@ private final String CLI_CMD_FILE = "file "; // NOI18N private final String CLI_CMD_RUN = "run "; // NOI18N private final String CLI_CMD_KILL = "kill "; // NOI18N + private final String CLI_CMD_SET_NEW_CONSOLE = "set new-console"; // NOI18N // SHELL commands private final String SH_CMD_KILL = "kill -9 "; // NOI18N private final String DIR_TMP = "/tmp"; // NOI18N @@ -204,6 +205,10 @@ debuggerStatus = STARTING; } programStatus = NOT_STARTED; + String OSName = System.getProperty("os.name"); // NOI18N + if (OSName.startsWith("Windows")) { // NOI18N + set_new_console(); // IZ 81533 + } if (showTime) { time2 = System.currentTimeMillis(); // DEBUG total_time = (time2-time0); // DEBUG @@ -536,7 +541,19 @@ } /** + * Send "set new-console" to the debugger + * This command tells gdb to execute inferior program with console. + * + * @return null if action is accepted, otherwise return error message + */ + public String set_new_console() { + return gdbProxy.gdbProxyML.sendCommand(CLI_CMD_SET_NEW_CONSOLE); + } + + /** * Request a stack dump from gdb. + * + * @return null if action is accepted, otherwise return error message */ public String stack_list_frames() { return gdbProxy.gdbProxyML.sendCommand(MI_CMD_STACK_LIST_FRAMES); @@ -833,7 +850,9 @@ // /usr/dt/bin/dtterm -title "Debugging" -background blue // -foreground white -aw -e /bin/sh /tmp/loop.sh & String OSName = System.getProperty("os.name"); // NOI18N - if (OSName.startsWith("Windows")) return null; // TEMPORARY (IZ 81533) + if (OSName.startsWith("Windows")) { // NOI18N + return null; // IZ 81533 (gdb will create console) + } if (OSName.startsWith("Windows")) { // NOI18N // By default use Windows "native" window String ttybat = "tty" + SessionID + ".bat"; // NOI18N