Home | History | Annotate | Download | only in gdb

Lines Matching defs:procinfo

200 /* =================== STRUCT PROCINFO "MODULE" =================== */
204 /* The procinfo struct is a wrapper to hold all the state information
205 concerning a /proc process. There should be exactly one procinfo
207 process at a time, that means there should be only one procinfo.
209 single process procinfo.
214 procinfo as an argument.
216 There will be a separate procinfo structure for use by the (not yet
219 inferior's procinfo information. */
228 typedef struct procinfo {
229 struct procinfo *next;
251 struct procinfo *thread_list;
257 } procinfo;
259 /* Function prototypes for procinfo module: */
261 static procinfo *find_procinfo_or_die (int pid, int tid);
262 static procinfo *find_procinfo (int pid, int tid);
263 static procinfo *create_procinfo (int pid, int tid);
264 static void destroy_procinfo (procinfo *p);
265 static void dead_procinfo (procinfo *p, const char *msg, int killp);
266 static int open_procinfo_files (procinfo *p, int which);
267 static void close_procinfo_files (procinfo *p);
270 (procinfo *pi, find_memory_region_ftype child_func, void *data,
274 /* The head of the procinfo list: */
275 static procinfo *procinfo_list;
277 /* Search the procinfo list. Return a pointer to procinfo, or NULL if
280 static procinfo *
283 procinfo *pi;
309 static procinfo *
312 procinfo *pi = find_procinfo (pid, tid);
318 "(kernel thread %d) in procinfo list."),
321 error (_("procfs: couldn't find pid %d in procinfo list."), pid);
366 open_procinfo_files (procinfo *pi, int which)
437 /* Allocate a data structure and link it into the procinfo list.
439 pointer to new procinfo struct. */
441 static procinfo *
444 procinfo *pi, *parent = NULL;
456 pi = XNEW (procinfo);
457 memset (pi, 0, sizeof (procinfo));
481 /* Close all file descriptors associated with the procinfo. */
484 close_procinfo_files (procinfo *pi)
498 destroy_one_procinfo (procinfo **list, procinfo *pi)
500 procinfo *ptr;
502 /* Step one: unlink the procinfo from its list. */
523 destroy_procinfo (procinfo *pi)
525 procinfo *tmp;
527 if (pi->tid != 0) /* Destroy a thread procinfo. */
532 else /* Destroy a process procinfo and all its threads. */
545 void operator() (procinfo *pi) const
551 typedef std::unique_ptr<procinfo, procinfo_deleter> procinfo_up;
555 /* To be called on a non_recoverable error for a procinfo. Prints
560 dead_procinfo (procinfo *pi, const char *msg, int kill_p)
570 /* =================== END, STRUCT PROCINFO "MODULE" =================== */
582 static long proc_flags (procinfo *pi);
583 static int proc_why (procinfo *pi);
584 static int proc_what (procinfo *pi);
585 static int proc_set_current_signal (procinfo *pi, int signo);
586 static int proc_get_current_thread (procinfo *pi);
588 (procinfo *pi,
589 int (*func) (procinfo *, procinfo *, void *),
591 static void proc_resume (procinfo *pi, ptid_t scope_ptid,
595 proc_warn (procinfo *pi, const char *func, int line)
605 proc_error (procinfo *pi, const char *func, int line)
612 /* Updates the status struct in the procinfo. There is a 'valid'
619 proc_get_status (procinfo *pi)
667 proc_flags (procinfo *pi)
679 proc_why (procinfo *pi)
691 proc_what (procinfo *pi)
706 proc_watchpoint_address (procinfo *pi, CORE_ADDR *addr)
723 proc_nsysarg (procinfo *pi)
736 proc_sysargs (procinfo *pi)
754 pi -- the procinfo
763 proc_modify_flag (procinfo *pi, long flag, long mode)
770 an LWP's procinfo, let's substitute the process's procinfo and
786 /* The above operation renders the procinfo's cached pstatus
807 proc_set_run_on_last_close (procinfo *pi)
817 proc_unset_run_on_last_close (procinfo *pi)
828 proc_unset_inherit_on_fork (procinfo *pi)
838 proc_set_async (procinfo *pi)
848 proc_unset_async (procinfo *pi)
857 proc_stop_process (procinfo *pi)
880 proc_wait_for_stop (procinfo *pi)
884 /* We should never have to apply this operation to any procinfo
922 proc_run_process (procinfo *pi, int step, int signo)
954 proc_set_traced_signals (procinfo *pi, sigset_t *sigset)
958 /* We should never have to apply this operation to any procinfo
977 /* The above operation renders the procinfo's cached pstatus obsolete. */
989 proc_set_traced_faults (procinfo *pi, fltset_t *fltset)
993 /* We should never have to apply this operation to any procinfo
1012 /* The above operation renders the procinfo's cached pstatus obsolete. */
1022 proc_set_traced_sysentry (procinfo *pi, sysset_t *sysset)
1026 /* We should never have to apply this operation to any procinfo
1045 /* The above operation renders the procinfo's cached pstatus
1056 proc_set_traced_sysexit (procinfo *pi, sysset_t *sysset)
1060 /* We should never have to apply this operation to any procinfo
1079 /* The above operation renders the procinfo's cached pstatus
1090 proc_set_held_signals (procinfo *pi, sigset_t *sighold)
1094 /* We should never have to apply this operation to any procinfo
1112 /* The above operation renders the procinfo's cached pstatus
1123 proc_get_held_signals (procinfo *pi, sigset_t *save)
1127 /* We should never have to apply this operation to any procinfo
1150 proc_get_traced_signals (procinfo
1154 /* We should never have to apply this operation to any procinfo
1177 proc_get_traced_faults (procinfo *pi, fltset_t *save)
1181 /* We should never have to apply this operation to any procinfo
1204 proc_get_traced_sysentry (procinfo *pi, sysset_t *save)
1208 /* We should never have to apply this operation to any procinfo
1231 proc_get_traced_sysexit (procinfo *pi, sysset_t *save)
1235 /* We should never have to apply this operation to any procinfo
1259 proc_clear_current_fault (procinfo *pi)
1263 /* We should never have to apply this operation to any procinfo
1287 proc_set_current_signal (procinfo *pi, int signo)
1300 /* We should never have to apply this operation to any procinfo
1340 proc_clear_current_signal (procinfo *pi)
1344 /* We should never have to apply this operation to any procinfo
1377 proc_get_gregs (procinfo *pi)
1390 proc_get_fpregs (procinfo *pi)
1404 proc_set_gregs (procinfo *pi)
1438 proc_set_fpregs (procinfo *pi)
1471 proc_kill (procinfo *pi, int signo)
1496 proc_parent_pid (procinfo *pi)
1498 /* We should never have to apply this operation to any procinfo
1529 proc_set_watchpoint (procinfo *pi, CORE_ADDR addr, int len, int wflags)
1555 proc_get_nthreads (procinfo *pi)
1561 /* Only works for the process procinfo, because the LWP procinfos do not
1563 if (pi->tid != 0) /* Find the parent process procinfo. */
1574 proc_get_current_thread (procinfo *pi)
1576 /* Note: this should be applied to the root procinfo for the
1577 process, not to the procinfo for an LWP. If applied to the
1578 procinfo for an LWP, it will simply return that LWP's ID. In
1579 that case, find the parent process procinfo. */
1592 a procinfo for each of them (chained to the parent). Returns
1596 proc_delete_dead_threads (procinfo *parent, procinfo *thread, void *ignore)
1608 proc_update_threads (procinfo *pi)
1612 procinfo *thread;
1616 /* We should never have to apply this operation to any procinfo
1651 in the procinfo list, until the function returns non-zero, in which
1659 PI is the parent process procinfo. FUNC is the per-thread
1664 proc_iterate_over_threads (procinfo *pi,
1665 int (*func) (procinfo *, procinfo *, void *),
1668 procinfo *thread, *next;
1671 /* We should never have to apply this operation to any procinfo
1701 static void proc_trace_syscalls_1 (procinfo *pi, int syscallnum,
1711 procfs_debug_inferior (procinfo *pi)
1799 procinfo *pi;
1859 /* Create a procinfo for the current lwp. */
1872 procinfo *pi;
1874 /* Find procinfo for the main process. */
1925 procinfo *pi;
1934 error (_("procfs: fetch_registers failed to find procinfo for %s"),
1974 procinfo *pi;
1983 error (_("procfs: store_registers: failed to find procinfo for %s"),
2024 procinfo *pi;
2037 /* Find procinfo for main process. */
2211 /* If not in procinfo list, add it. */
2267 /* If not in procinfo list, add it. */
2305 procinfo, resume may be unhappy later. */
2362 procinfo *pi;
2365 /* Find procinfo for main process. */
2408 invalidate_cache (procinfo *parent, procinfo *pi, void *ptr)
2417 We don't do this to the master (parent) procinfo. */
2436 proc_resume (procinfo *pi, ptid_t scope_ptid, int step, enum gdb_signal signo)
2438 procinfo *thread;
2463 /* Void the process procinfo's caches. */
2479 pi = thread; /* Substitute the thread's procinfo
2500 /* Find procinfo for main process. */
2501 procinfo *pi = find_procinfo_or_die (inferior_ptid.pid (), 0);
2512 procinfo *pi = find_procinfo_or_die (inferior_ptid.pid (), 0);
2546 unconditionally_kill_inferior (procinfo *pi)
2578 /* Find procinfo for main process. */
2579 procinfo *pi = find_procinfo (inferior_ptid.pid (), 0);
2592 procinfo *pi;
2596 /* Find procinfo for main process. */
2615 procinfo *pi;
2670 /* Create a procinfo for the main lwp. */
2696 procinfo *pi;
2735 /* FIXME: No need to destroy the procinfo --
2854 procfs_notice_thread (procinfo *pi, procinfo *thread, void *ptr)
2871 procinfo *pi;
2875 /* Find procinfo for main process. */
2889 procinfo *pi;
2957 procinfo *pi;
3032 procinfo *pi;
3052 procinfo *pi;
3103 PI is the procinfo struct for the process to be mapped. FUNC is
3111 iterate_over_mappings (procinfo *pi, find_memory_region_ftype child_func,
3187 procinfo *pi = find_procinfo_or_die (inferior_ptid.pid (), 0);
3248 info_proc_mappings (procinfo *pi, int summary)
3278 procinfo *process = NULL;
3279 procinfo *thread = NULL;
3326 /* No. So open a procinfo for it, but
3371 proc_trace_syscalls_1 (procinfo *pi, int syscallnum, int entry_or_exit,
3404 procinfo *pi;
3471 'live' procinfo. */
3531 procfs_corefile_thread_callback (procinfo *pi, procinfo *thread, void *data)
3576 procinfo *pi = find_procinfo_or_die (inferior_ptid.pid (), 0);