GDB (xrefs)
|
#include "defs.h"
#include "frame.h"
#include "inferior.h"
#include "target.h"
#include "gdbcmd.h"
#include "language.h"
#include "filenames.h"
#include "symfile.h"
#include "objfiles.h"
#include "completer.h"
#include "value.h"
#include "exec.h"
#include "observer.h"
#include "arch-utils.h"
#include "gdbthread.h"
#include "progspace.h"
#include "gdb_bfd.h"
#include "gcore.h"
#include <fcntl.h>
#include "readline/readline.h"
#include "gdbcore.h"
#include <ctype.h>
#include <sys/stat.h>
#include "solist.h"
Go to the source code of this file.
Variables | |
void(* | deprecated_file_changed_hook )(char *) |
static struct target_ops | exec_ops |
int | write_files = 0 |
void _initialize_exec | ( | void | ) |
Definition at line 1048 of file exec.c.
References _, add_cmd(), add_com(), add_setshow_boolean_cmd(), add_target_with_completer(), class_files, class_support, cmdlist, dbx_commands, exec_file_command(), exec_ops, file_command(), init_exec_ops(), set_cmd_completer(), set_section_command(), setlist, show_write_files(), showlist, and write_files.
void add_target_sections | ( | void * | owner, |
struct target_section * | sections, | ||
struct target_section * | sections_end | ||
) |
Definition at line 492 of file exec.c.
References current_target_sections, exec_ops, target_section::owner, push_target(), resize_section_table(), target_section_table::sections, and target_is_pushed().
Referenced by exec_file_attach(), and solib_map_sections().
void add_target_sections_of_objfile | ( | struct objfile * | objfile | ) |
Definition at line 522 of file exec.c.
References target_section::addr, ALL_OBJFILE_OSECTIONS, current_target_sections, target_section::endaddr, gdb_assert, obj_section_addr, obj_section_endaddr, target_section::owner, resize_section_table(), target_section_table::sections, obj_section::the_bfd_section, and target_section::the_bfd_section.
Referenced by add_symbol_file_command(), and symbol_file_add_from_memory().
|
static |
int build_section_table | ( | struct bfd * | some_bfd, |
struct target_section ** | start, | ||
struct target_section ** | end | ||
) |
Definition at line 470 of file exec.c.
References _, add_to_section_table(), internal_error(), xfree(), and xmalloc().
Referenced by core_open(), exec_file_attach(), record_full_core_open_1(), solib_map_sections(), and target_bfd_reopen().
void clear_section_table | ( | struct target_section_table * | table | ) |
Definition at line 433 of file exec.c.
References target_section_table::sections, target_section_table::sections_end, and xfree().
Referenced by exec_close_1(), release_program_space(), and resize_section_table().
void exec_close | ( | void | ) |
Definition at line 88 of file exec.c.
References exec_bfd, exec_bfd_mtime, exec_filename, gdb_bfd_unref(), remove_target_sections(), and xfree().
Referenced by exec_close_1(), exec_file_attach(), exec_file_clear(), and release_program_space().
|
static |
Definition at line 112 of file exec.c.
References ALL_PSPACES, clear_section_table(), current_target_sections, do_cleanups(), exec_close(), save_current_program_space(), and set_current_program_space().
Referenced by init_exec_ops().
Definition at line 195 of file exec.c.
References _, add_target_sections(), build_section_table(), deprecated_exec_file_display_hook, do_cleanups(), error(), exec_bfd, exec_bfd_mtime, exec_close(), exec_filename, gdb_assert, gdb_bfd_errmsg(), gdb_bfd_fopen(), gdb_bfd_open(), gdb_bfd_ref(), gdb_realpath(), gdb_realpath_keepfile(), gnutarget, is_target_filename(), make_cleanup(), make_cleanup_bfd_unref(), O_BINARY, observer_notify_executable_changed(), openp(), OPF_TRY_CWD_FIRST, perror_with_name(), printf_unfiltered(), set_gdbarch_from_file(), target_filesystem_is_local, TARGET_SYSROOT_PREFIX, validate_files(), warning(), write_files, and xfree().
Referenced by add_inferior_command(), captured_main(), clone_program_space(), exec_file_command(), exec_file_locate_attach(), exec_open(), follow_exec(), reopen_exec_file(), and reread_symbols().
void exec_file_clear | ( | int | from_tty | ) |
Definition at line 129 of file exec.c.
References _, exec_close(), and printf_unfiltered().
|
static |
Definition at line 349 of file exec.c.
References _, do_cleanups(), error(), exec_file_attach(), gdb_buildargv(), make_cleanup(), make_cleanup_freeargv(), query(), target_has_execution, and xfree().
Referenced by _initialize_exec(), and file_command().
Definition at line 141 of file exec.c.
References exec_file_attach(), exec_file_find(), gdb_sysroot, get_exec_file(), source_full_path_of(), symbol_file_add_main(), and target_pid_to_exec_file.
Referenced by attach_command_post_wait(), and remote_add_inferior().
|
static |
Definition at line 925 of file exec.c.
References _, current_target_sections, exec_bfd, print_section_info(), and puts_filtered().
Referenced by init_exec_ops(), and set_section_command().
|
static |
Definition at line 831 of file exec.c.
References current_target_sections.
Referenced by init_exec_ops().
|
static |
Definition at line 1009 of file exec.c.
References current_target_sections.
Referenced by init_exec_ops().
|
static |
Definition at line 78 of file exec.c.
References exec_file_attach(), and target_preopen().
Referenced by init_exec_ops().
enum target_xfer_status exec_read_partial_read_only | ( | gdb_byte * | readbuf, |
ULONGEST | offset, | ||
ULONGEST | len, | ||
ULONGEST * | xfered_len | ||
) |
Definition at line 611 of file exec.c.
References exec_bfd, len, size, TARGET_XFER_E_IO, TARGET_XFER_EOF, and TARGET_XFER_OK.
Referenced by section_table_read_available_memory(), and tfile_xfer_partial().
Definition at line 980 of file exec.c.
References target_section::addr, current_target_sections, target_section::endaddr, target_section_table::sections, target_section_table::sections_end, and target_section::the_bfd_section.
Referenced by default_symfile_offsets(), objfile_relocate1(), and svr4_relocate_main_executable().
|
static |
Definition at line 837 of file exec.c.
References section_table_xfer_memory_partial(), target_section_table::sections, target_section_table::sections_end, target_get_section_table(), TARGET_OBJECT_MEMORY, and TARGET_XFER_E_IO.
Referenced by init_exec_ops().
|
static |
Definition at line 390 of file exec.c.
References deprecated_file_changed_hook, exec_file_command(), and symbol_file_command().
Referenced by _initialize_exec().
|
static |
Definition at line 1002 of file exec.c.
Referenced by init_exec_ops().
|
static |
Definition at line 1027 of file exec.c.
References exec_close_1(), exec_files_info(), exec_get_section_table(), exec_has_memory(), exec_make_note_section(), exec_open(), exec_ops, exec_xfer_partial(), file_stratum, ignore(), objfile_find_memory_regions(), OPS_MAGIC, target_ops::to_close, target_ops::to_doc, target_ops::to_files_info, target_ops::to_find_memory_regions, target_ops::to_get_section_table, target_ops::to_has_memory, target_ops::to_insert_breakpoint, target_ops::to_longname, target_ops::to_magic, target_ops::to_make_corefile_notes, target_ops::to_open, target_ops::to_remove_breakpoint, target_ops::to_shortname, target_ops::to_stratum, and target_ops::to_xfer_partial.
Referenced by _initialize_exec().
void print_section_info | ( | struct target_section_table * | t, |
bfd * | abfd | ||
) |
Definition at line 856 of file exec.c.
References _, target_section::addr, target_section::endaddr, exec_bfd, gdbarch_addr_bit(), gdbarch_addr_bits_remove(), gdbarch_from_bfd(), hex_string_custom(), info_verbose, paddress(), printf_filtered(), target_section_table::sections, target_section_table::sections_end, target_section::the_bfd_section, warning(), and wrap_here().
Referenced by core_files_info(), and exec_files_info().
void remove_target_sections | ( | void * | owner | ) |
Definition at line 568 of file exec.c.
References ALL_PSPACES, current_target_sections, exec_ops, gdb_assert, target_section::owner, resize_section_table(), target_section_table::sections, target_section_table::sections_end, program_space::target_sections, and unpush_target().
Referenced by clear_solib(), exec_close(), reload_shared_libraries_1(), symfile_free_objfile(), and update_solib_list().
|
static |
Definition at line 445 of file exec.c.
References clear_section_table(), target_section_table::sections, target_section_table::sections_end, and xrealloc().
Referenced by add_target_sections(), add_target_sections_of_objfile(), and remove_target_sections().
enum target_xfer_status section_table_read_available_memory | ( | gdb_byte * | readbuf, |
ULONGEST | offset, | ||
ULONGEST | len, | ||
ULONGEST * | xfered_len | ||
) |
Definition at line 700 of file exec.c.
References do_cleanups(), exec_ops, exec_read_partial_read_only(), gdb_assert, len, mem_range::length, make_cleanup(), mem_ranges_overlap(), min, normalize_mem_ranges(), offset, target_section_table::sections, target_section_table::sections_end, mem_range::start, status, target_get_section_table(), TARGET_XFER_UNAVAILABLE, VEC(), VEC_cleanup, and VEC_iterate.
Referenced by tfile_xfer_partial().
enum target_xfer_status section_table_xfer_memory_partial | ( | gdb_byte * | readbuf, |
const gdb_byte * | writebuf, | ||
ULONGEST | offset, | ||
ULONGEST | len, | ||
ULONGEST * | xfered_len, | ||
struct target_section * | sections, | ||
struct target_section * | sections_end, | ||
const char * | section_name | ||
) |
Definition at line 754 of file exec.c.
References _, target_section::addr, target_section::endaddr, internal_error(), len, offset, TARGET_XFER_EOF, TARGET_XFER_OK, and target_section::the_bfd_section.
Referenced by core_xfer_partial(), exec_xfer_partial(), memory_xfer_partial_1(), and target_bfd_xfer_partial().
|
static |
Definition at line 934 of file exec.c.
References _, target_section::addr, current_target_sections, target_section::endaddr, error(), exec_files_info(), exec_ops, offset, parse_and_eval_address(), target_section_table::sections, target_section_table::sections_end, and target_section::the_bfd_section.
Referenced by _initialize_exec().
|
static |
Definition at line 69 of file exec.c.
References _, and fprintf_filtered().
Referenced by _initialize_exec().
|
static |
Definition at line 662 of file exec.c.
References target_section::addr, target_section::endaddr, len, mem_range::length, max, mem_ranges_overlap(), min, mem_range::start, target_section::the_bfd_section, and VEC_safe_push.
Referenced by section_table_read_available_memory().
void(* deprecated_file_changed_hook) (char *) |
Definition at line 47 of file exec.c.
Referenced by file_command().
|
static |
Definition at line 63 of file exec.c.
Referenced by _initialize_exec(), add_target_sections(), init_exec_ops(), remove_target_sections(), section_table_read_available_memory(), and set_section_command().
int write_files = 0 |
Definition at line 67 of file exec.c.
Referenced by _initialize_exec(), bsd_kvm_open(), captured_main(), core_open(), and exec_file_attach().