public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* implementing stepi
@ 2005-04-29 13:03 Decker, Paul
  2005-04-29 15:15 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Decker, Paul @ 2005-04-29 13:03 UTC (permalink / raw)
  To: gdb



hello everyone,

I have what I believe is a simple question on the implementation of the
stepi feature.  Some processors provide a mechanism to step exactly one
instruction, such as a special bit in a debug control register.  While
other processors don't provide this capability, and to implement a step,
breakpoints must be sprinkled in various places, and a run (to the
breakpoint) performed.   Looking at some of the gdb source, it seems
that stepi is implemented using the breakpoint method.  In doing a port
to my custom processor, is it considered ok to use the hardware method
if available?

Thanks,
Paul.

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

* Re: implementing stepi
  2005-04-29 13:03 implementing stepi Decker, Paul
@ 2005-04-29 15:15 ` Daniel Jacobowitz
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2005-04-29 15:15 UTC (permalink / raw)
  To: Decker, Paul; +Cc: gdb

On Fri, Apr 29, 2005 at 08:49:28AM -0400, Decker, Paul wrote:
> 
> 
> hello everyone,
> 
> I have what I believe is a simple question on the implementation of the
> stepi feature.  Some processors provide a mechanism to step exactly one
> instruction, such as a special bit in a debug control register.  While
> other processors don't provide this capability, and to implement a step,
> breakpoints must be sprinkled in various places, and a run (to the
> breakpoint) performed.   Looking at some of the gdb source, it seems
> that stepi is implemented using the breakpoint method.  In doing a port
> to my custom processor, is it considered ok to use the hardware method
> if available?

No, stepi is implemented in both ways depending on the features of the
target processor.  This is why target_resume takes a "step" argument.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

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

end of thread, other threads:[~2005-04-29 13:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-29 13:03 implementing stepi Decker, Paul
2005-04-29 15:15 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).