LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 06-29-2007, 01:01 PM   #1
tashtego
LQ Newbie
 
Registered: Mar 2007
Posts: 5

Rep: Reputation: 0
gdb - Cannot find new threads: generic error


Hi, I'm using gdb 6.6 on a 2.6.20 kernel gentoo installation. I get this generic error when I try to run my c++ program (built with gcc 4.1.1-r3) and I'm not sure how to proceed to figure out what is going on. Any sugggestions would be welcome.
 
Old 07-01-2007, 01:42 PM   #2
knobby67
Member
 
Registered: Mar 2006
Posts: 546

Rep: Reputation: 42
Have you
1 made sure you've installed a version of GDB with thread support?
2 if you are what version of the kernel are you running, has it or GDB got a compatabillity problems? Check notes, this is usually the case with this error. There are know errors with some 2.6's and GDB
3 Have you tried with a front end? DDD or insight. Incase you are not running a needed feature? Look for thread support in drop down boxes on these two.
4. This problem can also arise if you build your own kernel and set things up wrong?
 
Old 07-01-2007, 06:06 PM   #3
tashtego
LQ Newbie
 
Registered: Mar 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Hi, thanks for the suggestions...

I have thread support built in to gdb and it works. I tried debugging a different program and it worked fine. I'm just using gdb, no gui wrapper.

The errata list for 6.6 doesn't mention anything about having a problem with 2.6.20 kernels. Is there canonical source for capturing all errata for past revs or is browsing the separate lists required? How do we know when issues are fixed. Is the mailing lists and the archives the most complete and easiest to use resource for this kind of info?

I did build this kernel myself, I guess I could have done something to cause this but I have no reason to suspect any particular option. All I did was choose various options with menuconfig and build. I didn't modify the kernel source. A further complication is that this set up is running as a virtual machine in a vmware session.

I think I need to learn how to debug gdb itself.
 
Old 10-27-2010, 07:05 PM   #4
Rod3775
Member
 
Registered: May 2008
Location: Washington State
Distribution: Slackware-14.1
Posts: 34
Blog Entries: 8

Rep: Reputation: 0
[SOLVED] gdb/Xwindows hangs debugging apps with threads.

this generic error seems to occur in many applications that use "stealth threads" - e.g. GdkPixbuf, libxml2, or other libraries. pkg-config for some/all of these libraries do not include "-pthread" as a dependency. The program will run, but seriously hangs the system when you try to debug it. The solution is to include "-pthread" in LDFLAGS in your Makefile for the application. The problem remains in gdb-7.1, since it isn't really a gdb problem, although gdb probably should die more gracefully! This workaround was found in this thread from opensuse: http://forums.opensuse.org/english/d...plication.html. My application is unrelated to theirs, but the same fix worked.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why can't I find a Generic PCL printer driver on CUPS rickh Linux - Hardware 1 05-05-2006 09:20 AM
Can't find generic postscript drivers on cups rickh Linux - Hardware 1 04-18-2006 08:06 AM
gdb breakpoints cant find source file AM1SHFURN1TURE Programming 4 01-14-2006 02:10 PM
"Find all threads started by user" not showing all threads Nylex LQ Suggestions & Feedback 3 12-28-2005 09:28 PM
can't find source files / line numbers with gdb dnijaguar Linux - Software 0 07-14-2003 02:30 AM


All times are GMT -5. The time now is 12:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration