| GDBserver
   
    | 
#include "server.h"#include "gdbthread.h"#include "nto-low.h"#include "hostio.h"#include <limits.h>#include <fcntl.h>#include <spawn.h>#include <sys/procfs.h>#include <sys/auxv.h>#include <stdarg.h>#include <sys/iomgr.h>#include <sys/neutrino.h>Go to the source code of this file.
| Classes | |
| struct | nto_inferior | 
| Defines | |
| #define | TRACE nto_trace | 
| Functions | |
| static void | nto_trace (const char *fmt,...) | 
| static void | init_nto_inferior (struct nto_inferior *nto_inferior) | 
| static void | do_detach (void) | 
| static int | nto_set_thread (ptid_t ptid) | 
| static void | nto_find_new_threads (struct nto_inferior *nto_inferior) | 
| static pid_t | do_attach (pid_t pid) | 
| static int | nto_xfer_memory (off_t memaddr, unsigned char *myaddr, int len, int dowrite) | 
| static int | nto_breakpoint (CORE_ADDR addr, int type, int size) | 
| static int | nto_read_auxv_from_initial_stack (CORE_ADDR initial_stack, unsigned char *myaddr, unsigned int len) | 
| static int | nto_create_inferior (char *program, char **allargs) | 
| static int | nto_attach (unsigned long pid) | 
| static int | nto_kill (int pid) | 
| static int | nto_detach (int pid) | 
| static void | nto_mourn (struct process_info *process) | 
| static int | nto_thread_alive (ptid_t ptid) | 
| static void | nto_resume (struct thread_resume *resume_info, size_t n) | 
| static ptid_t | nto_wait (ptid_t ptid, struct target_waitstatus *ourstatus, int target_options) | 
| static void | nto_fetch_registers (struct regcache *regcache, int regno) | 
| static void | nto_store_registers (struct regcache *regcache, int regno) | 
| static int | nto_read_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len) | 
| static int | nto_write_memory (CORE_ADDR memaddr, const unsigned char *myaddr, int len) | 
| static void | nto_request_interrupt (void) | 
| static int | nto_read_auxv (CORE_ADDR offset, unsigned char *myaddr, unsigned int len) | 
| static int | nto_insert_point (char type, CORE_ADDR addr, int len) | 
| static int | nto_remove_point (char type, CORE_ADDR addr, int len) | 
| static int | nto_stopped_by_watchpoint (void) | 
| static CORE_ADDR | nto_stopped_data_address (void) | 
| static int | nto_supports_non_stop (void) | 
| void | initialize_low (void) | 
| Variables | |
| int | using_threads = 1 | 
| struct target_desc * | nto_tdesc | 
| static struct nto_inferior | nto_inferior | 
| static struct target_ops | nto_target_ops | 
Definition at line 54 of file nto-low.c.
Referenced by do_attach(), initialize_low(), nto_attach(), nto_create_inferior(), nto_detach(), nto_fetch_registers(), nto_find_new_threads(), nto_insert_point(), nto_kill(), nto_read_auxv(), nto_read_auxv_from_initial_stack(), nto_read_memory(), nto_remove_point(), nto_request_interrupt(), nto_resume(), nto_set_thread(), nto_stopped_by_watchpoint(), nto_stopped_data_address(), nto_store_registers(), nto_supports_non_stop(), nto_thread_alive(), nto_wait(), nto_write_memory(), and nto_xfer_memory().
| static pid_t do_attach | ( | pid_t | pid | ) |  [static] | 
Definition at line 171 of file nto-low.c.
References add_process(), linux_target_ops::arch_setup, nto_inferior::ctl_fd, do_detach(), init_nto_inferior(), nto_find_new_threads(), nto_inferior::nto_procfs_path, nto_tdesc, nto_inferior::pid, ptid_build(), ptid_get_lwp(), process_info::tdesc, the_low_target, TRACE, and xsnprintf().
Referenced by nto_attach(), and nto_create_inferior().
| static void do_detach | ( | void | ) |  [static] | 
Definition at line 78 of file nto-low.c.
References nto_inferior::ctl_fd, init_nto_inferior(), and nto_trace().
Referenced by do_attach(), nto_detach(), and nto_kill().
| static void init_nto_inferior | ( | struct nto_inferior * | nto_inferior | ) |  [static] | 
Definition at line 70 of file nto-low.c.
References nto_inferior::ctl_fd, memset(), and nto_inferior::pid.
Referenced by do_attach(), and do_detach().
| void initialize_low | ( | void | ) | 
Definition at line 950 of file nto-low.c.
References linux_target_ops::breakpoint, linux_target_ops::breakpoint_len, set_breakpoint_data(), set_target_ops(), the_low_target, and TRACE.
| static int nto_attach | ( | unsigned long | pid | ) |  [static] | 
Definition at line 386 of file nto-low.c.
References do_attach(), error(), and TRACE.
| static int nto_breakpoint | ( | CORE_ADDR | addr, | 
| int | type, | ||
| int | size | ||
| ) |  [static] | 
Definition at line 263 of file nto-low.c.
References nto_inferior::ctl_fd.
Referenced by nto_insert_point(), and nto_remove_point().
| static int nto_create_inferior | ( | char * | program, | 
| char ** | allargs | ||
| ) |  [static] | 
Definition at line 354 of file nto-low.c.
References do_attach(), memset(), and TRACE.
| static int nto_detach | ( | int | pid | ) |  [static] | 
Definition at line 408 of file nto-low.c.
References do_detach(), and TRACE.
| static void nto_fetch_registers | ( | struct regcache * | regcache, | 
| int | regno | ||
| ) |  [static] | 
Definition at line 616 of file nto-low.c.
References nto_inferior::ctl_fd, current_inferior, nto_set_thread(), supply_register(), the_low_target, thread_to_gdb_id(), and TRACE.
| static void nto_find_new_threads | ( | struct nto_inferior * | nto_inferior | ) |  [static] | 
Definition at line 119 of file nto-low.c.
References add_thread(), nto_inferior::ctl_fd, find_thread_ptid(), nto_inferior::pid, ptid_build(), remove_thread(), ptid::tid, and TRACE.
Referenced by do_attach(), and nto_wait().
| static int nto_insert_point | ( | char | type, | 
| CORE_ADDR | addr, | ||
| int | len | ||
| ) |  [static] | 
Definition at line 778 of file nto-low.c.
References nto_breakpoint(), and TRACE.
| static int nto_kill | ( | int | pid | ) |  [static] | 
Definition at line 397 of file nto-low.c.
References do_detach(), and TRACE.
| static void nto_mourn | ( | struct process_info * | process | ) |  [static] | 
Definition at line 416 of file nto-low.c.
References remove_process().
| static int nto_read_auxv | ( | CORE_ADDR | offset, | 
| unsigned char * | myaddr, | ||
| unsigned int | len | ||
| ) |  [static] | 
Definition at line 754 of file nto-low.c.
References nto_inferior::ctl_fd, nto_read_auxv_from_initial_stack(), and TRACE.
| static int nto_read_auxv_from_initial_stack | ( | CORE_ADDR | initial_stack, | 
| unsigned char * | myaddr, | ||
| unsigned int | len | ||
| ) |  [static] | 
Definition at line 282 of file nto-low.c.
References memset(), nto_xfer_memory(), and TRACE.
Referenced by nto_read_auxv().
| static int nto_read_memory | ( | CORE_ADDR | memaddr, | 
| unsigned char * | myaddr, | ||
| int | len | ||
| ) |  [static] | 
Definition at line 701 of file nto-low.c.
References nto_xfer_memory(), and TRACE.
| static int nto_remove_point | ( | char | type, | 
| CORE_ADDR | addr, | ||
| int | len | ||
| ) |  [static] | 
Definition at line 810 of file nto-low.c.
References nto_breakpoint(), and TRACE.
| static void nto_request_interrupt | ( | void | ) |  [static] | 
Definition at line 739 of file nto-low.c.
References nto_inferior::ctl_fd, nto_set_thread(), nto_inferior::pid, ptid_build(), and TRACE.
| static void nto_resume | ( | struct thread_resume * | resume_info, | 
| size_t | n | ||
| ) |  [static] | 
Definition at line 444 of file nto-low.c.
References nto_inferior::ctl_fd, thread_resume::kind, nto_set_thread(), regcache_invalidate(), thread_resume::sig, strerror, thread_resume::thread, and TRACE.
| static int nto_set_thread | ( | ptid_t | ptid | ) |  [static] | 
Definition at line 91 of file nto-low.c.
References nto_inferior::ctl_fd, minus_one_ptid, null_ptid, ptid_equal(), ptid_get_lwp(), ptid_get_pid(), and TRACE.
Referenced by nto_fetch_registers(), nto_request_interrupt(), nto_resume(), nto_stopped_by_watchpoint(), nto_stopped_data_address(), and nto_store_registers().
| static int nto_stopped_by_watchpoint | ( | void | ) |  [static] | 
Definition at line 844 of file nto-low.c.
References nto_inferior::ctl_fd, current_inferior, nto_set_thread(), thread_to_gdb_id(), and TRACE.
| static CORE_ADDR nto_stopped_data_address | ( | void | ) |  [static] | 
Definition at line 876 of file nto-low.c.
References nto_inferior::ctl_fd, current_inferior, nto_set_thread(), thread_to_gdb_id(), and TRACE.
| static void nto_store_registers | ( | struct regcache * | regcache, | 
| int | regno | ||
| ) |  [static] | 
Definition at line 665 of file nto-low.c.
References collect_register(), nto_inferior::ctl_fd, current_inferior, memset(), nto_set_thread(), the_low_target, thread_to_gdb_id(), and TRACE.
| static int nto_supports_non_stop | ( | void | ) |  [static] | 
| static int nto_thread_alive | ( | ptid_t | ptid | ) |  [static] | 
Definition at line 426 of file nto-low.c.
References ptid_get_lwp(), ptid_get_pid(), and TRACE.
| static void nto_trace | ( | const char * | fmt, | 
| ... | |||
| ) |  [static] | 
| static ptid_t nto_wait | ( | ptid_t | ptid, | 
| struct target_waitstatus * | ourstatus, | ||
| int | target_options | ||
| ) |  [static] | 
Definition at line 511 of file nto-low.c.
References nto_inferior::ctl_fd, nto_inferior::exit_signo, gdb_signal_from_host(), nto_find_new_threads(), ptid_build(), ptid_get_pid(), and TRACE.
| static int nto_write_memory | ( | CORE_ADDR | memaddr, | 
| const unsigned char * | myaddr, | ||
| int | len | ||
| ) |  [static] | 
Definition at line 720 of file nto-low.c.
References nto_xfer_memory(), and TRACE.
| static int nto_xfer_memory | ( | off_t | memaddr, | 
| unsigned char * | myaddr, | ||
| int | len, | ||
| int | dowrite | ||
| ) |  [static] | 
Definition at line 234 of file nto-low.c.
References nto_inferior::ctl_fd, errno, strerror, and TRACE.
Referenced by nto_read_auxv_from_initial_stack(), nto_read_memory(), and nto_write_memory().
| struct nto_inferior nto_inferior  [static] | 
| struct target_ops nto_target_ops  [static] | 
| struct target_desc* nto_tdesc | 
Definition at line 39 of file nto-low.c.
Referenced by do_attach(), and nto_x86_arch_setup().
| int using_threads = 1 | 
 1.7.6.1
 1.7.6.1