This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libthread_db.so question


Hi,

Is it possible to use the libthread_db.so library functions to debug a
remote process and it's threads?  I.e. must the client of
libthread_db.so be running on the same host as the target process
itself?

The debugger I work on currently controls remote processes via a
ptrace-based remote debug server.   It seems that with the coming of
RedHat 9.0 the old linuxthreads interface that we are currently using is
deprecated, forcing us to move to using libthread_db.so instead.  The
debugger can debug a distributed (MPI-based) multi-threaded
(linuxthread-based OpenMP) program.  It uses a remote debug server to
control and inspect each remote node.  Must libthread_db.so be loaded by
each remote debug server?  or can the debugger load a single
libthread_db.so and use it's facilities to control the remote processes
(if a proc_service interface is implemented to them using the low level
(remote) ptrace-based interface of the remote debug server).

>From reading the man pages on libthread_db.so:

"libthread_db relies on an "agent thread" in the target process for some
of its operations. The "agent thread" is a system thread started when
libthread_db attaches to a process through td_ta_new(3T) ."

Is an agent thread created for each target process?  Is the agent thread
a child thread of each target process?

I realize this is a specialized question.  If there is a better place to
direct this question, please let me know.

Thanks for your time,
--Pete Huerter.


--
Pete Huerter -- Software Engineer
STMicroelectronics, AST Portland Lab
Formerly The Portland Group, Inc.
Phone: (503) 682-2806
Fax:   (503) 682-2637




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]