This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: gdb-6.0/gdb/gdbserver/target.c::set_desired_inferior()
On Fri, Feb 27, 2004 at 12:12:08PM -0800, Albert Ho wrote:
> I am trying to decide whether the problem is in the thread library or gdb.
> 4 facts:
> 1) The program runs fine on its own.
> 2) gdbserver can debug the program if let the process starts first
> (hence loading all the library), then use --attach.
> 3) Run gdb gdbserver, then start the program in gdbserver also works.
> 4) Run gdbserver alone with the program cause the program's new thread
> died, I suspect it affects gdbserver to segfault too.
>
> I'll get the pthread symbol to look further.
>
> One last question. Does the host suppose to load exactly the same
> library as the target? I see the host loads libthread.so.1, but the
> target's core has libthread_db.so.1.
The host should load a copy of libpthread.so.1 which matches the copy
loaded by the target application (NOT gdbserver, gdbserver will load
libthread_db.so.1).
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer