Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 318312 - Unable to attach to a running application
Summary: Unable to attach to a running application
Status: CLOSED DUPLICATE of bug 314628
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 7.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-29 09:25 EDT by Vadym Krevs CLA
Modified: 2011-05-03 10:39 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vadym Krevs CLA 2010-06-29 09:25:29 EDT
Build Identifier:  20100617-1415

Been using Eclipse Helios/CDT since RC1. As of RC4, I am unable to attach to an already running application when launching the debug configuration. The launch hangs at the "Configuring GDB" stage with the progress indicator stuck at 94% and gdb taking ~96% of CPU time. Standalone gdb or ddd have no problem attaching to the same process. 

openSUSE 11.2 for x86_64, 
$ rpm -q gdb gcc
gdb-7.0-27.1.x86_64
gcc-4.4-4.2.x86_64


Reproducible: Always
Comment 1 Marc Khouzam CLA 2010-07-01 06:43:56 EDT
I tried on SLED10, 32bit and GDB 7.0.1, and it works ok for me.
I was using the actual Helios release of Eclipse and of CDT.  Can you try with those versions?

Also, if you see the problem again, do you see the dialog window pop-up showing a list of processes to which you can attach, or does it stop even before that?
Comment 2 Vadym Krevs CLA 2010-07-01 08:59:34 EDT
I also use the actual helios release of Eclipse + CDT. I do see the list of processes, select the process I need, and then the launch hangs.
Comment 3 Marc Khouzam CLA 2010-07-01 09:37:13 EDT
(In reply to comment #2)
> I also use the actual helios release of Eclipse + CDT. I do see the list of
> processes, select the process I need, and then the launch hangs.

Since you can actually select a process, then you must have some 'gdb traces' shown.  Can you attach the traces from the 'gdb traces' console?
Comment 4 Vadym Krevs CLA 2010-07-01 10:13:17 EDT
I am not sure what you mean by "gdb traces" console - there is no such thing in Eclipse. 

At the time of the debug configuration launch, the "Console" view contains a single line "[Thread debugging using libthread_db enabled]", and the "Progress" view contains what I described in the bug report.
Comment 5 Marc Khouzam CLA 2010-07-01 10:20:38 EDT
(In reply to comment #4)
> I am not sure what you mean by "gdb traces" console - there is no such thing in
> Eclipse.
> 
> At the time of the debug configuration launch, the "Console" view contains a
> single line "[Thread debugging using libthread_db enabled]", and the "Progress"
> view contains what I described in the bug report.

In the console view there is a little 'TV' icon with an arrow.  If you click on the arrow
you can select between the different available consoles.  You should see one called
'gdb traces' for your specific launch.
Comment 6 Vadym Krevs CLA 2010-07-01 10:51:10 EDT
I see. It seems that it was trying to set non-existent/invalid breakpoints and that was causing gdb to get stuck ... I deleted all breakpoints and now gdb can attach to processes again ...
Comment 7 Marc Khouzam CLA 2010-07-01 11:34:02 EDT
(In reply to comment #6)
> I see. It seems that it was trying to set non-existent/invalid breakpoints and
> that was causing gdb to get stuck ...

That would still be a bug.  It sounds similar to bug 314628.   Can you still attach the 'gdb traces' where the bug happens.
Comment 8 Marc Khouzam CLA 2011-05-03 10:39:16 EDT
I didn't get gdb traces for this and I cannot reproduce it.  The description sounds exactly like bug 314628 so I'm marking it as a duplicate.

If you disagree, please re-open it and attach the 'gdb traces'

Thanks.

*** This bug has been marked as a duplicate of bug 314628 ***