Date: Fri, 15 Jul 2011 10:13:13 +0800 From: David Xu <davidxu@freebsd.org> To: John Schumacher <schumjs@gmail.com> Cc: freebsd-threads@freebsd.org Subject: Re: dlopen fails, dynamically linking libthread_db.so fails (gdbserver) Message-ID: <4E1FA239.2050200@freebsd.org> In-Reply-To: <CAJoUm=F8b6pH5eWtmQR_Nw404mKt3PChLCXJEUYkVhc45RyWKQ@mail.gmail.com> References: <CAJoUm=F8b6pH5eWtmQR_Nw404mKt3PChLCXJEUYkVhc45RyWKQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2011/07/14 23:19, John Schumacher wrote: > Hello all, > I'm having an issue in the process of making gdbserver work properly for > multi-threaded applications on FreeBSD. > Specifically, dynamically linking (through dlopen) the libthread_db.so library > seems to be an issue, for an unknown reason. > dlopen is a function in fbsd-threads called during init, on the > libthread_db.so library. In my implementation I get returned the following: > > dlopen failed: /usr/lib/libthread_db.so: Undefined symbol >> "ps_pglobal_lookup". >> [GDB will not be able to debug user-mode threads: (null)] > > > (dlerror was emptied in the first statement, because of my changes- the null > should be replaced with the Undefined symbol jargon) > > Also, libthread_db.so is soft-linked to the relevant and existing libraries > (in my case libthread_db.so.3). > > A quick google shows that this message is present in the beginning of the > session of those running KGDB- even in normal operation! Has this always > failed? This basically means that all attempts to send thread_db calls > regarding threads to the kernel will fail. Is this an issue internal to > FreeBSD, or is there some way a developer can add these symbols to the > library? > > The libthread_db needs loader to provide proc service, see /usr/include/proc_service.h.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E1FA239.2050200>