This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Powerpc and software single step
On Tue, Aug 19, 2003 at 10:57:29PM -0400, Jimi Xenidis wrote:
> >>>>> "DJ" == Daniel Jacobowitz <drow@mvista.com> writes:
>
> DJ> On Tue, Aug 19, 2003 at 06:32:31PM -0400, Jimi Xenidis wrote:
> >> This sanity check is wierd, does it expect PT_STEP to be defined _and_
> >> not supported?
>
> DJ> It does happen. MIPS/Linux does that sometimes, so does anything else
> DJ> where PT_STEP is restricted or broken.
>
> heh, go figure.
>
> >> My first attempt was to drag ppc/rs6000 into the gdbarch world and
> >> drop the #defines all together. However, the test (_P) rotuine tests
> >> a function pointer and it was not readily apparent how to have a set
> >> command set a function pointer or actually run code to do so. Perhaps
> >> pairing it with a gdbarch boolean?
>
> DJ> I'm not sure what you mean.
> To quickly re-cap, I wanted to be able to switch the single step mode
> dynamically by creating a "set" command. Unfortunately:
>
> int
> gdbarch_software_single_step_p (struct gdbarch *gdbarch)
> {
> gdb_assert (gdbarch != NULL);
> return gdbarch->software_single_step != NULL;
> }
>
> I do not see a way to assign this function pointer off of the set
> command, unless there is a some trick I did not see.
> maybe we could fix this with more code, but sadly I'm limited in my
> ability to push out patches under the current circumstances.
>
> But all of these solutions are not the real one which probably takes
> more commitment then available (at least from me at the moment ;-)
set_gdbarch_software_single_step? You couldn't do it
architecture-independently, perhaps.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer