From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: [commit] cleanup stale exec.{h|c} xfer_memory comments.
Date: Fri, 12 Jun 2009 18:41:00 -0000 [thread overview]
Message-ID: <200906121943.08246.pedro@codesourcery.com> (raw)
The comment describing section_table_xfer_memory_partial is actually
still describing the old xfer_memory. This removes that stale
description, and adjusts the description in the header a bit better
to current reality.
Checked in.
--
Pedro Alves
2009-06-12 Pedro Alves <pedro@codesourcery.com>
* exec.h (section_table_xfer_memory_partial): Improve description,
mention SECTION_NAME.
* exec.c (section_table_xfer_memory_partial): Remove stale
description.
---
gdb/exec.c | 21 ---------------------
gdb/exec.h | 10 +++++++---
2 files changed, 7 insertions(+), 24 deletions(-)
Index: src/gdb/exec.c
===================================================================
--- src.orig/gdb/exec.c 2009-06-12 19:18:37.000000000 +0100
+++ src/gdb/exec.c 2009-06-12 19:34:48.000000000 +0100
@@ -559,26 +559,6 @@ map_vmap (bfd *abfd, bfd *arch)
return vp;
}
\f
-/* Read or write from BFD executable files.
-
- MEMADDR is an address within the target address space, MYADDR is an
- address within GDB address-space where data is written to, LEN is
- length of buffer, and WRITE indicates whether to read or write.
- SECTIONS and SECTIONS_END defines a section table holding sections
- from possibly multiple BFDs.
-
- If SECTION_NAME is not NULL, only access sections with that same
- name.
-
- Result is a length:
-
- 0: We cannot handle this address and length.
- > 0: We have handled N bytes starting at this address.
- (If N == length, we did it all.) We might be able
- to handle more bytes beyond this length, but no
- promises.
- < 0: We cannot handle this address, but if somebody
- else handles (-N) bytes, we can start from there. */
int
section_table_xfer_memory_partial (gdb_byte *readbuf, const gdb_byte *writebuf,
@@ -595,7 +575,6 @@ section_table_xfer_memory_partial (gdb_b
if (len <= 0)
internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
-
for (p = sections; p < sections_end; p++)
{
if (section_name && strcmp (section_name, p->the_bfd_section->name) != 0)
Index: src/gdb/exec.h
===================================================================
--- src.orig/gdb/exec.h 2009-06-12 19:31:57.000000000 +0100
+++ src/gdb/exec.h 2009-06-12 19:33:11.000000000 +0100
@@ -39,12 +39,16 @@ extern int build_section_table (struct b
extern int resize_section_table (struct target_section_table *, int);
-/* Request to transfer up to LEN 8-bit bytes of the target sections
+/* Read or write from mappable sections of BFD executable files.
+
+ Request to transfer up to LEN 8-bit bytes of the target sections
defined by SECTIONS and SECTIONS_END. The OFFSET specifies the
starting address.
+ If SECTION_NAME is not NULL, only access sections with that same
+ name.
- Return the number of bytes actually transfered, or non-positive
- when no data is available for the requested range.
+ Return the number of bytes actually transfered, or zero when no
+ data is available for the requested range.
This function is intended to be used from target_xfer_partial
implementations. See target_read and target_write for more
next reply other threads:[~2009-06-12 18:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-12 18:41 Pedro Alves [this message]
2009-06-13 3:47 ` Eli Zaretskii
2009-06-13 11:12 ` Joel Brobecker
2009-06-15 18:31 ` Tom Tromey
2009-06-16 0:20 ` Joel Brobecker
2009-06-23 19:59 ` Stan Shebs
2009-06-23 20:54 ` Tom Tromey
2009-06-13 11:48 ` Pedro Alves
2009-06-13 12:24 ` Eli Zaretskii
2009-06-13 13:26 ` Pedro Alves
2009-06-13 13:31 ` 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=200906121943.08246.pedro@codesourcery.com \
--to=pedro@codesourcery.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