Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: John Williams <jwilliams@itee.uq.edu.au>
To: gdb@sourceware.org
Subject: gdbserver+pthreads requires PTHREACE_SINGLESTEP?
Date: Mon, 30 Jan 2006 08:22:00 -0000	[thread overview]
Message-ID: <43DD4DF8.2010203@itee.uq.edu.au> (raw)

Hello,

Am I correct in thinking that the thread debug support in gdbserver 
requires the kernel to implement the PTRACE_SINGLESTEP functionality?

I'm slowly coming to grips with the thread debug mechanism - it seems 
that gdbserver inserts "private" breakpoints in the child's thread 
library (e.g. create_thread) - when these breakpoints trigger, gdbserver 
handles them itself as thread events, rather than passing them off to gdb.

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)?

Since it's not really singlestep I need, but rather "continue and 
reinsert", I wonder if that might be a simpler mechanism to implement?

Thanks for any insights,

John



             reply	other threads:[~2006-01-29 23:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-30  8:22 John Williams [this message]
2006-01-30  9:00 ` 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=43DD4DF8.2010203@itee.uq.edu.au \
    --to=jwilliams@itee.uq.edu.au \
    --cc=gdb@sourceware.org \
    /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