From: Dave Korn <dave.korn.cygwin@googlemail.com>
To: gdb@sourceware.org
Subject: Software-vs-hardware single-step vs. sim/non-sim targets.
Date: Fri, 04 Dec 2009 20:58:00 -0000 [thread overview]
Message-ID: <4B197BC0.5010708@gmail.com> (raw)
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
next reply other threads:[~2009-12-04 20:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-04 20:58 Dave Korn [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B197BC0.5010708@gmail.com \
--to=dave.korn.cygwin@googlemail.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox