From: Daniel Jacobowitz <drow@false.org>
To: Kevin Pouget <kevin.pouget@etu.u-bordeaux1.fr>
Cc: gdb@sources.redhat.com
Subject: Re: Modification to support hybrid thread schedulers
Date: Thu, 16 Jul 2009 12:03:00 -0000 [thread overview]
Message-ID: <20090716120347.GA10752@caradoc.them.org> (raw)
In-Reply-To: <57e4a4fe0907160455q3ec0b66fl722f5f85a48d6dab@mail.gmail.com>
On Thu, Jul 16, 2009 at 01:55:03PM +0200, Kevin Pouget wrote:
> a little precision regarding this point, when you switch to a thread
> and ask for its backtrace, two situations may appear :
>
> the thread is currently running on a LWP
> the thread is blocked in the scheduler
>
> in the first case, GDB knows how to read the registers (via the
> proc-service interface), but in the second, they must be read in the
> memory (eg, in the jmp_buffer or in the mcontext_t)
> In the case of a kernel scheduler (NPTL), only the first option
> exists, and that is where the problems start. GDB/Linux short-cuts the
> Thread_db module, and read directly the registers on the LWP. It works
> correctly while the NPTL is used, but screws up the debugging of
> user/hybrid libraries ... GDB/Solaris doesn't have this behavior, as
> Solaris thread were hybrid until a recent time
Older versions of GDB supported the full range of libthread_db
operations on Linux. But there were too many problems with
libthread_db, and bugs found in it, for us to continue. The facts are
that linux-thread-db.c is specifically for GLIBC (and works well
enough for uClibc, most of the time). It's just got an inappropriate
name.
One problem was that GLIBC was rarely updated for new registers
made available by the kernel.
You can find the patches in the list archives or CVS history that
removed the operations you're adding. That may be helpful.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2009-07-16 12:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <57e4a4fe0907160452t28770d13n50c19c8ebe5e034c@mail.gmail.com>
2009-07-16 11:55 ` Kevin Pouget
2009-07-16 12:03 ` Daniel Jacobowitz [this message]
2009-07-17 11:23 ` Kevin Pouget
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=20090716120347.GA10752@caradoc.them.org \
--to=drow@false.org \
--cc=gdb@sources.redhat.com \
--cc=kevin.pouget@etu.u-bordeaux1.fr \
/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