From: Pedro Alves <palves@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] Problem after hitting breakpoint on Windows (with GDBserver)
Date: Tue, 13 Mar 2012 15:03:00 -0000 [thread overview]
Message-ID: <4F5F6187.50209@redhat.com> (raw)
In-Reply-To: <1331602756-23567-2-git-send-email-brobecker@adacore.com>
On 03/13/2012 01:39 AM, Joel Brobecker wrote:
> + if (val == 0)
> + memcpy (bp_tgt->shadow_contents, readbuf, bp_tgt->placed_size);
>
> /* Write the breakpoint. */
> if (val == 0)
Merge?
> + As a limitation, MYADDR must not be the shadow_contents buffer of one
I wouldn't call it a limitation; it's more a design choice thing, like
memcpy doesn't handle overlapping buffers.
Otherwise this is fine with me. An assertion in breakpoint_xfer_memory
to catch that READBUF or WRITEBUF doesn't overlap bp->target_info.shadow_contents
would be nice. We could even avoid the new comments in target.h that way, as
there's be no way to write a new hook that doesn't trip on it instantly.
As we discussed yesterday on IRC, the current code always reinserts locations,
which means that gdb > 7.4 now does an extra read off of inferior memory to
fill the shadow on breakpoint re-sets. That'd be possible to avoid (and avoiding
this whole problem along the way), though I think Joel's patch is a good one
even knowing that.
--
Pedro Alves
next prev parent reply other threads:[~2012-03-13 15:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-13 1:39 Joel Brobecker
2012-03-13 1:39 ` [RFA] " Joel Brobecker
2012-03-13 15:03 ` Pedro Alves [this message]
2012-03-13 22:00 ` Joel Brobecker
2012-03-13 23:08 ` Pedro Alves
2012-03-14 21:50 ` Joel Brobecker
2012-03-15 1:04 ` Joel Brobecker
2012-03-15 10:35 ` Pedro Alves
2012-03-15 18:36 ` Joel Brobecker
2012-03-13 14:24 ` Jan Kratochvil
2012-03-13 14:52 ` 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=4F5F6187.50209@redhat.com \
--to=palves@redhat.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@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