Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Software-vs-hardware single-step vs. sim/non-sim targets.
@ 2009-12-04 20:58 Dave Korn
  2009-12-04 22:08 ` Daniel Jacobowitz
  2009-12-05 21:12 ` Jakob Engblom
  0 siblings, 2 replies; 5+ messages in thread
From: Dave Korn @ 2009-12-04 20:58 UTC (permalink / raw)
  To: gdb


    Hi all,

  I have a GDB port for a custom target, a sim-based simulator, and a gdbstub
for use on the real thing.  GDB can single step the simulator of course, since
the support for simulated hardware-single-step is built in, but I'd like to
save bytes in the gdbstub by not implementing support for the "s" command.

  So is there a way I can get gdb to use (simulated) hardware single stepping
for the simulator target and software single stepping for the remote target?
And dynamically switch when the target changes?  Or do I have to compile two
different builds, only one of which sets the software single step method in
the gdbarch?

  I'm trying not to do anything too hacky or break the architectural layering
in GDB, but can I perhaps examine the current_target in my arch init function
and frig the value of the single_step hook in the gdbarch that I either lookup
or allocate before returning it?  Does the arch init function always get
called when switching between targets or otherwise altering the layers in the
stratum stack?

    cheers,
      DaveK


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-12-05 21:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-04 20:58 Software-vs-hardware single-step vs. sim/non-sim targets Dave Korn
2009-12-04 22:08 ` Daniel Jacobowitz
2009-12-05  3:50   ` Dave Korn
2009-12-05  5:58     ` Daniel Jacobowitz
2009-12-05 21:12 ` Jakob Engblom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox