diff options
author | Attilio Rao <attilio@FreeBSD.org> | 2010-11-22 14:42:13 +0000 |
---|---|---|
committer | Attilio Rao <attilio@FreeBSD.org> | 2010-11-22 14:42:13 +0000 |
commit | 7f08176ee8b672feebd8a12572b43dddcb88046e (patch) | |
tree | 8831ac1227984e07e03c6ac1b5cf30bba847610f /sys/sys/procfs.h | |
parent | 7a3923c00eb666a0fe0aedeef6fbfb9b6573acb1 (diff) | |
download | src-7f08176ee8b672feebd8a12572b43dddcb88046e.tar.gz src-7f08176ee8b672feebd8a12572b43dddcb88046e.zip |
Add the ability for GDB to printout the thread name along with other
thread specific informations.
In order to do that, and in order to avoid KBI breakage with existing
infrastructure the following semantic is implemented:
- For live programs, a new member to the PT_LWPINFO is added (pl_tdname)
- For cores, a new ELF note is added (NT_THRMISC) that can be used for
storing thread specific, miscellaneous, informations. Right now it is
just popluated with a thread name.
GDB, then, retrieves the correct informations from the corefile via the
BFD interface, as it groks the ELF notes and create appropriate
pseudo-sections.
Sponsored by: Sandvine Incorporated
Tested by: gianni
Discussed with: dim, kan, kib
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=215679
Diffstat (limited to 'sys/sys/procfs.h')
-rw-r--r-- | sys/sys/procfs.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/sys/procfs.h b/sys/sys/procfs.h index a8d862e9a801..cab9c30e44a8 100644 --- a/sys/sys/procfs.h +++ b/sys/sys/procfs.h @@ -80,6 +80,13 @@ typedef struct prpsinfo { char pr_psargs[PRARGSZ+1]; /* Arguments, null terminated (1) */ } prpsinfo_t; +#define THRMISC_VERSION 1 /* Current version of thrmisc_t */ + +typedef struct thrmisc { + char pr_tname[MAXCOMLEN+1]; /* Thread name, null terminated (1) */ + u_int _pad; /* Convenience pad, 0-filled (1) */ +} thrmisc_t; + typedef uint64_t psaddr_t; /* An address in the target process. */ #endif /* _SYS_PROCFS_H_ */ |