From 4b477ade4f01d4510ac44f4251b511b11d593318 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Fri, 12 Jun 2009 18:38:36 +0000 Subject: * exec.h (section_table_xfer_memory_partial): Improve description, mention SECTION_NAME. * exec.c (section_table_xfer_memory_partial): Remove stale description. --- gdb/ChangeLog | 7 +++++++ gdb/exec.c | 21 --------------------- gdb/exec.h | 10 +++++++--- 3 files changed, 14 insertions(+), 24 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5cb11f0..26c7b2a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2009-06-12 Pedro Alves + + * exec.h (section_table_xfer_memory_partial): Improve description, + mention SECTION_NAME. + * exec.c (section_table_xfer_memory_partial): Remove stale + description. + 2009-06-11 Aleksandar Ristovski * nto-tdep.h (nto_generic_supply_gpregset) diff --git a/gdb/exec.c b/gdb/exec.c index dbf9cff..e1d4290 100644 --- a/gdb/exec.c +++ b/gdb/exec.c @@ -559,26 +559,6 @@ map_vmap (bfd *abfd, bfd *arch) return vp; } -/* 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_byte *readbuf, const gdb_byte *writebuf, 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) diff --git a/gdb/exec.h b/gdb/exec.h index 72b385c..c1125e5 100644 --- a/gdb/exec.h +++ b/gdb/exec.h @@ -39,12 +39,16 @@ extern int build_section_table (struct bfd *, struct target_section **, 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 -- cgit v1.1