From: teawater <teawater@gmail.com>
To: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Some ideas of displaced step function
Date: Thu, 02 Oct 2008 22:05:00 -0000 [thread overview]
Message-ID: <daef60380810021504o11b485d7h96994bfd2a40720@mail.gmail.com> (raw)
Hi all,
I read the source code of displaced step and found some fail with it
(http://sourceware.org/ml/gdb/2008-08/msg00231.html).
I have some ideas on it:
1. I think this function just for asynchronous debug. But in acutally,
it be used for any inferior:
/* Return non-zero if displaced stepping is enabled, and can be used
with GDBARCH. */
static int
use_displaced_stepping (struct gdbarch *gdbarch)
{
return (can_use_displaced_stepping
&& gdbarch_displaced_step_copy_insn_p (gdbarch));
}
Why not let it just work with asynchronous debug?
2. This function will affect another code cause it change pc change
memory, but it not supply a get and set interfaces? Most of its
variables are set to static. Just have a can_use_displaced_stepping
can control it disable or enable, but user can set it too. If other
code want know the orig PC or another things, How should they do?
3. If get memory fail, it will just output a memory fail directly.
Simple user will not know what happen. But in actually, he can use
"maintenance set can-use-displaced-stepping 0" to jump off this
problem directly.
So I think maybe can add some clear fail message for example:
Displaced step write memory fail in address 0x....., Maybe you can
jump off with close displaced step function in "maintenance set
can-use-displaced-stepping 0".
Thanks,
Hui
next reply other threads:[~2008-10-02 22:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-02 22:05 teawater [this message]
2008-10-03 0:33 ` Michael Snyder
2008-10-03 13:53 ` Pedro Alves
2008-10-03 18:30 ` Michael Snyder
2008-10-03 20:57 ` Pedro Alves
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=daef60380810021504o11b485d7h96994bfd2a40720@mail.gmail.com \
--to=teawater@gmail.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