From: Pedro Alves <pedro_alves@portugalmail.pt>
To: gdb-patches@sourceware.org
Cc: Joel Brobecker <brobecker@adacore.com>,
Michael Snyder <msnyder@specifix.com>,
Daniel Jacobowitz <drow@false.org>
Subject: Re: [RFA] set/show enable-software-singlestep
Date: Wed, 25 Jun 2008 14:35:00 -0000 [thread overview]
Message-ID: <200806251514.32422.pedro_alves@portugalmail.pt> (raw)
In-Reply-To: <20080625125424.GC3700@adacore.com>
A Wednesday 25 June 2008 13:54:24, Joel Brobecker wrote:
> As discussed previously on gdb@, I think this is a useful feature
> even outside of reverse debugging. Regarding Pedro's question
> about making this feature transparent, that would be tough for
> the example I gave, which is Tru64 - we want to be able to use
> s/w single-step only on programs that use threads. To make it automatic,
> we'd have to reliably detect that a program uses threads. Perhaps
> this is doable, but having the option is an easy first step. Later
> on, we can always extend the option to a tri-state with an "auto"
> setting if it helps...
I'm just curious about it,
I can't figure which targets are used in Tru64. Is it ptrace based?
From your description of not being able to hw singlestep
threaded programs, I take it threads are user space?
I'm thinking what we want is the other way around. Can the
target singlestep itself? Software-singlestepping with breakpoints
is the current fallback mechanism.
Is there a thread_stratum target used to implement the
thread support?
If so, we may be able to add a target_can_singlestep
{ yes/no } property/method and have the thread target return
false, with the default implementation returning "false".
- yes - the target takes care of singlestepping.
for archs that don't have hw singlestep support, but the
target (stub or kernel) handles it. That's what a Tru64
target should report.
- no - even though the the kernel or stub (the debug API, that is)
support single stepping, GDB should fake singlestepping if the
arch doesn't support hw singlestepping. (usually by using
software-singlestepping breakpoints but emulating
instructions is another possibility, possible, e.g., we
don't have to care about simulating exceptions.) This is the
default, and corresponds to what we have currently).
Just a quick thought dump. I'm not against the new knob.
--
Pedro Alves
next prev parent reply other threads:[~2008-06-25 14:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-24 18:43 Michael Snyder
2008-06-24 19:15 ` Daniel Jacobowitz
2008-06-24 19:32 ` Michael Snyder
2008-06-25 13:22 ` Joel Brobecker
2008-06-25 13:43 ` Daniel Jacobowitz
2008-06-25 14:15 ` Joel Brobecker
2008-06-25 14:33 ` Pedro Alves
2008-06-25 15:05 ` Daniel Jacobowitz
2008-06-25 15:38 ` Pedro Alves
[not found] ` <1214862215.3601.1525.camel@localhost.localdomain>
2008-07-10 2:46 ` Michael Snyder
2008-07-10 11:07 ` Pedro Alves
2008-07-10 22:47 ` Daniel Jacobowitz
2008-07-12 2:31 ` Michael Snyder
2008-07-12 2:28 ` Michael Snyder
2008-06-25 14:35 ` Pedro Alves [this message]
2008-06-25 14:42 ` Joel Brobecker
2008-06-24 19:25 ` Eli Zaretskii
2008-06-24 19:34 ` Luis Machado
2008-06-24 20:22 ` Michael Snyder
2008-06-25 1:40 ` Pedro Alves
2008-06-25 6:15 ` Michael Snyder
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=200806251514.32422.pedro_alves@portugalmail.pt \
--to=pedro_alves@portugalmail.pt \
--cc=brobecker@adacore.com \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=msnyder@specifix.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