| 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 <fcntl.h>#include "readline/readline.h"#include "gdb_string.h"#include "gdbcore.h"#include <ctype.h>#include "gdb_stat.h"Go to the source code of this file.
| void _initialize_exec | ( | void | ) | 
| void add_target_sections | ( | void * | owner, | 
| struct target_section * | sections, | ||
| struct target_section * | sections_end | ||
| ) | 
Definition at line 411 of file exec.c.
References current_target_sections, exec_ops, target_section::owner, push_target(), resize_section_table(), sections, target_section_table::sections, and using_exec_ops.
Referenced by exec_file_attach(), and solib_map_sections().
| static void add_to_section_table | ( | bfd * | abfd, | 
| struct bfd_section * | asect, | ||
| void * | table_pp_char | ||
| ) |  [static] | 
| int build_section_table | ( | struct bfd * | some_bfd, | 
| struct target_section ** | start, | ||
| struct target_section ** | end | ||
| ) | 
Definition at line 389 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 exec_close | ( | void | ) | 
Definition at line 91 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 void exec_close_1 | ( | void | ) |  [static] | 
Definition at line 115 of file exec.c.
References ALL_PSPACES, current_target_sections, do_cleanups(), exec_close(), resize_section_table(), save_current_program_space(), set_current_program_space(), and using_exec_ops.
Referenced by init_exec_ops().
| void exec_file_attach | ( | char * | filename, | 
| int | from_tty | ||
| ) | 
Definition at line 168 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_realpath(), gnutarget, make_cleanup(), observer_notify_executable_changed(), openp(), OPF_TRY_CWD_FIRST, perror_with_name(), printf_unfiltered(), sections, sections_end, set_gdbarch_from_file(), validate_files(), write_files, and xfree().
Referenced by add_inferior_command(), attach_command_post_wait(), captured_main(), clone_program_space(), exec_file_command(), exec_open(), follow_exec(), reopen_exec_file(), and reread_symbols().
| void exec_file_clear | ( | int | from_tty | ) | 
Definition at line 141 of file exec.c.
References _, exec_close(), and printf_unfiltered().
Referenced by gdb_clear_file().
| static void exec_file_command | ( | char * | args, | 
| int | from_tty | ||
| ) |  [static] | 
Definition at line 279 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 file_command().
| static void exec_files_info | ( | struct target_ops * | t | ) |  [static] | 
Definition at line 682 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 struct target_section_table* exec_get_section_table | ( | struct target_ops * | ops | ) |  [static, read] | 
Definition at line 588 of file exec.c.
References current_target_sections.
Referenced by init_exec_ops().
| static int exec_has_memory | ( | struct target_ops * | ops | ) |  [static] | 
Definition at line 765 of file exec.c.
References current_target_sections.
Referenced by init_exec_ops().
| static char * exec_make_note_section | ( | bfd * | obfd, | 
| int * | note_size | ||
| ) |  [static] | 
Definition at line 81 of file exec.c.
References exec_file_attach(), and target_preopen().
Referenced by init_exec_ops().
| void exec_set_find_memory_regions | ( | int(*)(find_memory_region_ftype, void *) | func | ) | 
Definition at line 776 of file exec.c.
References exec_ops, func, and target_ops::to_find_memory_regions.
| void exec_set_section_address | ( | const char * | filename, | 
| int | index, | ||
| CORE_ADDR | address | ||
| ) | 
Definition at line 737 of file exec.c.
References target_section::addr, current_target_sections, target_section::endaddr, p, target_section_table::sections, sections_end, and target_section::the_bfd_section.
Referenced by default_symfile_offsets(), objfile_relocate1(), and svr4_relocate_main_executable().
| static LONGEST exec_xfer_partial | ( | struct target_ops * | ops, | 
| enum target_object | object, | ||
| const char * | annex, | ||
| gdb_byte * | readbuf, | ||
| const gdb_byte * | writebuf, | ||
| ULONGEST | offset, | ||
| LONGEST | len | ||
| ) |  [static] | 
Definition at line 594 of file exec.c.
References section_table_xfer_memory_partial(), target_section_table::sections, target_section_table::sections_end, target_get_section_table(), and TARGET_OBJECT_MEMORY.
Referenced by init_exec_ops().
| static void file_command | ( | char * | arg, | 
| int | from_tty | ||
| ) |  [static] | 
Definition at line 320 of file exec.c.
References deprecated_file_changed_hook, exec_file_command(), and symbol_file_command().
| static int ignore | ( | struct gdbarch * | gdbarch, | 
| struct bp_target_info * | bp_tgt | ||
| ) |  [static] | 
Definition at line 759 of file exec.c.
Referenced by init_exec_ops().
| static void init_exec_ops | ( | void | ) |  [static] | 
Definition at line 787 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, find_default_attach(), find_default_create_inferior(), ignore(), OPS_MAGIC, target_ops::to_attach, target_ops::to_close, target_ops::to_create_inferior, target_ops::to_doc, target_ops::to_files_info, 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.
| void print_section_info | ( | struct target_section_table * | t, | 
| bfd * | abfd | ||
| ) | 
Definition at line 613 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, p, paddress(), printf_filtered(), target_section_table::sections, sections_end, 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 445 of file exec.c.
References ALL_PSPACES, current_target_sections, exec_ops, gdb_assert, target_section::owner, resize_section_table(), target_section_table::sections, sections_end, target_section_table::sections_end, program_space::target_sections, and unpush_target().
Referenced by clear_solib(), exec_close(), reload_shared_libraries_1(), and update_solib_list().
| int resize_section_table | ( | struct target_section_table * | table, | 
| int | num_added | ||
| ) | 
Definition at line 361 of file exec.c.
References target_section_table::sections, target_section_table::sections_end, xfree(), and xrealloc().
Referenced by add_target_sections(), exec_close_1(), release_program_space(), and remove_target_sections().
| int section_table_xfer_memory_partial | ( | gdb_byte * | readbuf, | 
| const gdb_byte * | writebuf, | ||
| ULONGEST | offset, | ||
| LONGEST | len, | ||
| struct target_section * | sections, | ||
| struct target_section * | sections_end, | ||
| const char * | section_name | ||
| ) | 
Definition at line 525 of file exec.c.
References _, target_section::addr, target_section::endaddr, internal_error(), len, memaddr, offset, p, sections_end, target_section::the_bfd_section, and ULONGEST.
Referenced by core_xfer_partial(), exec_xfer_partial(), memory_xfer_partial_1(), and target_bfd_xfer_partial().
| static void set_section_command | ( | char * | args, | 
| int | from_tty | ||
| ) |  [static] | 
Definition at line 691 of file exec.c.
References _, target_section::addr, current_target_sections, target_section::endaddr, error(), exec_files_info(), exec_ops, offset, p, parse_and_eval_address(), target_section_table::sections, sections_end, and target_section::the_bfd_section.
| static void show_write_files | ( | struct ui_file * | file, | 
| int | from_tty, | ||
| struct cmd_list_element * | c, | ||
| const char * | value | ||
| ) |  [static] | 
Definition at line 72 of file exec.c.
References _, and fprintf_filtered().
| VEC | ( | mem_range_s | ) | 
Definition at line 487 of file exec.c.
References target_section::addr, target_section::endaddr, len, mem_range::length, max, mem_ranges_overlap(), memaddr, min, p, sections_end, mem_range::start, target_section::the_bfd_section, ULONGEST, and VEC_safe_push.
| void(* deprecated_file_changed_hook)(char *) | 
Definition at line 47 of file exec.c.
Referenced by file_command(), and gdbtk_add_hooks().
| struct target_ops exec_ops | 
Definition at line 63 of file exec.c.
Referenced by add_target_sections(), exec_set_find_memory_regions(), init_exec_ops(), read_value_memory(), remove_target_sections(), and set_section_command().
| int using_exec_ops  [static] | 
Definition at line 66 of file exec.c.
Referenced by add_target_sections(), and exec_close_1().
| int write_files = 0 | 
Definition at line 70 of file exec.c.
Referenced by bsd_kvm_open(), captured_main(), core_open(), and exec_file_attach().
 1.7.6.1
 1.7.6.1