GDB (API)
Defines | Functions | Variables
/home/stan/gdb/src/gdb/gnu-nat.c File Reference
#include "defs.h"
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <setjmp.h>
#include <signal.h>
#include <stdio.h>
#include "gdb_string.h"
#include <sys/ptrace.h>
#include <mach.h>
#include <mach_error.h>
#include <mach/exception.h>
#include <mach/message.h>
#include <mach/notify.h>
#include <mach/vm_attributes.h>
#include <hurd.h>
#include <hurd/interrupt.h>
#include <hurd/msg.h>
#include <hurd/msg_request.h>
#include <hurd/process.h>
#include <hurd/process_request.h>
#include <hurd/signal.h>
#include <hurd/sigpreempt.h>
#include <portinfo.h>
#include "inferior.h"
#include "symtab.h"
#include "value.h"
#include "language.h"
#include "target.h"
#include "gdb_wait.h"
#include "gdbcmd.h"
#include "gdbcore.h"
#include "gdbthread.h"
#include "gdb_assert.h"
#include "gdb_obstack.h"
#include "gnu-nat.h"
#include "inf-child.h"
#include "exc_request_S.h"
#include "notify_S.h"
#include "process_reply_S.h"
#include "msg_reply_S.h"
#include "exc_request_U.h"
#include "msg_U.h"

Go to the source code of this file.

Defines

#define inf_debug(_inf, msg, args...)
#define INF_MSGPORT_RPC(inf, rpc_expr)
#define INF_RESUME_MSGPORT_RPC(inf, rpc_expr)
#define NAME   gdb_signal_to_name (sig)
#define CHK_GOTO_OUT(str, ret)   do if (ret != KERN_SUCCESS) { errstr = #str; goto out; } while(0)
#define parse_bool_arg(args, cmd_prefix)   _parse_bool_arg (args, "on", "off", cmd_prefix)

Functions

struct inf * make_inf ()
void inf_clear_wait (struct inf *inf)
void inf_cleanup (struct inf *inf)
void inf_startup (struct inf *inf, int pid)
int inf_update_suspends (struct inf *inf)
void inf_set_pid (struct inf *inf, pid_t pid)
void inf_validate_procs (struct inf *inf)
void inf_steal_exc_ports (struct inf *inf)
void inf_restore_exc_ports (struct inf *inf)
struct procinf_tid_to_proc (struct inf *inf, int tid)
void inf_set_threads_resume_sc (struct inf *inf, struct proc *run_thread, int run_others)
int inf_set_threads_resume_sc_for_signal_thread (struct inf *inf)
void inf_suspend (struct inf *inf)
void inf_resume (struct inf *inf)
void inf_set_step_thread (struct inf *inf, struct proc *proc)
void inf_detach (struct inf *inf)
void inf_attach (struct inf *inf, int pid)
void inf_signal (struct inf *inf, enum gdb_signal sig)
void inf_continue (struct inf *inf)
void proc_abort (struct proc *proc, int force)
struct procmake_proc (struct inf *inf, mach_port_t port, int tid)
struct proc_proc_free (struct proc *proc)
int proc_update_sc (struct proc *proc)
error_t proc_get_exception_port (struct proc *proc, mach_port_t *port)
error_t proc_set_exception_port (struct proc *proc, mach_port_t port)
void proc_steal_exc_port (struct proc *proc, mach_port_t exc_port)
void proc_restore_exc_port (struct proc *proc)
int proc_trace (struct proc *proc, int set)
int __proc_pid (struct proc *proc)
thread_state_t proc_get_state (struct proc *proc, int will_modify)
void inf_set_traced (struct inf *inf, int on)
struct procinf_tid_to_thread (struct inf *inf, int tid)
struct procinf_port_to_thread (struct inf *inf, mach_port_t port)
int inf_update_procs (struct inf *inf)
error_t S_exception_raise_request (mach_port_t port, mach_port_t reply_port, thread_t thread_port, task_t task_port, int exception, int code, int subcode)
void inf_task_died_status (struct inf *inf)
error_t do_mach_notify_dead_name (mach_port_t notify, mach_port_t dead_port)
error_t do_mach_notify_no_senders (mach_port_t notify, mach_port_mscount_t count)
error_t do_mach_notify_port_deleted (mach_port_t notify, mach_port_t name)
error_t do_mach_notify_msg_accepted (mach_port_t notify, mach_port_t name)
error_t do_mach_notify_port_destroyed (mach_port_t notify, mach_port_t name)
error_t do_mach_notify_send_once (mach_port_t notify)
error_t S_proc_wait_reply (mach_port_t reply, error_t err, int status, int sigcode, rusage_t rusage, pid_t pid)
error_t S_proc_setmsgport_reply (mach_port_t reply, error_t err, mach_port_t old_msg_port)
error_t S_proc_getmsgport_reply (mach_port_t reply, error_t err, mach_port_t msg_port)
error_t S_msg_sig_post_untraced_reply (mach_port_t reply, error_t err)
error_t S_msg_sig_post_reply (mach_port_t reply, error_t err)
char * proc_string (struct proc *proc)
struct target_opsgnu_target (void)
void _initialize_gnu_nat (void)

