From: Vara Prasad <prasadav@us.ibm.com>
To: "Stone, Joshua I" <joshua.i.stone@intel.com>
Cc: "Frank Ch. Eigler" <fche@redhat.com>, systemtap@sources.redhat.com
Subject: Re: user kprobes vs debuggers
Date: Fri, 03 Feb 2006 18:39:00 -0000 [thread overview]
Message-ID: <43E3A33F.1050005@us.ibm.com> (raw)
In-Reply-To: <CBDB88BFD06F7F408399DBCF8776B3DC064BEC87@scsmsx403.amr.corp.intel.com>
Stone, Joshua I wrote:
>Vara Prasad wrote:
>
>
> [...]
>
>Who will single-step the original instruction in this scenario? It
>seems that the only feasible answer is that the debugger will do it.
>But, in the case of a probe inserted sooner than the debugger
>breakpoint, the debugger doesn't know the original instruction. And if
>the debugger removes its breakpoint, the probe-management would have to
>start single-stepping.
>
>
Let us say if there is no user space probes involved debugger remembers
the original instruction before replacing it is with breakpoint
instruction. It single steps the original instruction that is stored in
the userspace. Let us say if there is no debugger and there is only
userspace probes userspace pobes does the same single stepping but in
the kernel space. Another important distinction to remember here is each
of them have their own handlers to run when the break point is hit.
Based on the above background there is a global registry of the
breakpoints in the kernel that is only used to notify who all would like
to handle this breakpoint but it is up to each of the owners to run
their own handlers and as well as handle single stepping.
One complication in this problems is the applications that have compiled
breakpoint instructions, but i am not sure how common that occurrence is
and like i mentioned in my earlier reply we may be able to handle them
as well.
Does this answer your question?
>Someone mentioned solving this by presenting the debugger with a
>virtualized address-space (where the probe doesn't exist). This may be
>possible, but in the keep-it-simple spirit I think it would be best to
>just reject the second-comer. At least with a common interface we can
>detect the conflict, so I think it's fine to just disallow the
>situation.
>
>
I think it would have been o.k to disallow but due to common uses like
strace people might object to userspace probes feature.
>
>Josh
>
>
>
next prev parent reply other threads:[~2006-02-03 18:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-03 17:43 Stone, Joshua I
2006-02-03 18:39 ` Vara Prasad [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-02-03 20:29 Stone, Joshua I
2006-02-03 21:08 ` James Dickens
2006-02-03 22:00 ` Vara Prasad
2006-02-02 19:22 Frank Ch. Eigler
2006-02-03 6:37 ` Vara Prasad
2006-02-03 8:04 ` Mathieu Lacage
2006-02-03 16:12 ` Vara Prasad
2006-02-06 9:58 ` Ananth N Mavinakayanahalli
2006-02-09 13:59 ` Richard J Moore
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=43E3A33F.1050005@us.ibm.com \
--to=prasadav@us.ibm.com \
--cc=fche@redhat.com \
--cc=joshua.i.stone@intel.com \
--cc=systemtap@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).