From: Daniel Jacobowitz <drow@false.org>
To: Daniel THOMPSON <daniel.thompson@st.com>
Cc: gdb@sources.redhat.com
Subject: Re: gdbserver, NPTL pthreads and PEEKUSER based targets
Date: Thu, 31 Mar 2005 15:49:00 -0000 [thread overview]
Message-ID: <20050331155058.GA5547@nevyn.them.org> (raw)
In-Reply-To: <424C1A88.3000701@st.com>
On Thu, Mar 31, 2005 at 04:43:04PM +0100, Daniel THOMPSON wrote:
> Hi folks
>
> I am trying to port gdbserver to work on NPTL kernels on an architecture
> that fetchs registers using PTRACE_PEEKUSER rather than PTRACE_GETREGS
> (in my specific case the SH4).
>
> I have written a hacky but working implementation of ps_lgetregs(). This
> is sufficient to get through he shared library loading without spitting
> out invalid data packets and works well enough for the threads_db code
> to correctly identify the root thread triplet (pid, lwp, tid).
You should be able to provide gregset information even if ptrace can't
fetch them; the ps_lgetregs implementation uses the same machinery, but
it doesn't require the ptrace support.
> Unfortunately the gdbserver bails out inside pthread_create() with an
> SIGTRAP signal.
That will be an unrelated problem. It sounds like you may need a
reinsert_addr method.
> The other oddity I noted is that where the x86 does a
> PTRACE_ATTACH to LWP pid+4 inside pthread_create(), the SH4 is attaching
> to LWP pid+1 which does not seem right as this would not be the LWP of
> the spawned thread.
Why wouldn't it be?
--
Daniel Jacobowitz
CodeSourcery, LLC
next prev parent reply other threads:[~2005-03-31 15:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-31 15:43 Daniel THOMPSON
2005-03-31 15:49 ` Daniel Jacobowitz [this message]
2005-04-01 8:14 ` Daniel THOMPSON
2005-04-01 14:08 ` Daniel Jacobowitz
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=20050331155058.GA5547@nevyn.them.org \
--to=drow@false.org \
--cc=daniel.thompson@st.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