Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: Powerpc and software single step
Date: Thu, 21 Aug 2003 14:01:00 -0000	[thread overview]
Message-ID: <3F44D0B1.8010009@redhat.com> (raw)
In-Reply-To: <20030820023335.GA1148@nevyn.them.org>

> On Tue, Aug 19, 2003 at 10:30:20PM -0400, Andrew Cagney wrote:
> 
>> 
> 
>> >Could we do this slightly differently?  SOFTWARE_SINGLE_STEP_P is used
>> >in two non-platform-specific files: infptrace.c for a sanity check, and
>> >infrun.c.  In infrun, the only line which matters for this case is in
>> >resume:
>> >    if (SOFTWARE_SINGLE_STEP_P () && step)
>> >
>> >Why not add a hook to check there which lets the user use software
>> >single step?  It'll require playing with the target macros; we'd need
>> >something like:
>> >  SOFTWARE_SINGLE_STEP - perform software single step
>> >  SOFTWARE_SINGLE_STEP_P - SOFTWARE_SINGLE_STEP available
>> >  SOFTWARE_SINGLE_STEP_ONLY_P - no hardware singlestep available
>> >    (check that in infptrace instead of SOFTWARE_SINGLE_STEP_P?)
>> >
>> >I've wanted to flip back and forth at runtime before.
> 
>> 
>> See:  Cleanup software single step.
>> http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=120
>> (but don't take the suggested solution literally).
>> 
>> I think kevin was playing with it (?) - search the mail archives.  This 
>> needs to be fixed - I don't think a workaround is acceptable.
> 
> 
> I _think_ that's a different problem...

It's all part of a `software single step is sideways / backwards 
problem'.  Missing from the PR are the gdbarch.sh comments (and 
references to earlier discussion):

# FIXME/cagney/2001-01-18: This should be split in two.  A target method 
that indicates if
# the target needs software single step.  An ISA method to implement it.
#
# FIXME/cagney/2001-01-18: This should be replaced with something that 
inserts breakpoints
# using the breakpoint system instead of blatting memory directly (as 
with rs6000).
#
# FIXME/cagney/2001-01-18: The logic is backwards.  It should be asking 
if the target can
# single step.  If not, then implement single step using breakpoints.

"infrun.c" should make its decision based on:

- user selectable single step (yes, no, auto -> auto boolean variable) 
(new to this thread)
- target selectable single step
- architecture implement's software single step (which needs a new 
mechanism)

Adding a user command would side step the middle part - target vector 
addition to indicate that the target supports software single step - but 
would at least provide a workaround.

> In any case it's definitely a real problem.  See the post I made a few
> days ago about a thread debugging problem which causes single steps to
> turn into continues.

Andrew



      reply	other threads:[~2003-08-21 14:01 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-12 22:31 Jimi Xenidis
2003-08-19 17:55 ` Kevin Buettner
2003-08-19 19:05   ` Jimi Xenidis
2003-08-19 19:13   ` Daniel Jacobowitz
2003-08-19 22:32     ` Jimi Xenidis
2003-08-20  2:30       ` Daniel Jacobowitz
2003-08-20  2:57         ` Jimi Xenidis
2003-08-20  3:09           ` Daniel Jacobowitz
2003-08-20  3:21             ` Jimi Xenidis
2003-08-20 13:07               ` Daniel Jacobowitz
2003-08-20 13:54                 ` Jimi Xenidis
2003-08-20 15:51             ` Andrew Cagney
2003-08-20 16:02               ` Jimi Xenidis
2003-08-21  3:48                 ` Andrew Cagney
2003-08-22 13:17                   ` Jimi Xenidis
2003-08-22 15:54                     ` Andrew Cagney
2003-08-22 17:32                       ` Jimi Xenidis
2003-08-22 18:20                         ` Andrew Cagney
2003-09-08 18:58                           ` Patch to eliminate SOFTWARE_SINGLE_STEP from ppc Was: " Jimi Xenidis
2003-09-08 19:00                             ` Daniel Jacobowitz
2003-09-08 20:17                               ` Jimi Xenidis
2003-09-08 20:20                                 ` Daniel Jacobowitz
2003-09-08 21:22                                   ` Jimi Xenidis
2003-09-08 22:01                                     ` Kevin Buettner
2003-09-09 10:30                                       ` Jimi Xenidis
2003-09-09 15:30                                       ` AHAH! " Jimi Xenidis
2003-09-09 16:15                                         ` Kevin Buettner
2003-09-09 17:01                                           ` Jimi Xenidis
2003-09-09 17:55                                             ` Kevin Buettner
2003-09-09 22:01                                               ` PATCH: Re: AHAH! Re: Patch to eliminate SOFTWARE_SINGLE_STEP Jimi Xenidis
2003-09-10  1:24                                                 ` Kevin Buettner
2003-10-10  2:40                                                   ` Andrew Cagney
2003-08-20  2:30     ` Powerpc and software single step Andrew Cagney
2003-08-20  2:33       ` Daniel Jacobowitz
2003-08-21 14:01         ` Andrew Cagney [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=3F44D0B1.8010009@redhat.com \
    --to=ac131313@redhat.com \
    --cc=drow@mvista.com \
    --cc=gdb-patches@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