GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
nto-procfs.c File Reference
#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 "gdbsupport/filestuff.h"
#include "gdbsupport/scoped_fd.h"

Go to the source code of this file.

Classes

struct  nto_procfs_target
 
class  nto_procfs_target_native
 
struct  nto_procfs_target_procfs
 

Macros

#define NULL_PID   0
 
#define _DEBUG_FLAG_TRACE
 
#define OSTYPE_NTO   1
 

Functions

static ptid_t do_attach (ptid_t ptid)
 
static unsigned nto_node (void)
 
static enum gdb_osabi procfs_is_nto_target (bfd *abfd)
 
static void procfs_set_thread (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_pidlist (const char *args, int from_tty)
 
static void procfs_meminfo (const char *args, int from_tty)
 
static void interrupt_query (void)
 
static void nto_handle_sigint_twice (int signo)
 
static void nto_handle_sigint (int signo)
 
static enum target_xfer_status procfs_xfer_memory (gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST memaddr, ULONGEST len, ULONGEST *xfered_len)
 
static int procfs_breakpoint (CORE_ADDR addr, int type, int size)
 
static void breakup_args (char *scratch, char **argv)
 
static int get_regset (int regset, char *buf, int bufsize, int *regsize)
 
static void init_procfs_targets (void)
 
void _initialize_procfs ()
 
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 const target_info nto_native_target_info
 
static const target_info nto_procfs_target_info
 
static char * nodestr
 
static unsigned nto_procfs_node = ND_LOCAL_NODE
 
static nto_procfs_target_procfs nto_procfs_ops
 
static nto_procfs_target_native nto_native_ops
 

Macro Definition Documentation

◆ _DEBUG_FLAG_TRACE

#define _DEBUG_FLAG_TRACE
Value:
(_DEBUG_FLAG_TRACE_EXEC|_DEBUG_FLAG_TRACE_RD|\
_DEBUG_FLAG_TRACE_WR|_DEBUG_FLAG_TRACE_MODIFY)

Definition at line 49 of file nto-procfs.c.

Referenced by nto_procfs_target::wait().

◆ NULL_PID

#define NULL_PID   0

Definition at line 48 of file nto-procfs.c.

◆ OSTYPE_NTO

#define OSTYPE_NTO   1

Definition at line 1485 of file nto-procfs.c.

Function Documentation

◆ _initialize_procfs()

void _initialize_procfs ( )

◆ breakup_args()

static void breakup_args ( char * scratch,
char ** argv )
static

Definition at line 1126 of file nto-procfs.c.

Referenced by nto_procfs_target::create_inferior().

◆ do_attach()

static ptid_t do_attach ( ptid_t ptid)
static

◆ get_regset()

static int get_regset ( int regset,
char * buf,
int bufsize,
int * regsize )
static

◆ init_procfs_targets()

static void init_procfs_targets ( void )
static

◆ interrupt_query()

static void interrupt_query ( void )
static

Definition at line 759 of file nto-procfs.c.

References inferior_ptid, query(), quit(), and target_mourn_inferior().

Referenced by nto_handle_sigint_twice().

◆ nto_handle_sigint()

static void nto_handle_sigint ( int signo)
static

Definition at line 779 of file nto-procfs.c.

References nto_handle_sigint_twice(), and target_interrupt().

Referenced by nto_procfs_target::wait().

◆ nto_handle_sigint_twice()

static void nto_handle_sigint_twice ( int signo)
static

Definition at line 771 of file nto-procfs.c.

References interrupt_query(), nto_handle_sigint_twice(), and ofunc.

Referenced by nto_handle_sigint(), and nto_handle_sigint_twice().

◆ nto_node()

static unsigned nto_node ( void )
static

◆ procfs_breakpoint()

static int procfs_breakpoint ( CORE_ADDR addr,
int type,
int size )
static

◆ procfs_hw_watchpoint()

static int procfs_hw_watchpoint ( int addr,
int len,
enum target_hw_bp_type type )
static

Definition at line 1516 of file nto-procfs.c.

References ctl_fd.

◆ procfs_is_nto_target()

static enum gdb_osabi procfs_is_nto_target ( bfd * abfd)
static

Definition at line 185 of file nto-procfs.c.

References GDB_OSABI_QNXNTO.

Referenced by _initialize_procfs(), and nto_procfs_target::open().

◆ procfs_meminfo()

static void procfs_meminfo ( const char * args,
int from_tty )
static

Definition at line 509 of file nto-procfs.c.

References ctl_fd, err, flags, gdb_printf(), name, size, and xfree().

Referenced by _initialize_procfs().

◆ procfs_pidlist()

static void procfs_pidlist ( const char * args,
int from_tty )
static

Definition at line 422 of file nto-procfs.c.

References err, gdb_printf(), gdb_stderr, name, nodestr, pid, and status.

Referenced by _initialize_procfs().

◆ procfs_set_thread()

static void procfs_set_thread ( ptid_t ptid)
static

◆ procfs_xfer_memory()

static enum target_xfer_status procfs_xfer_memory ( gdb_byte * readbuf,
const gdb_byte * writebuf,
ULONGEST memaddr,
ULONGEST len,
ULONGEST * xfered_len )
static

Definition at line 907 of file nto-procfs.c.

References ctl_fd, read(), SEEK_SET, TARGET_XFER_E_IO, and TARGET_XFER_OK.

Referenced by nto_procfs_target::xfer_partial().

◆ update_thread_private_data()

static void update_thread_private_data ( struct thread_info * new_thread,
pthread_t tid,
int state,
int flags )
static

◆ update_thread_private_data_name()

static void update_thread_private_data_name ( struct thread_info * new_thread,
const char * newname )
static

Variable Documentation

◆ ctl_fd

int ctl_fd

◆ nodestr

char* nodestr
static

◆ nto_native_ops

nto_procfs_target_native nto_native_ops
static

Definition at line 1470 of file nto-procfs.c.

Referenced by init_procfs_targets().

◆ nto_native_target_info

const target_info nto_native_target_info
static
Initial value:
= {
"native",
N_("QNX Neutrino local process"),
}

Definition at line 129 of file nto-procfs.c.

Referenced by nto_procfs_target_native::info(), and init_procfs_targets().

◆ nto_procfs_node

unsigned nto_procfs_node = ND_LOCAL_NODE
static

◆ nto_procfs_ops

nto_procfs_target_procfs nto_procfs_ops
static

Definition at line 1467 of file nto-procfs.c.

◆ nto_procfs_target_info

const target_info nto_procfs_target_info
static
Initial value:
= {
"procfs",
N_("QNX Neutrino local or remote process"),
}

Definition at line 143 of file nto-procfs.c.

Referenced by nto_procfs_target_procfs::info(), and init_procfs_targets().

◆ ofunc

sighandler_t ofunc
static

Definition at line 54 of file nto-procfs.c.

Referenced by nto_handle_sigint_twice(), and nto_procfs_target::wait().

◆ run

procfs_run run
static