• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src/router/gdb/gdb/

Lines Matching defs:procinfo

301 /* The procinfo struct is a wrapper to hold all the state information
302 concerning a /proc process. There should be exactly one procinfo
304 process at a time, that means there should be only one procinfo.
306 single process procinfo.
311 procinfo as an argument.
313 There will be a separate procinfo structure for use by the (not yet
316 inferior's procinfo information. */
346 typedef struct procinfo {
347 struct procinfo *next;
389 struct procinfo *thread_list;
395 } procinfo;
399 /* Function prototypes for procinfo module: */
401 static procinfo *find_procinfo_or_die (int pid, int tid);
402 static procinfo *find_procinfo (int pid, int tid);
403 static procinfo *create_procinfo (int pid, int tid);
404 static void destroy_procinfo (procinfo * p);
406 static void dead_procinfo (procinfo * p, char *msg, int killp);
407 static int open_procinfo_files (procinfo * p, int which);
408 static void close_procinfo_files (procinfo * p);
409 static int sysset_t_size (procinfo *p);
410 static sysset_t *sysset_t_alloc (procinfo * pi);
412 static void load_syscalls (procinfo *pi);
413 static void free_syscalls (procinfo *pi);
414 static int find_syscall (procinfo *pi, char *name);
417 /* The head of the procinfo list: */
418 static procinfo * procinfo_list;
423 * Search the procinfo list.
425 * Returns: pointer to procinfo, or NULL if not found.
428 static procinfo *
431 procinfo *pi;
461 static procinfo *
464 procinfo *pi = find_procinfo (pid, tid);
469 error (_("procfs: couldn't find pid %d (kernel thread %d) in procinfo list."),
472 error (_("procfs: couldn't find pid %d in procinfo list."), pid);
527 open_procinfo_files (procinfo *pi, int which)
562 * three fields of the procinfo struct (ctl_fd, status_fd, and
625 * In this case, there is only one file descriptor for each procinfo
631 * For convenience, we copy each procinfo's single file descriptor
643 if (pi->tid == 0) /* Master procinfo for the process */
649 else /* LWP thread procinfo */
652 procinfo *process;
655 /* Find the procinfo for the entire process. */
676 * Allocate a data structure and link it into the procinfo list.
679 * Return: pointer to new procinfo struct.
682 static procinfo *
685 procinfo *pi, *parent;
696 pi = (procinfo *) xmalloc (sizeof (procinfo));
697 memset (pi, 0, sizeof (procinfo));
731 * Close all file descriptors associated with the procinfo
735 close_procinfo_files (procinfo *pi)
755 destroy_one_procinfo (procinfo **list, procinfo *pi)
757 procinfo *ptr;
759 /* Step one: unlink the procinfo from its list */
783 destroy_procinfo (procinfo *pi)
785 procinfo *tmp;
787 if (pi->tid != 0) /* destroy a thread procinfo */
792 else /* destroy a process procinfo and all its threads */
813 * To be called on a non_recoverable error for a procinfo.
819 dead_procinfo (procinfo *pi, char *msg, int kill_p)
848 sysset_t_size (procinfo * pi)
864 sysset_t_alloc (procinfo * pi)
889 load_syscalls (procinfo *pi)
986 Free the space allocated for the syscall names from the procinfo
990 free_syscalls (procinfo *pi)
1011 find_syscall (procinfo *pi, char *name)
1039 int proc_get_status (procinfo * pi);
1040 long proc_flags (procinfo * pi);
1041 int proc_why (procinfo * pi);
1042 int proc_what (procinfo * pi);
1043 int proc_set_run_on_last_close (procinfo * pi);
1044 int proc_unset_run_on_last_close (procinfo * pi);
1045 int proc_set_inherit_on_fork (procinfo * pi);
1046 int proc_unset_inherit_on_fork (procinfo * pi);
1047 int proc_set_async (procinfo * pi);
1048 int proc_unset_async (procinfo * pi);
1049 int proc_stop_process (procinfo * pi);
1050 int proc_trace_signal (procinfo * pi, int signo);
1051 int proc_ignore_signal (procinfo * pi, int signo);
1052 int proc_clear_current_fault (procinfo * pi);
1053 int proc_set_current_signal (procinfo * pi, int signo);
1054 int proc_clear_current_signal (procinfo * pi);
1055 int proc_set_gregs (procinfo * pi);
1056 int proc_set_fpregs (procinfo * pi);
1057 int proc_wait_for_stop (procinfo * pi);
1058 int proc_run_process (procinfo * pi, int step, int signo);
1059 int proc_kill (procinfo * pi, int signo);
1060 int proc_parent_pid (procinfo * pi);
1061 int proc_get_nthreads (procinfo * pi);
1062 int proc_get_current_thread (procinfo * pi);
1063 int proc_set_held_signals (procinfo * pi, gdb_sigset_t * sighold);
1064 int proc_set_traced_sysexit (procinfo * pi, sysset_t * sysset);
1065 int proc_set_traced_sysentry (procinfo * pi, sysset_t * sysset);
1066 int proc_set_traced_faults (procinfo * pi, fltset_t * fltset);
1067 int proc_set_traced_signals (procinfo * pi, gdb_sigset_t * sigset);
1069 int proc_update_threads (procinfo * pi);
1070 int proc_iterate_over_threads (procinfo * pi,
1071 int (*func) (procinfo *, procinfo *, void *),
1074 gdb_gregset_t *proc_get_gregs (procinfo * pi);
1075 gdb_fpregset_t *proc_get_fpregs (procinfo * pi);
1076 sysset_t *proc_get_traced_sysexit (procinfo * pi, sysset_t * save);
1077 sysset_t *proc_get_traced_sysentry (procinfo * pi, sysset_t * save);
1078 fltset_t *proc_get_traced_faults (procinfo * pi, fltset_t * save);
1079 gdb_sigset_t *proc_get_traced_signals (procinfo * pi, gdb_sigset_t * save);
1080 gdb_sigset_t *proc_get_held_signals (procinfo * pi, gdb_sigset_t * save);
1081 gdb_sigset_t *proc_get_pending_signals (procinfo * pi, gdb_sigset_t * save);
1082 gdb_sigaction_t *proc_get_signal_actions (procinfo * pi, gdb_sigaction_t *save);
1084 void proc_warn (procinfo * pi, char *func, int line);
1085 void proc_error (procinfo * pi, char *func, int line);
1088 proc_warn (procinfo *pi, char *func, int line)
1095 proc_error (procinfo *pi, char *func, int line)
1104 * Updates the status struct in the procinfo.
1114 proc_get_status (procinfo *pi)
1212 proc_flags (procinfo *pi)
1239 proc_why (procinfo *pi)
1259 proc_what (procinfo *pi)
1280 proc_nsysarg (procinfo *pi)
1300 proc_sysargs (procinfo *pi)
1320 proc_syscall (procinfo *pi)
1341 proc_cursig (struct procinfo *pi)
1380 * pi -- the procinfo
1390 proc_modify_flag (procinfo *pi, long flag, long mode)
1398 * pointer to an LWP's procinfo, let's substitute the process's
1399 * procinfo and avoid opening the LWP's file descriptor
1470 /* The above operation renders the procinfo's cached pstatus obsolete. */
1500 proc_set_run_on_last_close (procinfo *pi)
1516 proc_unset_run_on_last_close (procinfo *pi)
1533 proc_set_kill_on_last_close (procinfo *pi)
1549 proc_unset_kill_on_last_close (procinfo *pi)
1566 proc_set_inherit_on_fork (procinfo *pi)
1582 proc_unset_inherit_on_fork (procinfo *pi)
1599 proc_set_async (procinfo *pi)
1615 proc_unset_async (procinfo *pi)
1629 proc_stop_process (procinfo *pi)
1671 proc_wait_for_stop (procinfo *pi)
1676 * We should never have to apply this operation to any procinfo
1735 proc_run_process (procinfo *pi, int step, int signo)
1788 proc_set_traced_signals (procinfo *pi, gdb_sigset_t *sigset)
1793 * We should never have to apply this operation to any procinfo
1818 /* The above operation renders the procinfo's cached pstatus obsolete. */
1834 proc_set_traced_faults (procinfo *pi, fltset_t *fltset)
1839 * We should never have to apply this operation to any procinfo
1864 /* The above operation renders the procinfo's cached pstatus obsolete. */
1878 proc_set_traced_sysentry (procinfo *pi, sysset_t *sysset)
1883 * We should never have to apply this operation to any procinfo
1914 /* The above operation renders the procinfo's cached pstatus obsolete. */
1928 proc_set_traced_sysexit (procinfo *pi, sysset_t *sysset)
1933 * We should never have to apply this operation to any procinfo
1964 /* The above operation renders the procinfo's cached pstatus obsolete. */
1978 proc_set_held_signals (procinfo *pi, gdb_sigset_t *sighold)
1983 * We should never have to apply this operation to any procinfo
2007 /* The above operation renders the procinfo's cached pstatus obsolete. */
2021 proc_get_pending_signals (procinfo *pi, gdb_sigset_t *save)
2026 * We should never have to apply this operation to any procinfo
2058 proc_get_signal_actions (procinfo *pi, gdb_sigaction_t *save)
2063 * We should never have to apply this operation to any procinfo
2095 proc_get_held_signals (procinfo *pi, gdb_sigset_t *save)
2100 * We should never have to apply this operation to any procinfo
2141 proc_get_traced_signals (procinfo *pi, gdb_sigset_t *save)
2146 * We should never have to apply this operation to any procinfo
2183 proc_trace_signal (procinfo *pi, int signo)
2188 * We should never have to apply this operation to any procinfo
2217 proc_ignore_signal (procinfo *pi, int signo)
2222 * We should never have to apply this operation to any procinfo
2251 proc_get_traced_faults (procinfo *pi, fltset_t *save)
2256 * We should never have to apply this operation to any procinfo
2293 proc_get_traced_sysentry (procinfo *pi, sysset_t *save)
2298 * We should never have to apply this operation to any procinfo
2366 proc_get_traced_sysexit (procinfo *pi, sysset_t *save)
2371 * We should never have to apply this operation to any procinfo
2439 proc_clear_current_fault (procinfo *pi)
2444 * We should never have to apply this operation to any procinfo
2479 proc_set_current_signal (procinfo *pi, int signo)
2490 * We should never have to apply this operation to any procinfo
2535 proc_clear_current_signal (procinfo *pi)
2540 * We should never have to apply this operation to any procinfo
2580 proc_get_gregs (procinfo *pi)
2604 proc_get_fpregs (procinfo *pi)
2677 proc_set_gregs (procinfo *pi)
2717 proc_set_fpregs (procinfo *pi)
2779 proc_kill (procinfo *pi, int signo)
2819 proc_parent_pid (procinfo *pi)
2822 * We should never have to apply this operation to any procinfo
2859 proc_set_watchpoint (procinfo *pi, CORE_ADDR addr, int len, int wflags)
2907 * procinfo *pi;
2917 proc_get_LDT_entry (procinfo *pi, int key)
3011 proc_get_nthreads (procinfo *pi)
3027 proc_get_nthreads (procinfo *pi)
3034 * NEW_PROC_API: only works for the process procinfo,
3038 if (pi->tid != 0) /* find the parent process procinfo */
3049 proc_get_nthreads (procinfo *pi)
3070 proc_get_current_thread (procinfo *pi)
3073 * Note: this should be applied to the root procinfo for the process,
3074 * not to the procinfo for an LWP. If applied to the procinfo for
3076 * find the parent process procinfo.
3099 proc_get_current_thread (procinfo *pi)
3113 proc_get_current_thread (procinfo *pi)
3125 * create a procinfo for each of them (chained to the parent).
3133 proc_delete_dead_threads (procinfo *parent, procinfo *thread, void *ignore)
3149 proc_update_threads (procinfo *pi)
3153 procinfo *thread;
3157 * We should never have to apply this operation to any procinfo
3202 proc_update_threads (procinfo *pi)
3207 procinfo *thread;
3212 * We should never have to apply this operation to any procinfo
3256 proc_update_threads (procinfo *pi)
3262 * We should never have to apply this operation to any procinfo
3296 proc_update_threads (procinfo *pi)
3309 * for each lwp in the procinfo list, until the function
3319 * pi - parent process procinfo
3328 proc_iterate_over_threads (procinfo *pi,
3329 int (*func) (procinfo *, procinfo *, void *),
3332 procinfo *thread, *next;
3336 * We should never have to apply this operation to any procinfo
3367 static int register_gdb_signals (procinfo *, gdb_sigset_t *);
3368 static void proc_trace_syscalls_1 (procinfo *pi, int syscallnum,
3370 static int insert_dbx_link_breakpoint (procinfo *pi);
3392 procfs_debug_inferior (procinfo *pi)
3570 procinfo *pi;
3627 procinfo *pi;
3629 /* Find procinfo for the main process */
3687 procinfo *pi;
3691 /* First look up procinfo for the main process. */
3695 (ie. inferior_ptid), then look up procinfo for the requested
3701 error (_("procfs: fetch_registers failed to find procinfo for %s"),
3752 procinfo *pi;
3756 /* First find procinfo for main process. */
3760 (ie. inferior_ptid), then look up procinfo for the requested
3766 error (_("procfs: store_registers: failed to find procinfo for %s"),
3797 syscall_is_lwp_exit (procinfo *pi, int scall)
3812 syscall_is_exit (procinfo *pi, int scall)
3826 syscall_is_exec (procinfo *pi, int scall)
3850 syscall_is_lwp_create (procinfo *pi, int scall)
3879 procinfo *pi;
3892 /* Find procinfo for main process */
4089 /* If not in procinfo list, add it. */
4159 /* If not in procinfo list, add it. */
4255 * If we don't create a procinfo, resume may be unhappy
4343 procinfo *pi;
4346 /* Find procinfo for main process */
4401 invalidate_cache (procinfo *parent, procinfo *pi, void *ptr)
4427 We don't do this to the master (parent) procinfo. */
4453 make_signal_thread_runnable (procinfo *process, procinfo *pi, void *ptr)
4487 procinfo *pi, *thread;
4506 /* Find procinfo for main process */
4524 /* Void the process procinfo's caches. */
4547 pi = thread; /* substitute the thread's procinfo for run */
4572 register_gdb_signals (procinfo *pi, gdb_sigset_t *signals)
4597 procinfo *pi = find_procinfo_or_die (PIDGET (ptid), 0);
4683 unconditionally_kill_inferior (procinfo *pi)
4749 /* Find procinfo for main process */
4750 procinfo *pi = find_procinfo (PIDGET (inferior_ptid), 0);
4767 procinfo *pi;
4771 /* Find procinfo for main process */
4800 procinfo *pi;
4916 procinfo *pi;
5004 /* FIXME: No need to destroy the procinfo --
5120 procfs_notice_thread (procinfo *pi, procinfo *thread, void *ptr)
5140 procinfo *pi;
5142 /* Find procinfo for main process */
5161 procinfo *pi;
5207 procinfo *pi;
5292 procinfo *pi;
5333 procinfo *pi;
5335 /* Find procinfo for the lwp. */
5338 warning (_("procfs_find_LDT_entry: could not find procinfo for %d:%d."),
5369 * pi -- procinfo struct for the process to be mapped.
5380 iterate_over_mappings (procinfo *pi, int (*child_func) (), void *data,
5451 procinfo *pi = data;
5504 procinfo *pi = find_procinfo_or_die (PIDGET (inferior_ptid), 0);
5562 procinfo *pi = find_procinfo_or_die (PIDGET (inferior_ptid), 0);
5674 procinfo *pi = (procinfo *) data;
5689 insert_dbx_link_breakpoint (procinfo *pi)
5762 info_proc_mappings (procinfo *pi, int summary)
5796 procinfo *process = NULL;
5797 procinfo *thread = NULL;
5845 /* No. So open a procinfo for it, but
5892 proc_trace_syscalls_1 (procinfo *pi, int syscallnum, int entry_or_exit,
5925 procinfo *pi;
5997 * we will be able to find a 'live' procinfo.
6053 procfs_corefile_thread_callback (procinfo *pi, procinfo *thread, void *data)
6077 procinfo *pi = find_procinfo_or_die (PIDGET (inferior_ptid), 0);