Discussion:
new thread kills eclipse
Heyendal, Carl
2009-12-10 18:10:34 UTC
Permalink
My Linux based embedded C application was a single process with no threads and it ran fine within Eclipse using DSF-GDB.

However I needed to create a new thread in my application running on my remote target that did a bit of work on the side, which I implemented.

But now, whenever I launch the application in Eclipse, I can step through the main parent thread without any problem, until I get to the point where I create a new thread. At that point, once the new thread is created, everything stops working, and the only thread that's running gets suspended. I can't even examine the return code from the call to pthread_create()!

I tried setting a breakpoint in the new thread but it never makes it to the breakpoint, ending with the same result described above.

This only happens whenever I create a thread and run the app using DSF-GDB in Eclipse. Other than that, the application runs fine stand-alone (without Eclipse) with the new thread.

Attached is a file containing a snapshot of the Eclipse debugger.

Seems to be something to do with a thread/debugger/eclipse interaction. (really narrows it down, huh? :-)

What am I missing? I'd appreciate any help if you can.

/carl h.
Vladimir Prus
2009-12-11 06:12:40 UTC
Permalink
Post by Heyendal, Carl
My Linux based embedded C application was a single process with no threads and it ran fine within Eclipse using DSF-GDB.
However I needed to create a new thread in my application running on my remote target that did a bit of work on the side, which I implemented.
But now, whenever I launch the application in Eclipse, I can step through the main parent thread without any problem, until I get to the point where I create a new thread. At that point, once the new thread is created, everything stops working, and the only thread that's running gets suspended. I can't even examine the return code from the call to pthread_create()!
I tried setting a breakpoint in the new thread but it never makes it to the breakpoint, ending with the same result described above.
This only happens whenever I create a thread and run the app using DSF-GDB in Eclipse. Other than that, the application runs fine stand-alone (without Eclipse) with the new thread.
Attached is a file containing a snapshot of the Eclipse debugger.
Seems to be something to do with a thread/debugger/eclipse interaction. (really narrows it down, huh? :-)
What am I missing? I'd appreciate any help if you can.
Your screenshot has a message in red, in console, and that message basically say
"nothing is gonna work from now on". It's most likely that you did not configure
your debug configuration to properly find shared libraries, on the "Shared Libraries"
tab.

- Volodya
Heyendal, Carl
2009-12-11 21:02:03 UTC
Permalink
Yes but I have already seen this message before when everything worked fine without the new thread. So is this really
that kind of a message or just red herring?

Maybe I'll assume the message is legit now because I'm creating a thread so I'll get rid of it and see.

thanx
/carl h.

-----Original Message-----
From: cdt-debug-dev-bounces-j9T/***@public.gmane.org [mailto:cdt-debug-dev-***@eclipse.org] On Behalf Of Vladimir Prus
Sent: Friday, December 11, 2009 1:13 AM
To: cdt-debug-dev-j9T/***@public.gmane.org
Subject: Re: [cdt-debug-dev] new thread kills eclipse
Post by Heyendal, Carl
My Linux based embedded C application was a single process with no threads and it ran fine within Eclipse using DSF-GDB.
However I needed to create a new thread in my application running on my remote target that did a bit of work on the side, which I implemented.
But now, whenever I launch the application in Eclipse, I can step through the main parent thread without any problem, until I get to the point where I create a new thread. At that point, once the new thread is created, everything stops working, and the only thread that's running gets suspended. I can't even examine the return code from the call to pthread_create()!
I tried setting a breakpoint in the new thread but it never makes it to the breakpoint, ending with the same result described above.
This only happens whenever I create a thread and run the app using DSF-GDB in Eclipse. Other than that, the application runs fine stand-alone (without Eclipse) with the new thread.
Attached is a file containing a snapshot of the Eclipse debugger.
Seems to be something to do with a thread/debugger/eclipse
interaction. (really narrows it down, huh? :-)
What am I missing? I'd appreciate any help if you can.
Your screenshot has a message in red, in console, and that message basically say "nothing is gonna work from now on". It's most likely that you did not configure your debug configuration to properly find shared libraries, on the "Shared Libraries"
tab.

- Volodya

Loading...