GDBserver
Classes | Macros | Functions | Variables
nto-low.c File Reference
#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 <sys/iomgr.h>
#include <sys/neutrino.h>

Go to the source code of this file.

Classes

struct  nto_inferior
 

Macros

#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_supports_z_point_type (char z_type)
 
static int nto_insert_point (enum raw_bkpt_type type, CORE_ADDR addr, int size, struct raw_breakpoint *bp)
 
static int nto_remove_point (enum raw_bkpt_type type, CORE_ADDR addr, int size, struct raw_breakpoint *bp)
 
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
 
const struct target_descnto_tdesc
 
static struct nto_inferior nto_inferior
 
static struct target_ops nto_target_ops
 

Macro Definition Documentation

#define TRACE   nto_trace

Function Documentation

static pid_t do_attach ( pid_t  pid)
static
static void do_detach ( void  )
static

Definition at line 77 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 69 of file nto-low.c.

References nto_inferior::ctl_fd, and nto_inferior::pid.

Referenced by do_attach(), and do_detach().

void initialize_low ( void  )
static int nto_attach ( unsigned long  pid)
static

Definition at line 385 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 262 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 353 of file nto-low.c.

References do_attach(), and TRACE.

static int nto_detach ( int  pid)
static

Definition at line 407 of file nto-low.c.

References do_detach(), and TRACE.

static void nto_fetch_registers ( struct regcache regcache,
int  regno 
)
static
static void nto_find_new_threads ( struct nto_inferior nto_inferior)
static
static int nto_insert_point ( enum raw_bkpt_type  type,
CORE_ADDR  addr,
int  size,
struct raw_breakpoint bp 
)
static
static int nto_kill ( int  pid)
static

Definition at line 396 of file nto-low.c.

References do_detach(), and TRACE.

static void nto_mourn ( struct process_info process)
static

Definition at line 415 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 753 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 281 of file nto-low.c.

References 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 700 of file nto-low.c.

References nto_xfer_memory(), and TRACE.

static int nto_remove_point ( enum raw_bkpt_type  type,
CORE_ADDR  addr,
int  size,
struct raw_breakpoint bp 
)
static
static void nto_request_interrupt ( void  )
static

Definition at line 738 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
static int nto_set_thread ( ptid_t  ptid)
static
static int nto_stopped_by_watchpoint ( void  )
static
static CORE_ADDR nto_stopped_data_address ( void  )
static
static void nto_store_registers ( struct regcache regcache,
int  regno 
)
static
static int nto_supports_non_stop ( void  )
static

Definition at line 918 of file nto-low.c.

References TRACE.

static int nto_supports_z_point_type ( char  z_type)
static
static int nto_thread_alive ( ptid_t  ptid)
static

Definition at line 425 of file nto-low.c.

References ptid_get_lwp(), ptid_get_pid(), and TRACE.

static void nto_trace ( const char *  fmt,
  ... 
)
static

Definition at line 41 of file nto-low.c.

References debug_threads.

Referenced by do_detach().

static ptid_t nto_wait ( ptid_t  ptid,
struct target_waitstatus *  ourstatus,
int  target_options 
)
static
static int nto_write_memory ( CORE_ADDR  memaddr,
const unsigned char *  myaddr,
int  len 
)
static

Definition at line 719 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

Variable Documentation

struct nto_inferior nto_inferior
static

Definition at line 66 of file nto-low.c.

struct target_ops nto_target_ops
static

Definition at line 926 of file nto-low.c.

const struct target_desc* nto_tdesc

Definition at line 38 of file nto-low.c.

Referenced by do_attach(), and nto_x86_arch_setup().

int using_threads = 1

Definition at line 36 of file nto-low.c.