From: "Tim Michals" <tcmichals@verizon.net>
To: <gdb@sourceware.org>
Subject: RE: debugging threads
Date: Tue, 02 Oct 2007 02:00:00 -0000 [thread overview]
Message-ID: <000a01c80497$f79af6c0$e6d0e440$@net> (raw)
In-Reply-To: <000601c8030d$fb92a8d0$f2b7fa70$@net>
I've narrowed the issue down it to using -static gcc option version shared
libraries
For example:
Ok, this might be a user error, but... I did exactly what you did and yes it
worked. I'm using the latest and greatest from boost cvs. So mine is in
/usr/local/lib... So using that library and changing the path ...
[tcmichals@localhost examples]$ g++ -o helloworld helloworld.cpp -Wall
-ggdb2 -
pthread -L/usr/local/lib -lboost_thread-gcc41-mt-d
[tcmichals@localhost examples]$ export LD_LIBRARY_PATH=/usr/local/lib
[tcmichals@localhost examples]$ gdb helloworld
GNU gdb Red Hat Linux (6.6-15.fc7rh)
Copyright (C) 2006 Free Software Foundation, Inc.
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) b main
Breakpoint 1 at 0x8048a78: file helloworld.cpp, line 17.
(gdb) start
Breakpoint 2 at 0x8048a78: file helloworld.cpp, line 17.
Starting program: /home/tcmichals/examples/helloworld
[Thread debugging using libthread_db enabled]
[New Thread -1209014576 (LWP 2826)]
[Switching to Thread -1209014576 (LWP 2826)]
Breakpoint 1, main () at helloworld.cpp:17
17 boost::thread thrd(&helloworld);
(gdb)
It worked!!!
ok if I do the following:
The program is running. Exit anyway? (y or n) y
[tcmichals@localhost examples]$ g++ -static -o helloworld helloworld.cpp
-Wall
-ggdb2 -pthread -L/usr/local/lib -lboost_thread-gcc41-mt-d
[tcmichals@localhost examples]$
[tcmichals@localhost examples]$ ls /usr/local/lib/libboost_thread*
/usr/local/lib/libboost_thread-gcc41-mt-1_35.a
/usr/local/lib/libboost_thread-gcc41-mt-1_35.so
/usr/local/lib/libboost_thread-gcc41-mt-1_35.so.1.35.0
/usr/local/lib/libboost_thread-gcc41-mt.a
/usr/local/lib/libboost_thread-gcc41-mt-d-1_35.a
/usr/local/lib/libboost_thread-gcc41-mt-d-1_35.so
/usr/local/lib/libboost_thread-gcc41-mt-d-1_35.so.1.35.0
/usr/local/lib/libboost_thread-gcc41-mt-d.a
/usr/local/lib/libboost_thread-gcc41-mt-d.so
/usr/local/lib/libboost_thread-gcc41-mt.so
[tcmichals@localhost examples]$ gdb helloworld
GNU gdb Red Hat Linux (6.6-15.fc7rh)
Copyright (C) 2006 Free Software Foundation, Inc.
This GDB was configured as "i386-redhat-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) b main
Breakpoint 1 at 0x80482ac: file helloworld.cpp, line 17.
(gdb) start
Breakpoint 2 at 0x80482ac: file helloworld.cpp, line 17.
Starting program: /home/tcmichals/examples/helloworld
[Thread debugging using libthread_db enabled]
Cannot find new threads: generic error
(gdb)
Then I try to exit gdb and it locks up... But I thought -static links the
static library?
well, now atleast I know what the difference is and the issue, but don't
know why.
next prev parent reply other threads:[~2007-10-02 2:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-30 3:21 Tim Michals
2007-09-30 3:57 ` Daniel Jacobowitz
2007-10-02 2:00 ` Tim Michals [this message]
2007-10-02 2:46 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000a01c80497$f79af6c0$e6d0e440$@net' \
--to=tcmichals@verizon.net \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox