mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
b55e14c72c
This patch changes to_xfer_partial's len's type to ULONGEST, and adjust its implementations. gdb: 2014-01-14 Yao Qi <yao@codesourcery.com> * target.h (target_xfer_partial_ftype): Update. (struct target_ops) <to_xfer_partial>: Change 'len' type to ULONGEST. * aix-thread.c (aix_thread_xfer_partial): Change type of argument 'len' to ULONGEST. * auxv.c (procfs_xfer_auxv): Likewise. (ld_so_xfer_auxv): Likewise. (memory_xfer_auxv): Likewise. * bfd-target.c (target_bfd_xfer_partial): Likewise. * bsd-kvm.c (bsd_kvm_xfer_partial): Likewise. * bsd-uthread.c (bsd_uthread_xfer_partial): Likewise. * corelow.c (core_xfer_partial): Likewise. * ctf.c (ctf_xfer_partial): Likewise. * darwin-nat.c (darwin_read_write_inferior): Likewise. Use '%u'. (darwin_read_dyld_info): Likewise. (darwin_xfer_partial): Likewise. * exec.c (section_table_xfer_memory_partial): Likewise. (exec_xfer_partial): Likewise. * exec.h (section_table_xfer_memory_partial): Update declaration. * gnu-nat.c (gnu_xfer_memory): Likewise. Call pulongest instead of plongest. (gnu_xfer_partial): Likewise. * ia64-hpux-nat.c (ia64_hpux_xfer_memory): Likewise. (ia64_hpux_xfer_solib_got): Likewise. (ia64_hpux_xfer_partial): Likewise. * ia64-linux-nat.c (ia64_linux_xfer_partial): * inf-ptrace.c (inf_ptrace_xfer_partial): * inf-ttrace.c (inf_ttrace_xfer_partial): * linux-nat.c (linux_xfer_siginfo): Likewise. (linux_nat_xfer_partial): Likewise. (spu_enumerate_spu_ids, linux_proc_xfer_spu): Likewise. (linux_nat_xfer_osdata, linux_xfer_partial): Likewise. * monitor.c (monitor_xfer_memory): Likewise. (monitor_xfer_partial): Likewise. * procfs.c (procfs_xfer_partial): Likewise. * record-full.c (record_full_xfer_partial): Likewise. (record_full_core_xfer_partial): Likewise. * remote-sim.c (gdbsim_xfer_memory): Likewise. Call pulongest instead of plongest. (gdbsim_xfer_partial): Likewise. * remote.c (remote_xfer_partial): Likewise. * rs6000-aix-tdep.c (rs6000_aix_ld_info_to_xml): Likewise. * rs6000-aix-tdep.h (rs6000_aix_ld_info_to_xml): Update declaration. * rs6000-nat.c (rs6000_xfer_partial): Likewise. (rs6000_xfer_shared_libraries): Likewise. * sol-thread.c (sol_thread_xfer_partial): Likewise. * sparc-nat.c (sparc_xfer_wcookie): Likewise. (sparc_xfer_partial): Likewise. * spu-linux-nat.c (spu_proc_xfer_spu): Likewise. (spu_xfer_partial): Likewise. * spu-multiarch.c (spu_xfer_partial): Likewise. * target.c (target_read_live_memory): Likewise. (memory_xfer_live_readonly_partial): Likewise. (memory_xfer_partial, memory_xfer_partial_1): Likewise. (target_xfer_partial, default_xfer_partial): Likewise. (current_xfer_partial): Likewise. * tracepoint.c (tfile_xfer_partial): Likewise. * windows-nat.c (windows_xfer_memory): Likewise. Call pulongest instead of plongest. (windows_xfer_partial): Likewise. (windows_xfer_shared_libraries): Likewise.
112 lines
3.6 KiB
C
112 lines
3.6 KiB
C
/* Work with executable files, for GDB, the GNU debugger.
|
|
|
|
Copyright (C) 2003-2014 Free Software Foundation, Inc.
|
|
|
|
This file is part of GDB.
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
|
|
#ifndef EXEC_H
|
|
#define EXEC_H
|
|
|
|
#include "target.h"
|
|
#include "progspace.h"
|
|
#include "memrange.h"
|
|
|
|
struct target_section;
|
|
struct target_ops;
|
|
struct bfd;
|
|
struct objfile;
|
|
|
|
extern struct target_ops exec_ops;
|
|
|
|
#define exec_bfd current_program_space->ebfd
|
|
#define exec_bfd_mtime current_program_space->ebfd_mtime
|
|
#define exec_filename current_program_space->pspace_exec_filename
|
|
|
|
/* Builds a section table, given args BFD, SECTABLE_PTR, SECEND_PTR.
|
|
Returns 0 if OK, 1 on error. */
|
|
|
|
extern int build_section_table (struct bfd *, struct target_section **,
|
|
struct target_section **);
|
|
|
|
/* Resize the section table held by TABLE, by NUM_ADDED. Returns the
|
|
old size. */
|
|
|
|
extern int resize_section_table (struct target_section_table *, int);
|
|
|
|
/* Appends all read-only memory ranges found in the target section
|
|
table defined by SECTIONS and SECTIONS_END, starting at (and
|
|
intersected with) MEMADDR for LEN bytes. Returns the augmented
|
|
VEC. */
|
|
|
|
extern VEC(mem_range_s) *
|
|
section_table_available_memory (VEC(mem_range_s) *ranges,
|
|
CORE_ADDR memaddr, ULONGEST len,
|
|
struct target_section *sections,
|
|
struct target_section *sections_end);
|
|
|
|
/* 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 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
|
|
information.
|
|
|
|
One, and only one, of readbuf or writebuf must be non-NULL. */
|
|
|
|
extern int section_table_xfer_memory_partial (gdb_byte *, const gdb_byte *,
|
|
ULONGEST, ULONGEST,
|
|
struct target_section *,
|
|
struct target_section *,
|
|
const char *);
|
|
|
|
/* Set the loaded address of a section. */
|
|
extern void exec_set_section_address (const char *, int, CORE_ADDR);
|
|
|
|
/* Remove all target sections owned by OWNER. */
|
|
|
|
extern void remove_target_sections (void *owner);
|
|
|
|
/* Add the sections array defined by [SECTIONS..SECTIONS_END[ to the
|
|
current set of target sections. */
|
|
|
|
extern void add_target_sections (void *owner,
|
|
struct target_section *sections,
|
|
struct target_section *sections_end);
|
|
|
|
/* Add the sections of OBJFILE to the current set of target sections.
|
|
* OBJFILE owns the new target sections. */
|
|
|
|
extern void add_target_sections_of_objfile (struct objfile *objfile);
|
|
|
|
/* Prints info about all sections defined in the TABLE. ABFD is
|
|
special cased --- it's filename is omitted; if it is the executable
|
|
file, its entry point is printed. */
|
|
|
|
extern void print_section_info (struct target_section_table *table,
|
|
bfd *abfd);
|
|
|
|
extern void exec_close (void);
|
|
|
|
#endif
|