Bug 149723 - debug restart does not work
Summary: debug restart does not work
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-05 15:24 EDT by christophe CLA
Modified: 2020-09-04 15:19 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description christophe CLA 2006-07-05 15:24:13 EDT
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.
Comment 1 christophe CLA 2006-07-05 17:32:48 EDT
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."
Comment 2 Nobody - feel free to take it CLA 2006-07-05 17:42:04 EDT
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.
Comment 3 christophe CLA 2006-07-05 17:50:59 EDT
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.   
Comment 4 Nobody - feel free to take it CLA 2006-07-06 16:25:30 EDT
(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. 

Comment 5 Toralf Lund CLA 2009-06-19 04:25:34 EDT
Just got the same problem...

But isn't this report a duplicate of bug 144330?
Comment 6 Marc Khouzam CLA 2009-06-19 09:28:31 EDT
> (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.