Variables

int proc_wait_pid = 0
int proc_waits_pending = 0
int gnu_debug_flag = 0
struct inf * gnu_current_inf = 0
struct inf * waiting_inf
struct obstack region_obstack
struct cmd_list_elementthread_cmd_list
struct cmd_list_elementset_thread_cmd_list = NULL
struct cmd_list_elementshow_thread_cmd_list = NULL
struct cmd_list_elementset_thread_default_cmd_list = NULL
struct cmd_list_elementshow_thread_default_cmd_list = NULL

Define Documentation

#define CHK_GOTO_OUT (   str,
  ret 
)    do if (ret != KERN_SUCCESS) { errstr = #str; goto out; } while(0)

Definition at line 2303 of file gnu-nat.c.

#define inf_debug (   _inf,
  msg,
  args... 
)
Value:
do { struct inf *__inf = (_inf); \
       debug ("{inf %d %s}: " msg, __inf->pid, \
       host_address_to_string (__inf) , ##args); } while (0)

Definition at line 112 of file gnu-nat.c.

#define INF_MSGPORT_RPC (   inf,
  rpc_expr 
)
Value:
HURD_MSGPORT_RPC (proc_getmsgport (proc_server, inf->pid, &msgport), \
                    (refport = inf->task->port, 0), 0, \
                    msgport ? (rpc_expr) : EIEIO)

Definition at line 131 of file gnu-nat.c.

#define INF_RESUME_MSGPORT_RPC (   inf,
  rpc_expr 
)
Value:
(inf_set_threads_resume_sc_for_signal_thread (inf) \
   ? ({ error_t __e; \
        inf_resume (inf); \
        __e = INF_MSGPORT_RPC (inf, rpc_expr); \
        inf_suspend (inf); \
        __e; }) \
   : EIEIO)

Definition at line 139 of file gnu-nat.c.

#define NAME   gdb_signal_to_name (sig)
#define parse_bool_arg (   args,
  cmd_prefix 
)    _parse_bool_arg (args, "on", "off", cmd_prefix)

Definition at line 2743 of file gnu-nat.c.


Function Documentation

int __proc_pid ( struct proc proc)

Definition at line 247 of file gnu-nat.c.

void _initialize_gnu_nat ( void  )

Definition at line 3443 of file gnu-nat.c.

struct proc * _proc_free ( struct proc proc) [read]

Definition at line 607 of file gnu-nat.c.

error_t do_mach_notify_dead_name ( mach_port_t  notify,
mach_port_t  dead_port 
)

Definition at line 1757 of file gnu-nat.c.

error_t do_mach_notify_msg_accepted ( mach_port_t  notify,
mach_port_t  name 
)

Definition at line 1818 of file gnu-nat.c.

error_t do_mach_notify_no_senders ( mach_port_t  notify,
mach_port_mscount_t  count 
)

Definition at line 1806 of file gnu-nat.c.

error_t do_mach_notify_port_deleted ( mach_port_t  notify,
mach_port_t  name 
)

Definition at line 1812 of file gnu-nat.c.

error_t do_mach_notify_port_destroyed ( mach_port_t  notify,
mach_port_t  name 
)

Definition at line 1824 of file gnu-nat.c.

error_t do_mach_notify_send_once ( mach_port_t  notify)

Definition at line 1830 of file gnu-nat.c.

struct target_ops* gnu_target ( void  ) [read]

Definition at line 2645 of file gnu-nat.c.

void inf_attach ( struct inf *  inf,
int  pid 
)

Definition at line 1277 of file gnu-nat.c.

void inf_cleanup ( struct inf *  inf)

Definition at line 696 of file gnu-nat.c.

void inf_clear_wait ( struct inf *  inf)

Definition at line 676 of file gnu-nat.c.

void inf_continue ( struct inf *  inf)

Definition at line 1411 of file gnu-nat.c.

void inf_detach ( struct inf *  inf)

Definition at line 1235 of file gnu-nat.c.

struct proc* inf_port_to_thread ( struct inf *  inf,
mach_port_t  port 
) [read]

Definition at line 979 of file gnu-nat.c.

void inf_restore_exc_ports ( struct inf *  inf)

Definition at line 1305 of file gnu-nat.c.

void inf_resume ( struct inf *  inf)

Definition at line 1142 of file gnu-nat.c.

void inf_set_pid ( struct inf *  inf,
pid_t  pid 
)

