GDBserver
Classes | Defines | Functions | Variables
/home/stan/gdb/src/gdb/gdbserver/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 <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_descnto_tdesc
static struct nto_inferior nto_inferior
static struct target_ops nto_target_ops

Define 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 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  )
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]
static void nto_find_new_threads ( struct nto_inferior nto_inferior) [static]
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]
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 903 of file nto-low.c.

References TRACE.

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]

Definition at line 42 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 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]

Variable Documentation

struct nto_inferior nto_inferior [static]

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

struct target_ops nto_target_ops [static]

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

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

Referenced by do_attach(), and nto_x86_arch_setup().

int using_threads = 1

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

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines