|
GDB (xrefs)
|
#include "defs.h"#include <fcntl.h>#include <spawn.h>#include <sys/debug.h>#include <sys/procfs.h>#include <sys/neutrino.h>#include <sys/syspage.h>#include <dirent.h>#include <sys/netmgr.h>#include <sys/auxv.h>#include "gdbcore.h"#include "inferior.h"#include "target.h"#include "objfiles.h"#include "gdbthread.h"#include "nto-tdep.h"#include "command.h"#include "regcache.h"#include "solib.h"#include "inf-child.h"#include "common/filestuff.h"Go to the source code of this file.
Macros | |
| #define | NULL_PID 0 |
| #define | _DEBUG_FLAG_TRACE |
| #define | OSTYPE_NTO 1 |
Functions | |
| static ptid_t | do_attach (ptid_t ptid) |
| static int | procfs_can_use_hw_breakpoint (struct target_ops *self, enum bptype, int, int) |
| static int | procfs_insert_hw_watchpoint (struct target_ops *self, CORE_ADDR addr, int len, enum target_hw_bp_type type, struct expression *cond) |
| static int | procfs_remove_hw_watchpoint (struct target_ops *self, CORE_ADDR addr, int len, enum target_hw_bp_type type, struct expression *cond) |
| static int | procfs_stopped_by_watchpoint (struct target_ops *ops) |
| static unsigned | nto_node (void) |
| static enum gdb_osabi | procfs_is_nto_target (bfd *abfd) |
| static void | procfs_open_1 (struct target_ops *ops, const char *arg, int from_tty) |
| static void | procfs_set_thread (ptid_t ptid) |
| static int | procfs_thread_alive (struct target_ops *ops, ptid_t ptid) |
| static void | update_thread_private_data_name (struct thread_info *new_thread, const char *newname) |
| static void | update_thread_private_data (struct thread_info *new_thread, pthread_t tid, int state, int flags) |
| static void | procfs_update_thread_list (struct target_ops *ops) |
| static void | do_closedir_cleanup (void *dir) |
| static void | procfs_pidlist (const char *args, int from_tty) |
| static void | procfs_meminfo (const char *args, int from_tty) |
| static void | procfs_files_info (struct target_ops *ignore) |
| static char * | procfs_pid_to_exec_file (struct target_ops *ops, const int pid) |
| static void | procfs_attach (struct target_ops *ops, const char *args, int from_tty) |
| static void | procfs_post_attach (struct target_ops *self, pid_t pid) |
| static void | interrupt_query (void) |
| static void | nto_handle_sigint_twice (int signo) |
| static void | nto_handle_sigint (int signo) |
| static ptid_t | procfs_wait (struct target_ops *ops, ptid_t ptid, struct target_waitstatus *ourstatus, int options) |
| static void | procfs_fetch_registers (struct target_ops *ops, struct regcache *regcache, int regno) |
| static enum target_xfer_status | procfs_xfer_memory (gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST memaddr, ULONGEST len, ULONGEST *xfered_len) |
| static enum target_xfer_status | procfs_xfer_partial (struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len) |
| static void | procfs_detach (struct target_ops *ops, const char *args, int from_tty) |
| static int | procfs_breakpoint (CORE_ADDR addr, int type, int size) |
| static int | procfs_insert_breakpoint (struct target_ops *ops, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt) |
| static int | procfs_remove_breakpoint (struct target_ops *ops, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt, enum remove_bp_reason reason) |
| static int | procfs_insert_hw_breakpoint (struct target_ops *self, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt) |
| static int | procfs_remove_hw_breakpoint (struct target_ops *self, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt) |
| static void | procfs_resume (struct target_ops *ops, ptid_t ptid, int step, enum gdb_signal signo) |
| static void | procfs_mourn_inferior (struct target_ops *ops) |
| static void | breakup_args (char *scratch, char **argv) |
| static void | procfs_create_inferior (struct target_ops *ops, const char *exec_file, const std::string &allargs, char **env, int from_tty) |
| static void | procfs_interrupt (struct target_ops *self, ptid_t ptid) |
| static void | procfs_kill_inferior (struct target_ops *ops) |
| static int | get_regset (int regset, char *buf, int bufsize, int *regsize) |
| static void | procfs_store_registers (struct target_ops *ops, struct regcache *regcache, int regno) |
| static void | procfs_pass_signals (struct target_ops *self, int numsigs, unsigned char *pass_signals) |
| static char * | procfs_pid_to_str (struct target_ops *ops, ptid_t ptid) |
| static int | procfs_can_run (struct target_ops *self) |
| static void | procfs_open (const char *arg, int from_tty) |
| static void | procfs_native_open (const char *arg, int from_tty) |
| static void | init_procfs_targets (void) |
| void | _initialize_procfs (void) |
| static int | procfs_hw_watchpoint (int addr, int len, enum target_hw_bp_type type) |
Variables | |
| int | ctl_fd |
| static sighandler_t | ofunc |
| static procfs_run | run |
| static char * | nodestr |
| static unsigned | nto_procfs_node = ND_LOCAL_NODE |
| static struct target_ops | nto_procfs_ops |
| static struct target_ops * | nto_native_ops |
| #define _DEBUG_FLAG_TRACE |
Definition at line 48 of file nto-procfs.c.
Referenced by procfs_wait().
| #define NULL_PID 0 |
Definition at line 47 of file nto-procfs.c.
| #define OSTYPE_NTO 1 |
Definition at line 1520 of file nto-procfs.c.
| void _initialize_procfs | ( | void | ) |
Definition at line 1523 of file nto-procfs.c.
References _, add_info(), init_procfs_targets(), nto_cpuinfo_flags, nto_cpuinfo_valid, nto_is_nto_target, procfs_is_nto_target(), procfs_meminfo(), procfs_pidlist(), and run.
|
static |
Definition at line 1100 of file nto-procfs.c.
References gdb::argv.
Referenced by procfs_create_inferior().
Definition at line 678 of file nto-procfs.c.
References _, ctl_fd, error(), nodestr, nto_init_solib_absolute_prefix(), nto_node(), ptid_build(), ptid_get_pid(), safe_strerror(), and status.
Referenced by procfs_attach(), and procfs_create_inferior().
|
static |
Definition at line 342 of file nto-procfs.c.
Referenced by procfs_pidlist().
|
static |
Definition at line 1296 of file nto-procfs.c.
References ctl_fd, NTO_REG_ALT, NTO_REG_FLOAT, NTO_REG_GENERAL, and NTO_REG_SYSTEM.
Referenced by procfs_store_registers().
|
static |
Definition at line 1467 of file nto-procfs.c.
References add_target(), inf_child_target(), nto_extra_thread_info(), nto_native_ops, nto_procfs_ops, procfs_attach(), procfs_can_run(), procfs_can_use_hw_breakpoint(), procfs_create_inferior(), procfs_detach(), procfs_fetch_registers(), procfs_files_info(), procfs_insert_breakpoint(), procfs_insert_hw_breakpoint(), procfs_insert_hw_watchpoint(), procfs_interrupt(), procfs_kill_inferior(), procfs_mourn_inferior(), procfs_native_open(), procfs_open(), procfs_pass_signals(), procfs_pid_to_exec_file(), procfs_pid_to_str(), procfs_post_attach(), procfs_remove_breakpoint(), procfs_remove_hw_breakpoint(), procfs_remove_hw_watchpoint(), procfs_resume(), procfs_stopped_by_watchpoint(), procfs_store_registers(), procfs_thread_alive(), procfs_update_thread_list(), procfs_wait(), procfs_xfer_partial(), target_ops::to_attach, target_ops::to_can_run, target_ops::to_can_use_hw_breakpoint, target_ops::to_create_inferior, target_ops::to_detach, target_ops::to_doc, target_ops::to_extra_thread_info, target_ops::to_fetch_registers, target_ops::to_files_info, target_ops::to_have_continuable_watchpoint, target_ops::to_insert_breakpoint, target_ops::to_insert_hw_breakpoint, target_ops::to_insert_watchpoint, target_ops::to_interrupt, target_ops::to_kill, target_ops::to_longname, target_ops::to_mourn_inferior, target_ops::to_open, target_ops::to_pass_signals, target_ops::to_pid_to_exec_file, target_ops::to_pid_to_str, target_ops::to_post_attach, target_ops::to_remove_breakpoint, target_ops::to_remove_hw_breakpoint, target_ops::to_remove_watchpoint, target_ops::to_resume, target_ops::to_shortname, target_ops::to_stopped_by_watchpoint, target_ops::to_store_registers, target_ops::to_thread_alive, target_ops::to_update_thread_list, target_ops::to_wait, and target_ops::to_xfer_partial.
Referenced by _initialize_procfs().
|
static |
Definition at line 710 of file nto-procfs.c.
References _, inferior_ptid, query(), quit(), and target_mourn_inferior().
Referenced by nto_handle_sigint_twice().
|
static |
Definition at line 730 of file nto-procfs.c.
References inferior_ptid, nto_handle_sigint_twice(), and target_interrupt().
Referenced by procfs_wait().
|
static |
Definition at line 722 of file nto-procfs.c.
References interrupt_query(), and ofunc.
Referenced by nto_handle_sigint().
|
static |
Definition at line 86 of file nto-procfs.c.
References _, error(), nodestr, and nto_procfs_node.
Referenced by do_attach(), procfs_create_inferior(), procfs_detach(), procfs_mourn_inferior(), and procfs_resume().
|
static |
Definition at line 635 of file nto-procfs.c.
References _, inferior::args, current_inferior(), do_attach(), error(), gdb_flush(), gdb_stdout, get_exec_file(), arm-linux::inf, inferior_appeared(), inferior_ptid, parse_pid_to_attach(), pid, pid_to_ptid(), printf_unfiltered(), procfs_update_thread_list(), push_target(), target_is_pushed(), and target_pid_to_str().
Referenced by init_procfs_targets().
|
static |
Definition at line 970 of file nto-procfs.c.
References ctl_fd, size, and type.
Referenced by procfs_insert_breakpoint(), procfs_insert_hw_breakpoint(), procfs_remove_breakpoint(), and procfs_remove_hw_breakpoint().
|
static |
Definition at line 1437 of file nto-procfs.c.
Referenced by init_procfs_targets().
|
static |
Definition at line 1580 of file nto-procfs.c.
Referenced by init_procfs_targets().
|
static |
Definition at line 1152 of file nto-procfs.c.
References _, inferior::args, gdb::argv, breakup_args(), ctl_fd, current_inferior(), do_attach(), err, error(), exec_bfd, flags, get_exec_file(), get_inferior_io_terminal(), arm-linux::inf, inferior_appeared(), inferior_ptid, target_terminal::init(), memset(), nto_node(), nto_parse_redirection(), nto_procfs_node, pid, pid_to_ptid(), procfs_update_thread_list(), push_target(), safe_strerror(), solib_create_inferior_hook(), symfile_objfile, target_is_pushed(), xfree(), and xmalloc().
Referenced by init_procfs_targets().
|
static |
Definition at line 946 of file nto-procfs.c.
References ctl_fd, detach_inferior(), inf_child_maybe_unpush_target(), inferior_ptid, init_thread_list(), nto_node(), null_ptid, pid, ptid_get_pid(), and target_announce_detach().
Referenced by init_procfs_targets().
|
static |
Definition at line 845 of file nto-procfs.c.
References ctl_fd, nto_supply_altregset, nto_supply_fpregset, nto_supply_gregset, procfs_set_thread(), and regcache_get_ptid().
Referenced by init_procfs_targets().
|
static |
Definition at line 596 of file nto-procfs.c.
References current_inferior(), inferior_ptid, nodestr, printf_unfiltered(), and target_pid_to_str().
Referenced by init_procfs_targets().
|
static |
Definition at line 1550 of file nto-procfs.c.
References _, ctl_fd, hw_access, and hw_read.
Referenced by procfs_insert_hw_watchpoint(), and procfs_remove_hw_watchpoint().
|
static |
Definition at line 984 of file nto-procfs.c.
References bp_target_info::placed_address, procfs_breakpoint(), and bp_target_info::reqstd_address.
Referenced by init_procfs_targets().
|
static |
Definition at line 1000 of file nto-procfs.c.
References bp_target_info::placed_address, procfs_breakpoint(), and bp_target_info::reqstd_address.
Referenced by init_procfs_targets().
|
static |
Definition at line 1597 of file nto-procfs.c.
References procfs_hw_watchpoint().
Referenced by init_procfs_targets().
|
static |
Definition at line 1282 of file nto-procfs.c.
References ctl_fd.
Referenced by init_procfs_targets().
|
static |
Definition at line 102 of file nto-procfs.c.
References GDB_OSABI_QNXNTO.
Referenced by _initialize_procfs(), and procfs_open_1().
|
static |
Definition at line 1288 of file nto-procfs.c.
References inferior_ptid, and target_mourn_inferior().
Referenced by init_procfs_targets().
|
static |
Definition at line 450 of file nto-procfs.c.
References ctl_fd, err, flags, memset(), name, offset, phex(), printf_filtered(), safe_strerror(), size, xfree(), and XNEWVEC.
Referenced by _initialize_procfs().
|
static |
Definition at line 1079 of file nto-procfs.c.
References ctl_fd, inf_child_mourn_inferior(), inferior_ptid, init_thread_list(), nto_node(), null_ptid, ptid_equal(), and ptid_get_pid().
Referenced by init_procfs_targets().
|
static |
Definition at line 1459 of file nto-procfs.c.
References nto_native_ops, and procfs_open_1().
Referenced by init_procfs_targets().
|
static |
Definition at line 1451 of file nto-procfs.c.
References nto_procfs_ops, and procfs_open_1().
Referenced by init_procfs_targets().
|
static |
Definition at line 112 of file nto-procfs.c.
References _, cleanup::arg, do_cleanups(), error(), gdbarch_bfd_arch_info(), inf_child_open_target(), init_thread_list(), make_cleanup_close(), nodestr, nto_is_nto_target, nto_map_arch_to_cputype(), nto_procfs_node, printf_filtered(), procfs_is_nto_target(), safe_strerror(), target_gdbarch(), target_preopen(), and xfree().
Referenced by procfs_native_open(), and procfs_open().
|
static |
Definition at line 1394 of file nto-procfs.c.
References gdb_signal_from_host(), and run.
Referenced by init_procfs_targets().
|
static |
Definition at line 609 of file nto-procfs.c.
References nodestr, pid, and read().
Referenced by init_procfs_targets().
|
static |
Definition at line 1410 of file nto-procfs.c.
References pid, ptid_get_pid(), ptid_get_tid(), and selftests::ptid::tid.
Referenced by init_procfs_targets().
|
static |
Definition at line 348 of file nto-procfs.c.
References do_cleanups(), do_closedir_cleanup(), err, fprintf_unfiltered(), gdb_stderr, make_cleanup(), make_cleanup_close(), name, nodestr, pid, printf_filtered(), safe_strerror(), and status.
Referenced by _initialize_procfs().
|
static |
Definition at line 671 of file nto-procfs.c.
References exec_bfd, and solib_create_inferior_hook().
Referenced by init_procfs_targets().
|
static |
Definition at line 992 of file nto-procfs.c.
References bp_target_info::placed_address, and procfs_breakpoint().
Referenced by init_procfs_targets().
|
static |
Definition at line 1009 of file nto-procfs.c.
References bp_target_info::placed_address, and procfs_breakpoint().
Referenced by init_procfs_targets().
|
static |
Definition at line 1588 of file nto-procfs.c.
References procfs_hw_watchpoint().
Referenced by init_procfs_targets().
|
static |
Definition at line 1018 of file nto-procfs.c.
References _, ctl_fd, gdb_signal_to_host(), inferior_ptid, minus_one_ptid, nto_node(), null_ptid, procfs_set_thread(), ptid_equal(), ptid_get_pid(), run, and status.
Referenced by init_procfs_targets().
|
static |
Definition at line 211 of file nto-procfs.c.
References ctl_fd, ptid_get_tid(), and selftests::ptid::tid.
Referenced by procfs_fetch_registers(), procfs_resume(), and procfs_store_registers().
|
static |
Definition at line 1606 of file nto-procfs.c.
References current_inferior(), gdb_assert, nto_inferior_data(), and nto_inferior_data::stopped_flags.
Referenced by init_procfs_targets().
|
static |
Definition at line 1327 of file nto-procfs.c.
References regcache::arch(), ctl_fd, err, fprintf_unfiltered(), gdb_stderr, get_regset(), NTO_REG_END, NTO_REG_GENERAL, nto_register_area, nto_regset_fill, nto_regset_id, null_ptid, procfs_set_thread(), ptid_equal(), regcache_get_ptid(), regcache_raw_collect(), and safe_strerror().
Referenced by init_procfs_targets().
|
static |
Definition at line 221 of file nto-procfs.c.
References ctl_fd, err, pid, ptid_get_pid(), ptid_get_tid(), status, and selftests::ptid::tid.
Referenced by init_procfs_targets().
|
static |
Definition at line 303 of file nto-procfs.c.
References add_thread(), ctl_fd, find_thread_ptid(), inferior_ptid, new_thread(), pid, prune_threads(), thread_info::ptid, ptid_build(), ptid_get_pid(), status, selftests::ptid::tid, and update_thread_private_data().
Referenced by init_procfs_targets(), procfs_attach(), and procfs_create_inferior().
|
static |
Definition at line 739 of file nto-procfs.c.
References _DEBUG_FLAG_TRACE, ctl_fd, gdb_signal_from_host(), inferior_ptid, target_waitstatus::integer, target_waitstatus::kind, nto_handle_sigint(), nto_inferior_data(), null_ptid, ofunc, ptid_build(), ptid_equal(), ptid_get_pid(), target_waitstatus::sig, status, nto_inferior_data::stopped_flags, nto_inferior_data::stopped_pc, TARGET_WAITKIND_EXITED, TARGET_WAITKIND_SIGNALLED, TARGET_WAITKIND_SPURIOUS, TARGET_WAITKIND_STOPPED, target_waitstatus::value, WEXITSTATUS, and WNOHANG.
Referenced by init_procfs_targets().
|
static |
Definition at line 872 of file nto-procfs.c.
References ctl_fd, read(), SEEK_SET, TARGET_XFER_E_IO, and TARGET_XFER_OK.
Referenced by procfs_xfer_partial().
|
static |
Definition at line 893 of file nto-procfs.c.
References target_ops::beneath, ctl_fd, err, nto_read_auxv_from_initial_stack(), offset, procfs_xfer_memory(), TARGET_OBJECT_AUXV, TARGET_OBJECT_MEMORY, TARGET_XFER_E_IO, TARGET_XFER_EOF, TARGET_XFER_OK, tempbuf, and target_ops::to_xfer_partial.
Referenced by init_procfs_targets().
|
static |
Definition at line 266 of file nto-procfs.c.
References ctl_fd, nto_thread_info::flags, flags, gdb_assert, get_nto_thread_info(), memset(), new_thread(), nto_thread_info::state, selftests::ptid::tid, nto_thread_info::tid, and update_thread_private_data_name().
Referenced by procfs_update_thread_list().
|
static |
Definition at line 248 of file nto-procfs.c.
References gdb_assert, get_nto_thread_info(), nto_thread_info::name, new_thread(), and thread_info::priv.
Referenced by update_thread_private_data().
| int ctl_fd |
Definition at line 51 of file nto-procfs.c.
Referenced by do_attach(), get_regset(), procfs_breakpoint(), procfs_create_inferior(), procfs_detach(), procfs_fetch_registers(), procfs_hw_watchpoint(), procfs_interrupt(), procfs_meminfo(), procfs_mourn_inferior(), procfs_resume(), procfs_set_thread(), procfs_store_registers(), procfs_thread_alive(), procfs_update_thread_list(), procfs_wait(), procfs_xfer_memory(), procfs_xfer_partial(), and update_thread_private_data().
|
static |
Definition at line 78 of file nto-procfs.c.
Referenced by do_attach(), nto_node(), procfs_files_info(), procfs_open_1(), procfs_pid_to_exec_file(), and procfs_pidlist().
|
static |
Definition at line 1446 of file nto-procfs.c.
Referenced by init_procfs_targets(), and procfs_native_open().
|
static |
Definition at line 79 of file nto-procfs.c.
Referenced by nto_node(), procfs_create_inferior(), and procfs_open_1().
|
static |
Definition at line 1443 of file nto-procfs.c.
Referenced by init_procfs_targets(), and procfs_open().
|
static |
Definition at line 53 of file nto-procfs.c.
Referenced by gdb_demangle(), nto_handle_sigint_twice(), procfs_wait(), and wait_to_die_with_timeout().
|
static |
Definition at line 55 of file nto-procfs.c.
Referenced by _initialize_procfs(), env_execute_cli_command(), mi_execute_async_cli_command(), mi_execute_cli_command(), procfs_pass_signals(), and procfs_resume().
1.8.14