forked from Imagelibrary/binutils-gdb
Use new to_xfer_partial interface in ctf and tfile target
This patch adjust both ctf and tfile target implementation of to_xfer_partial, to return TARGET_XFER_E_UNAVAILABLE and set *XFERED_LEN if data is unavailable. Note that some code on xfer in exec.c can be shared, but we can do it in a separate pass later. gdb: 2014-02-23 Yao Qi <yao@codesourcery.com> * exec.c (section_table_read_available_memory): New function. * exec.h (section_table_read_available_memory): Declare. * ctf.c (ctf_xfer_partial): Call section_table_read_available_memory. * tracefile-tfile.c (tfile_xfer_partial): Likewise.
This commit is contained in:
@@ -91,6 +91,14 @@ extern enum target_xfer_status
|
||||
struct target_section *,
|
||||
const char *);
|
||||
|
||||
/* Read from mappable read-only sections of BFD executable files.
|
||||
Similar to exec_read_partial_read_only, but return
|
||||
TARGET_XFER_E_UNAVAILABLE if data is unavailable. */
|
||||
|
||||
extern enum target_xfer_status
|
||||
section_table_read_available_memory (gdb_byte *readbuf, ULONGEST offset,
|
||||
ULONGEST len, ULONGEST *xfered_len);
|
||||
|
||||
/* Set the loaded address of a section. */
|
||||
extern void exec_set_section_address (const char *, int, CORE_ADDR);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user