This is the mail archive of the rda@sources.redhat.com mailing list for the rda 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]

Re: Help required on rda [FRV]


Vinu Dev <vinudev@gmail.com> writes:
> Can u pls help me as 
> 1) Who issues these PTRACE_PEEKTEXT-1.

These are probably the calls to ptrace-target.c:ps_pdread made by
libthread_db.  Try setting a breakpoint there.

> 2) What cause this (why a large quantity of PTRACE_PEEKTEXT-1 issued to
>    target program from rda)

As I said before:

> > 4-5 seconds sounds about right.  If I remember correctly, it's due to
> > libthread_db's need to read huge amounts of memory from the program
> > being debugged each time it stops.

Just to make sure you have the big picture: libthread_db.so is not the
thread library.  It is a library that *debuggers* link with to debug
multi-threaded programs.  The idea is that the debugger calls
functions in libthread_db to do things like get the list of all
threads, read a thread's registers, and so on.  libthread_db itself
calls back to functions in the debugger whose names start with 'ps_'
to do the actual reading and writing of memory, and access lightweight
processes' registers.

In theory, this allows the debugger to be ignorant of the details of
the thread library: libthread_db.so and libpthread.so are always
distributed as a pair, so as long as libthread_db.so is working, the
thread implementation could change without affecting the debugger.

In practice, thread implementations have gotten less complicated than
they used to be, and with NPTL libthread_db.so isn't worth the added
complexity.


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