This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] Fix PowerPC displaced stepping regression
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: pedro at codesourcery dot com (Pedro Alves)
- Cc: gdb-patches at sourceware dot org, julian at codesourcery dot com (Julian Brown), drow at false dot org (Daniel Jacobowitz)
- Date: Mon, 28 Sep 2009 19:39:01 +0200 (CEST)
- Subject: Re: [rfc] Fix PowerPC displaced stepping regression
Pedro Alves wrote:
> At the points where we decide to use displaced stepping because
> software single-stepping doesn't work with multiple pending
> simultaneous requests. So, adding a non_stop check there in
> front of software_single_step_p,
>
> if (use_displaced_stepping (gdbarch)
> && (tp->trap_expected
> - || (step && gdbarch_software_single_step_p (gdbarch)))
> + || (non_stop && step && gdbarch_software_single_step_p (gdbarch)))
>
>
> ... and in maybe_software_singlestep:
>
> - if (use_displaced_stepping (gdbarch))
> - if (non_stop)
> hw_step = 0;
>
> (or make resume clear `step' if "non_stop && step && gdbarch_software_single_step_p (gdbarch))"
> so to we'd not reach maybe_software_singlestep at all.
Ah, now I've got it, thanks!
> But, let's ignore this. The only benefit would be for
> all-stop + displaced stepping=on to not trigger displaced
> stepping all the way.
Agreed.
> > > Did you consider making the gdbarch_displaced_step_copy_insn
> > > callback itself return that it expects the target to be
> > > continued instead of stepped?
> >
> > Yes, but this would have required changes to the existing gdbarch
> > interface that would have meant updating all existing users; and
> > I wanted to produce a patch that doesn't touch any platform I
> > cannot test at this point ...
> >
> > In any case, the two interfaces should be pretty much identical:
> > a target can simply set a flag in its "closure" and return this
> > flag from the displaced_step_hw_singlestep routine. That's why
> > I'm passing the closure in, even though PPC doesn't need it ...
>
> True. I like that!
OK, good :-)
Thanks,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com