Bug 349345 - The app output is lost while debugging on local host with remote launcher
Summary: The app output is lost while debugging on local host with remote launcher
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on: 349360
Blocks:
  Show dependency tree
 
Reported: 2011-06-14 12:51 EDT by Anna Dushistova CLA
Modified: 2020-09-04 15:22 EDT (History)
3 users (show)

See Also:


Attachments
snapshot of Anna's screen (42.83 KB, image/png)
2011-06-14 13:48 EDT, Anna Dushistova CLA
no flags Details
snapshot of Anna's debug config (8.86 KB, image/png)
2011-06-14 14:10 EDT, Anna Dushistova CLA
no flags Details
Patch that filters out connections of "local" connection type (2.00 KB, patch)
2011-06-20 16:30 EDT, Anna Dushistova CLA
anna.dushistova: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anna Dushistova CLA 2011-06-14 12:51:05 EDT
Create a new remote debug configuration, select "Local" in the connection combo( always there by default).
1)DSF launcher-the output is completely lost;
2)CDI launcher-the output is shown during the debugging session shutdown, not when it is supposed to appear;
3) Run mode-everything works fine.

This might be an RSE issue with local shells implementation, not sure yet. This is all happening on Linux of course.
Comment 1 Marc Khouzam CLA 2011-06-14 13:13:49 EDT
When I run this with HEAD, I see the output when I look at the console of the "Remote Shell" node.  Don't you see it there?
Comment 2 Anna Dushistova CLA 2011-06-14 13:48:11 EDT
Created attachment 197966 [details]
snapshot of Anna's screen
Comment 3 Anna Dushistova CLA 2011-06-14 13:51:03 EDT
(In reply to comment #1)
> When I run this with HEAD, I see the output when I look at the console of the
> "Remote Shell" node.  Don't you see it there?

No, I don't. I attached a screenshot of my console view. I am running of HEAD, but I updated it on Friday I think.
That only happens with "Local" connection type, if I do Linux/SSH it works properly.
Comment 4 Marc Khouzam CLA 2011-06-14 13:52:25 EDT
(In reply to comment #3)
> (In reply to comment #1)
> > When I run this with HEAD, I see the output when I look at the console of the
> > "Remote Shell" node.  Don't you see it there?
> 
> No, I don't. I attached a screenshot of my console view. I am running of HEAD,
> but I updated it on Friday I think.
> That only happens with "Local" connection type, if I do Linux/SSH it works
> properly.

Where do I get the "Local" connection type?  I don't have it in my list
Comment 5 Anna Dushistova CLA 2011-06-14 14:08:56 EDT
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #1)
> > > When I run this with HEAD, I see the output when I look at the console of the
> > > "Remote Shell" node.  Don't you see it there?
> > 
> > No, I don't. I attached a screenshot of my console view. I am running of HEAD,
> > but I updated it on Friday I think.
> > That only happens with "Local" connection type, if I do Linux/SSH it works
> > properly.
> 
> Where do I get the "Local" connection type?  I don't have it in my list

It is always present by default. Check in Remote Systems view if it's there?
Comment 6 Anna Dushistova CLA 2011-06-14 14:10:11 EDT
Created attachment 197967 [details]
snapshot of Anna's debug config
Comment 7 Marc Khouzam CLA 2011-06-14 14:10:53 EDT
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #3)
> > > (In reply to comment #1)
> > > > When I run this with HEAD, I see the output when I look at the console of the
> > > > "Remote Shell" node.  Don't you see it there?
> > > 
> > > No, I don't. I attached a screenshot of my console view. I am running of HEAD,
> > > but I updated it on Friday I think.
> > > That only happens with "Local" connection type, if I do Linux/SSH it works
> > > properly.
> > 
> > Where do I get the "Local" connection type?  I don't have it in my list
> 
> It is always present by default. Check in Remote Systems view if it's there?

I have something called 'localhost'.  I remember having "Local" a while ago, but then I re-installed platform, forgot to install RSE and tried my launches, I may have messed it up.  Unless 'localhost' is the same thing?
Comment 8 Anna Dushistova CLA 2011-06-14 14:20:56 EDT
(In reply to comment #7)
> 
> I have something called 'localhost'.  I remember having "Local" a while ago,
> but then I re-installed platform, forgot to install RSE and tried my launches,
> I may have messed it up.  Unless 'localhost' is the same thing?

I think that your localhost might be an ssh Linux connection. Try to create a new one via "New connection->Local" in Remote Systems view?
Comment 9 Marc Khouzam CLA 2011-06-14 14:34:06 EDT
(In reply to comment #8)
> (In reply to comment #7)
> > 
> > I have something called 'localhost'.  I remember having "Local" a while ago,
> > but then I re-installed platform, forgot to install RSE and tried my launches,
> > I may have messed it up.  Unless 'localhost' is the same thing?
> 
> I think that your localhost might be an ssh Linux connection. Try to create a
> new one via "New connection->Local" in Remote Systems view?

Ok, I can see the problem now.
I believe this is because the I/O is beeing buffered.

Try adding the line

    setvbuf(stdout, NULL, _IONBF, 0);

before doing printouts.  I see the output when I have that line of code.
Comment 10 Anna Dushistova CLA 2011-06-14 14:48:03 EDT
I was able to reproduce it with two "local" shells in RSE and filed bug 349360 to track it.
Comment 11 Anna Dushistova CLA 2011-06-20 16:30:41 EDT
Created attachment 198289 [details]
Patch that filters out connections of "local" connection type

After thinking about it more, I decided that we don't really need "Local" connections in the list. Why would you want to debug with gdbserver on your local machine? And there is another launcher for debugging with gdb locally.
Comment 12 Marc Khouzam CLA 2011-06-21 09:14:31 EDT
(In reply to comment #11)
> Created attachment 198289 [details]
> Patch that filters out connections of "local" connection type
> 
> After thinking about it more, I decided that we don't really need "Local"
> connections in the list. Why would you want to debug with gdbserver on your
> local machine? And there is another launcher for debugging with gdb locally.

Some gdb functionality is only available through gdbserver.  For example, to use gdb tracepoints and trace an application, one must use gdbserver at this point.  I that case, people need to run gdbserver and gdb on their local machine, if it is the local machine they want to trace.

But we can still do this by creating a 'localhost' ssh connection.  I wonder if it is user friendly enough to require the user to define their own 'localhost' connection?