Community
Participate
Working Groups
When I press the restart button while debugging a simple non-threaded console program, I get a dialog box with the following message: "Execution is suspended because of error" and if I press the detail button, I see: "/dev/pts/5: No such file or directory You can't do that without a process to debug" /dev/pts/5 exists before pressing "restart" but not after. It looks like the above details come from gdb.
I enabled the gdb output and after clicking on restart got the following: [1,152,135,041,245] 131-break-insert -t main [1,152,135,041,251] 131^done,bkpt={number="9",type="breakpoint",disp="del",enabled="y",addr="0x08048\ 230",func="main",file="../main.cpp",line="53",times="0"} [1,152,135,041,252] 132-exec-run [1,152,135,041,253] (gdb) [1,152,135,041,257] 132^running [1,152,135,041,258] (gdb) [1,152,135,041,429] &"/dev/pts/5: No such file or directory.\n" [1,152,135,041,432] &"You can't do that without a process to debug.\n" [1,152,135,041,433] 132^error,msg="You can't do that without a process to debug." [1,152,135,041,435] 133 info threads [1,152,135,041,435] (gdb) [1,152,135,041,437] &"info threads\n" [1,152,135,041,438] &"No registers.\n" [1,152,135,041,439] 133^error,msg="No registers."
Restart will work if you turn off the "Connect process input and output to a terminal" option in the launch configuration dialog. The "Restart" button should be disabled if the session uses pty.
Indeed it does, thanks. But then not seeing the output of a console application is kind of limiting. Is it a known limitation? Restarting seems to be much faster than stoping first and then starting the debugger again.
(In reply to comment #3) > Indeed it does, thanks. > But then not seeing the output of a console application is kind of limiting. Is > it a known limitation? Yes, it is. That's why we use pty to redirect program's input/output to the console.
Just got the same problem... But isn't this report a duplicate of bug 144330?
> (In reply to comment #3) > > Indeed it does, thanks. > > But then not seeing the output of a console application is kind of limiting. > > Is it a known limitation? > > Yes, it is. That's why we use pty to redirect program's input/output to the > console. > As a side note, if you use CDT 6.0 and use the new DSF-GDB debugger the limitation has been lifted. You get your output to a console, and can still restart the program.