public inbox for rda@sourceware.org
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@redhat.com>
To: Vinu Dev <vinudev@gmail.com>
Cc: rda@sources.redhat.com
Subject: Re: Help required on rda [FRV]
Date: Mon, 16 May 2005 21:14:00 -0000	[thread overview]
Message-ID: <vt23bsm6fo2.fsf@zenia.home> (raw)
In-Reply-To: <18aafe4c050515211977e492a@mail.gmail.com>


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.

      reply	other threads:[~2005-05-16 21:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-06 10:58 Vinu Dev
2005-04-06 20:06 ` Jim Blandy
2005-04-07  5:01   ` Vinu Dev
2005-04-27  8:47     ` Jim Blandy
     [not found]       ` <18aafe4c05042803374d2b517b@mail.gmail.com>
2005-05-16  4:20         ` Vinu Dev
2005-05-16 21:14           ` Jim Blandy [this message]

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=vt23bsm6fo2.fsf@zenia.home \
    --to=jimb@redhat.com \
    --cc=rda@sources.redhat.com \
    --cc=vinudev@gmail.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).