+2012-06-01 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument
+ of target_read_memory as size_t.
+ * bfd-in2.h: Regenerate.
+ * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN
+ argument of target_read_memory as size_t.
+ (_bfd_elf32_bfd_from_remote_memory): Likewise.
+ (_bfd_elf64_bfd_from_remote_memory): Likewise.
+ * elf.c (bfd_elf_bfd_from_remote_memory): Likewise.
+ * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise.
+
2012-06-01 Alan Modra <amodra@gmail.com>
PR binutils/13897
the remote memory. */
extern bfd *bfd_elf_bfd_from_remote_memory
(bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, int len));
+ int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, size_t len));
extern struct bfd_section *_bfd_elf_tls_setup
(bfd *, struct bfd_link_info *);
the remote memory. */
extern bfd *bfd_elf_bfd_from_remote_memory
(bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, int len));
+ int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, size_t len));
extern struct bfd_section *_bfd_elf_tls_setup
(bfd *, struct bfd_link_info *);
see elf.c, elfcode.h. */
bfd *(*elf_backend_bfd_from_remote_memory)
(bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, int len));
+ int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, size_t len));
/* This function is used by `_bfd_elf_get_synthetic_symtab';
see elf.c. */
extern bfd *_bfd_elf32_bfd_from_remote_memory
(bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma, bfd_byte *, int));
+ int (*target_read_memory) (bfd_vma, bfd_byte *, size_t));
extern bfd *_bfd_elf64_bfd_from_remote_memory
(bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma, bfd_byte *, int));
+ int (*target_read_memory) (bfd_vma, bfd_byte *, size_t));
extern bfd_vma bfd_elf_obj_attr_size (bfd *);
extern void bfd_elf_set_obj_attr_contents (bfd *, bfd_byte *, bfd_vma);
(bfd *templ,
bfd_vma ehdr_vma,
bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma, bfd_byte *, int))
+ int (*target_read_memory) (bfd_vma, bfd_byte *, size_t))
{
return (*get_elf_backend_data (templ)->elf_backend_bfd_from_remote_memory)
(templ, ehdr_vma, loadbasep, target_read_memory);
(bfd *templ,
bfd_vma ehdr_vma,
bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma, bfd_byte *, int))
+ int (*target_read_memory) (bfd_vma, bfd_byte *, size_t))
{
Elf_External_Ehdr x_ehdr; /* Elf file header, external form */
Elf_Internal_Ehdr i_ehdr; /* Elf file header, internal form */
-2012-05-31 Jan Kratochvil <jan.kratochvil@redhat.com>
+2012-06-01 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * target.c (target_read_memory): Make LEN argument as size_t.
+ * target.h (target_read_memory): Likewise.
+
+2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
* tilegx-linux-tdep.c (tilegx_l): Use ULL for 64-bit values.
it makes no progress, and then return how much was transferred). */
int
-target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len)
+target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, size_t len)
{
/* Dispatch to the topmost target, not the flattened current_target.
Memory accesses check target->to_has_(all_)memory, and the
extern int target_read_string (CORE_ADDR, char **, int, int *);
-extern int target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len);
+extern int target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr,
+ size_t len);
extern int target_read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, int len);