From: "Dmitry S. Vasilchenko" <newdimm@gmail.com>
To: gdb@sources.redhat.com
Subject: ppc64 gdbserver NPTL problem
Date: Sun, 16 Oct 2005 15:00:00 -0000 [thread overview]
Message-ID: <e022f2360510160800x57d95288yeec796a2d21a7ffa@mail.gmail.com> (raw)
Hello!
I have met some problems with gdbserver and multithread debugging.
The problem is that on ppc64 td_ta_event_addr from glibc returns the
pointer to function descriptor, not the address of the function. As a
result, gdbserver installs breakpoint at the memory address in .opd
section, not at the function glibs expects. So gdbserver will never
receive information about new threads creation on ppc64.
It is easy to fix, but I am not sure, maybe this should be fixed in
glibc. Your thoughts?
from gdb/gdbserver/thread-tb.c:
/* ************************************ */
static int
thread_db_enable_reporting ()
{
...
/* Get address for thread creation breakpoint. */
err = td_ta_event_addr (thread_agent, TD_CREATE, ¬ify);
...
set_breakpoint_at ((CORE_ADDR) (unsigned long) notify.u.bptaddr,
thread_db_create_event);
From glibc, nptl_db/td_ta_event_addr.c:
/* ************************************ */
td_err_e
td_ta_event_addr (const td_thragent_t *ta_arg,
td_event_e event, td_notify_t *addr)
{
...
err = DB_GET_SYMBOL (taddr, ta, __nptl_create_event);
...
addr->u.bptaddr = taddr;
--
Best regards,
Dmitry Vasilchenko
next reply other threads:[~2005-10-16 15:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-16 15:00 Dmitry S. Vasilchenko [this message]
2005-10-16 16:58 ` Andreas Schwab
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=e022f2360510160800x57d95288yeec796a2d21a7ffa@mail.gmail.com \
--to=newdimm@gmail.com \
--cc=gdb@sources.redhat.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