GDB (xrefs)

Typedefs | Functions
linux-procfs.h File Reference
`#include <unistd.h>`

Go to the source code of this file.

## Typedefs
typedef int(* | linux_proc_attach_lwp_func) (ptid_t ptid)

## Functions
int | linux_proc_get_tgid (pid_t lwpid)
pid_t | linux_proc_get_tracerpid_nowarn (pid_t lwpid)
int | linux_proc_pid_is_stopped (pid_t pid)
int | linux_proc_pid_is_trace_stopped_nowarn (pid_t pid)
int | linux_proc_pid_is_zombie (pid_t pid)
int | linux_proc_pid_is_zombie_nowarn (pid_t pid)
int | linux_proc_pid_is_gone (pid_t pid)
const char * | linux_proc_tid_get_name (ptid_t ptid)
void | linux_proc_attach_tgid_threads (pid_t pid, linux_proc_attach_lwp_func func)
int | linux_proc_task_list_dir_exists (pid_t pid)
char * | linux_proc_pid_to_exec_file (int pid)

## Typedef Documentation

## ◆ linux_proc_attach_lwp_func

typedef int(* linux_proc_attach_lwp_func) (ptid_t ptid)

Definition at line 67 of file linux-procfs.h.

## Function Documentation

## ◆ linux_proc_attach_tgid_threads()

void linux_proc_attach_tgid_threads | ( | pid_t | pid,
|  | linux_proc_attach_lwp_func | func
| ) |  |

Definition at line 275 of file linux-procfs.c.

References _, linux_proc_get_tgid(), selftests::ptid::lwp, pid, ptid_build(), warning(), and xsnprintf().

Referenced by linux_nat_attach().

## ◆ linux_proc_get_tgid()

int linux_proc_get_tgid | ( | pid_t | lwpid | ) |

Definition at line 58 of file linux-procfs.c.

References linux_proc_get_int().

Referenced by find_new_threads_callback(), and linux_proc_attach_tgid_threads().

## ◆ linux_proc_get_tracerpid_nowarn()

pid_t linux_proc_get_tracerpid_nowarn | ( | pid_t | lwpid | ) |

Definition at line 66 of file linux-procfs.c.

References linux_proc_get_int().

Referenced by linux_ptrace_attach_fail_reason().

## ◆ linux_proc_pid_is_gone()

int linux_proc_pid_is_gone | ( | pid_t | pid | ) |

Definition at line 155 of file linux-procfs.c.

References linux_proc_pid_get_state(), pid, PROC_STATE_DEAD, and PROC_STATE_ZOMBIE.

Referenced by attach_proc_task_lwp_callback().

## ◆ linux_proc_pid_is_stopped()

int linux_proc_pid_is_stopped | ( | pid_t | pid | ) |

Definition at line 193 of file linux-procfs.c.

References linux_proc_pid_has_state(), pid, and PROC_STATE_STOPPED.

Referenced by linux_nat_post_attach_wait().

## ◆ linux_proc_pid_is_trace_stopped_nowarn()

int linux_proc_pid_is_trace_stopped_nowarn | ( | pid_t | pid | ) |

Definition at line 202 of file linux-procfs.c.

References linux_proc_pid_has_state(), pid, and PROC_STATE_TRACING_STOP.

Referenced by check_ptrace_stopped_lwp_gone().

## ◆ linux_proc_pid_is_zombie()

int linux_proc_pid_is_zombie | ( | pid_t | pid | ) |

Definition at line 227 of file linux-procfs.c.

References linux_proc_pid_is_zombie_maybe_warn(), and pid.

Referenced by check_zombie_leaders(), and wait_lwp().

## ◆ linux_proc_pid_is_zombie_nowarn()

int linux_proc_pid_is_zombie_nowarn | ( | pid_t | pid | ) |

Definition at line 219 of file linux-procfs.c.

References linux_proc_pid_is_zombie_maybe_warn(), and pid.

Referenced by linux_ptrace_attach_fail_reason().

## ◆ linux_proc_pid_to_exec_file()

char* linux_proc_pid_to_exec_file | ( | int | pid | ) |

Definition at line 345 of file linux-procfs.c.

References name, pid, and xsnprintf().

Referenced by linux_child_pid_to_exec_file().

## ◆ linux_proc_task_list_dir_exists()

int linux_proc_task_list_dir_exists | ( | pid_t | pid | ) |

Definition at line 333 of file linux-procfs.c.

References pid, and xsnprintf().

Referenced by try_thread_db_load_1().

## ◆ linux_proc_tid_get_name()

const char* linux_proc_tid_get_name | ( | ptid_t | ptid | ) |

Definition at line 235 of file linux-procfs.c.

References gdb_fopen_cloexec(), pid, ptid_get_lwp(), ptid_get_pid(), ptid_lwp_p(), TASK_COMM_LEN, selftests::ptid::tid, and xsnprintf().

Referenced by linux_nat_thread_name().