From: Daniel Jacobowitz <drow@false.org>
To: John Williams <jwilliams@itee.uq.edu.au>
Cc: gdb@sourceware.org
Subject: Re: gdbserver+pthreads requires PTHREACE_SINGLESTEP?
Date: Mon, 30 Jan 2006 09:00:00 -0000 [thread overview]
Message-ID: <20060129232424.GA25558@nevyn.them.org> (raw)
In-Reply-To: <43DD4DF8.2010203@itee.uq.edu.au>
On Mon, Jan 30, 2006 at 09:21:28AM +1000, John Williams wrote:
> Hello,
>
> Am I correct in thinking that the thread debug support in gdbserver
> requires the kernel to implement the PTRACE_SINGLESTEP functionality?
No, it does not. Please look at the reinsert_addr methods, for
instance on MIPS.
> The singlestep seems to be necessary because when, say , the
> create_thread BP is hit, gdbserver wants to step over the first
> instruction, reinsert the breakpoint, then continue as before.
>
> This creates a bit of a bind for me, since the CPU I'm targetting has no
> HW single step capability - ptrace(PTRACE_SINGLESTEP) returns -EIO.
>
> Is there a workaround for non-singlestep targets, short of doing a full
> kernel SW implementation of single stepping (yuck)?
We can set a temporary breakpoint at the return address. In general,
that is not viable, but we know that these particular breakpoints are
(A) trivial empty functions, and (B) called by a single thread under
a serializing lock.
--
Daniel Jacobowitz
CodeSourcery
prev parent reply other threads:[~2006-01-29 23:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-30 8:22 John Williams
2006-01-30 9:00 ` Daniel Jacobowitz [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=20060129232424.GA25558@nevyn.them.org \
--to=drow@false.org \
--cc=gdb@sourceware.org \
--cc=jwilliams@itee.uq.edu.au \
/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