Definition at line 742 of file gnu-nat.c.

void inf_set_step_thread ( struct inf *  inf,
struct proc proc 
)

Definition at line 1187 of file gnu-nat.c.

void inf_set_threads_resume_sc ( struct inf *  inf,
struct proc run_thread,
int  run_others 
)

Definition at line 1123 of file gnu-nat.c.

Definition at line 1213 of file gnu-nat.c.

void inf_set_traced ( struct inf *  inf,
int  on 
)

Definition at line 878 of file gnu-nat.c.

void inf_signal ( struct inf *  inf,
enum gdb_signal  sig 
)

Definition at line 1323 of file gnu-nat.c.

void inf_startup ( struct inf *  inf,
int  pid 
)

Definition at line 719 of file gnu-nat.c.

void inf_steal_exc_ports ( struct inf *  inf)

Definition at line 1290 of file gnu-nat.c.

void inf_suspend ( struct inf *  inf)

Definition at line 1167 of file gnu-nat.c.

void inf_task_died_status ( struct inf *  inf)

Definition at line 1747 of file gnu-nat.c.

struct proc* inf_tid_to_proc ( struct inf *  inf,
int  tid 
) [read]
struct proc* inf_tid_to_thread ( struct inf *  inf,
int  tid 
) [read]

Definition at line 965 of file gnu-nat.c.

int inf_update_procs ( struct inf *  inf)

Definition at line 1110 of file gnu-nat.c.

int inf_update_suspends ( struct inf *  inf)

Definition at line 914 of file gnu-nat.c.

void inf_validate_procs ( struct inf *  inf)

Definition at line 994 of file gnu-nat.c.

struct inf * make_inf ( void  ) [read]

Definition at line 642 of file gnu-nat.c.

struct proc * make_proc ( struct inf *  inf,
mach_port_t  port,
int  tid 
) [read]

Definition at line 543 of file gnu-nat.c.

void proc_abort ( struct proc proc,
int  force 
)

Definition at line 322 of file gnu-nat.c.

error_t proc_get_exception_port ( struct proc proc,
mach_port_t *  port 
)

Definition at line 396 of file gnu-nat.c.

thread_state_t proc_get_state ( struct proc proc,
int  will_modify 
)

Definition at line 359 of file gnu-nat.c.

void proc_restore_exc_port ( struct proc proc)

Definition at line 483 of file gnu-nat.c.

error_t proc_set_exception_port ( struct proc proc,
mach_port_t  port 
)

Definition at line 406 of file gnu-nat.c.

void proc_steal_exc_port ( struct proc proc,
mach_port_t  exc_port 
)

Definition at line 440 of file gnu-nat.c.

char* proc_string ( struct proc proc)

Definition at line 2610 of file gnu-nat.c.

int proc_trace ( struct proc proc,
int  set 
)

Definition at line 513 of file gnu-nat.c.

int proc_update_sc ( struct proc proc)

Definition at line 256 of file gnu-nat.c.

error_t S_exception_raise_request ( mach_port_t  port,
mach_port_t  reply_port,
thread_t  thread_port,
task_t  task_port,
int  exception,
int  code,
int  subcode 
)

Definition at line 1660 of file gnu-nat.c.

error_t S_msg_sig_post_reply ( mach_port_t  reply,
error_t  err 
)

Definition at line 1938 of file gnu-nat.c.

error_t S_msg_sig_post_untraced_reply ( mach_port_t  reply,
error_t  err 
)

Definition at line 1908 of file gnu-nat.c.

error_t S_proc_getmsgport_reply ( mach_port_t  reply,
error_t  err,
mach_port_t  msg_port 
)

Definition at line 1899 of file gnu-nat.c.

error_t S_proc_setmsgport_reply ( mach_port_t  reply,
error_t  err,
mach_port_t  old_msg_port 
)

Definition at line 1892 of file gnu-nat.c.

error_t S_proc_wait_reply ( mach_port_t  reply,
error_t  err,
int  status,
int  sigcode,
rusage_t  rusage,
pid_t  pid 
)

Definition at line 1839 of file gnu-nat.c.


Variable Documentation

struct inf* gnu_current_inf = 0

Definition at line 1438 of file gnu-nat.c.

Definition at line 86 of file gnu-nat.c.

Definition at line 81 of file gnu-nat.c.

Definition at line 84 of file gnu-nat.c.

struct obstack region_obstack

Definition at line 2314 of file gnu-nat.c.

Definition at line 2680 of file gnu-nat.c.

Definition at line 2684 of file gnu-nat.c.

Definition at line 2681 of file gnu-nat.c.

Definition at line 2685 of file gnu-nat.c.

Definition at line 1510 of file thread.c.

struct inf* waiting_inf

Definition at line 1442 of file gnu-nat.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines