This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Some ideas of displaced step function


On Friday 03 October 2008 19:28:31, Michael Snyder wrote:
> Pedro Alves wrote:
> > On Friday 03 October 2008 01:31:54, Michael Snyder wrote:
> > 
> >> Why are we using displaced-stepping when we're not async?
> > 
> > s/async/non-stop mode/g.  All-stop + async doesn't need
> > it either.  This feature was added for non-stop, as a way to
> > avoid lifting breakpoints from the inferior when stepping over
> > a breakpoint, otherwise, other running threads could miss them.
> > 

> > No other reason to have it always on other than for more
> > exposure, I guess.  Time to pull the plug?
> > 
> > I'd still like to have a way to enable displaced-stepping
> > in all-stop mode, as it's very useful for testing.
> 
> I certainly don't mind 'enable', but maybe it doesn't
> need to always be enabled by default?
> 

There, you lost me.  :-)  Perhaps we're saying the same thing.  What
I meant was that sneaking a `&& non_stop' here:

 static int
 use_displaced_stepping (struct gdbarch *gdbarch)
 {
   return (can_use_displaced_stepping
+           && non_stop
           && gdbarch_displaced_step_copy_insn_p (gdbarch));
 }

... would make us use displaced stepping only in non-stop mode,
so the problems we've been hearing about are sidestepped.  This
puts the onus of making displaced stepping work on
targets/systems/modes that need it.

But, then one can't use displaced stepping in all-stop mode, without
hacking the code, that is.  It feels like if we make this change, we
should either give new meaning to the current
`maint set can-use-displaced-stepping' command, replace it with
some other command, or plainly add a new command in addition to
the current.

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]