path: root/sys/sys/ptrace.h
diff options
authorAttilio Rao <attilio@FreeBSD.org>2010-11-22 14:42:13 +0000
committerAttilio Rao <attilio@FreeBSD.org>2010-11-22 14:42:13 +0000
commit7f08176ee8b672feebd8a12572b43dddcb88046e (patch)
tree8831ac1227984e07e03c6ac1b5cf30bba847610f /sys/sys/ptrace.h
parent7a3923c00eb666a0fe0aedeef6fbfb9b6573acb1 (diff)
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: svn path=/head/; revision=215679
Diffstat (limited to 'sys/sys/ptrace.h')
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/sys/ptrace.h b/sys/sys/ptrace.h
index f4b25d438b05..f909b865cec4 100644
--- a/sys/sys/ptrace.h
+++ b/sys/sys/ptrace.h
@@ -34,6 +34,7 @@
#define _SYS_PTRACE_H_
#include <sys/signal.h>
+#include <sys/param.h>
#include <machine/reg.h>
#define PT_TRACE_ME 0 /* child declares it's being traced */
@@ -106,6 +107,7 @@ struct ptrace_lwpinfo {
sigset_t pl_sigmask; /* LWP signal mask */
sigset_t pl_siglist; /* LWP pending signal */
struct __siginfo pl_siginfo; /* siginfo for signal */
+ char pl_tdname[MAXCOMLEN + 1]; /* LWP name */
/* Argument structure for PT_VM_ENTRY. */