GDB (API)
/home/stan/gdb/src/gdb/common/linux-procfs.h
Go to the documentation of this file.
00001 /* Linux-specific PROCFS manipulation routines.
00002    Copyright (C) 2011-2013 Free Software Foundation, Inc.
00003 
00004    This file is part of GDB.
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 3 of the License, or
00009    (at your option) any later version.
00010 
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014    GNU General Public License for more details.
00015 
00016    You should have received a copy of the GNU General Public License
00017    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
00018 
00019 #ifndef COMMON_LINUX_PROCFS_H
00020 #define COMMON_LINUX_PROCFS_H
00021 
00022 #include <unistd.h>
00023 
00024 /* Return the TGID of LWPID from /proc/pid/status.  Returns -1 if not
00025    found.  */
00026 
00027 extern int linux_proc_get_tgid (pid_t lwpid);
00028 
00029 /* Return the TracerPid of LWPID from /proc/pid/status.  Returns -1 if not
00030    found.  */
00031 
00032 extern pid_t linux_proc_get_tracerpid (pid_t lwpid);
00033 
00034 /* Detect `T (stopped)' in `/proc/PID/status'.
00035    Other states including `T (tracing stop)' are reported as false.  */
00036 
00037 extern int linux_proc_pid_is_stopped (pid_t pid);
00038 
00039 /* Return non-zero if PID is a zombie.  */
00040 
00041 extern int linux_proc_pid_is_zombie (pid_t pid);
00042 
00043 #endif /* COMMON_LINUX_PROCFS_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines