From: Andrew Cagney <ac131313@cygnus.com>
To: Michael Snyder <msnyder@cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] New option "trust-readonly-sections"
Date: Thu, 24 Jan 2002 10:52:00 -0000 [thread overview]
Message-ID: <3C5057E6.6070401@cygnus.com> (raw)
In-Reply-To: <200201240323.g0O3NI905339@reddwarf.cygnus.com>
> *************** do_xfer_memory (CORE_ADDR memaddr, char
> *** 857,862 ****
> --- 859,883 ----
> 0. */
> errno = 0;
>
> + if (!write && trust_readonly)
> + {
> + /* User-settable option, "trust-readonly". If true, then
> + memory from any SEC_READONLY bfd section may be read
> + directly from the bfd file. */
> +
> + struct section_table *secp;
> +
> + for (secp = current_target.to_sections;
> + secp < current_target.to_sections_end;
> + secp++)
> + {
> + /* FIXME: take it only if it's entirely within the section. */
> + if (memaddr >= secp->addr && memaddr + len <= secp->endaddr)
> + return xfer_memory (memaddr, myaddr, len, 0,
> + attrib, ¤t_target);
My understanding of do_xfer_memory() is that it is allowed to do partial
transfers. Hence, here, if the data doesn't all lie in the section, it
is safe to truncate the transfer and return the number of bytes transfered.
Andrew
next prev parent reply other threads:[~2002-01-24 18:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-23 19:29 Michael Snyder
2002-01-23 20:15 ` Andrew Cagney
2002-01-23 21:45 ` Daniel Jacobowitz
2002-01-23 23:23 ` Eli Zaretskii
2002-01-24 8:35 ` Daniel Jacobowitz
2002-01-24 8:51 ` Andrew Cagney
2002-01-24 9:14 ` Andrew Cagney
2002-01-24 9:25 ` Daniel Jacobowitz
2002-01-23 23:29 ` Stan Shebs
2002-01-24 10:40 ` Michael Snyder
2002-01-24 10:52 ` Andrew Cagney [this message]
2002-01-30 18:25 ` Michael Snyder
2002-01-31 1:03 ` Eli Zaretskii
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=3C5057E6.6070401@cygnus.com \
--to=ac131313@cygnus.com \
--cc=gdb-patches@sources.redhat.com \
--cc=msnyder@cygnus.com \
/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