* How to determine whether GDB is single-stepping within sim_engine_run() ?
@ 2020-08-09 19:41 William Tambe
2020-08-14 7:41 ` Andrew Burgess
0 siblings, 1 reply; 2+ messages in thread
From: William Tambe @ 2020-08-09 19:41 UTC (permalink / raw)
To: gdb
Within the sim function sim_engine_run(), is there a way to determine
whether GDB is single-stepping (ie: when using commands next step
nexti stepi) ?
I would like to use that capability to have the simulator disable
interrupts while single-stepping.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How to determine whether GDB is single-stepping within sim_engine_run() ?
2020-08-09 19:41 How to determine whether GDB is single-stepping within sim_engine_run() ? William Tambe
@ 2020-08-14 7:41 ` Andrew Burgess
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Burgess @ 2020-08-14 7:41 UTC (permalink / raw)
To: William Tambe; +Cc: gdb
* William Tambe via Gdb <gdb@sourceware.org> [2020-08-09 14:41:34 -0500]:
> Within the sim function sim_engine_run(), is there a way to determine
> whether GDB is single-stepping (ie: when using commands next step
> nexti stepi) ?
>
> I would like to use that capability to have the simulator disable
> interrupts while single-stepping.
GDB drives the simulator through the sim_resume function, of which
there are a couple depending on what type of simulator is
implemented.
The sim_resume method takes a flag to indicate if the simulator should
single step or not, and this flag is used to set state within the
simulator object.
I would suggest figuring out which sim_resume method your simulator
uses, see how the single step flag is used, and then make use of this
same state within your sim_engine_run.
Hope that helps,
Andrew
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-14 7:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-09 19:41 How to determine whether GDB is single-stepping within sim_engine_run() ? William Tambe
2020-08-14 7:41 ` Andrew Burgess
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).