aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/signal.h
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2017-06-29 21:31:13 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2017-06-29 21:31:13 +0000
commit51645e836d19f28ac10bbb2281199065931f9324 (patch)
treed1218afb4ae6b8b11c8d3dde43b1dca3e45a4092 /sys/sys/signal.h
parent98c9236978c437d5a0c7fdc8d181a3913abdae4c (diff)
downloadsrc-51645e836d19f28ac10bbb2281199065931f9324.tar.gz
src-51645e836d19f28ac10bbb2281199065931f9324.zip
Store a 32-bit PT_LWPINFO struct for 32-bit process core dumps.
Process core notes for a 32-bit process running on a 64-bit host need to use 32-bit structures so that the note layout matches the layout of notes of a core dump of a 32-bit process under a 32-bit kernel. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D11407
Notes
Notes: svn path=/head/; revision=320481
Diffstat (limited to 'sys/sys/signal.h')
-rw-r--r--sys/sys/signal.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/sys/sys/signal.h b/sys/sys/signal.h
index 52f2d5806176..bf19af746836 100644
--- a/sys/sys/signal.h
+++ b/sys/sys/signal.h
@@ -174,6 +174,16 @@ union sigval {
int sigval_int;
void *sigval_ptr;
};
+
+#if defined(_WANT_LWPINFO32) || (defined(_KERNEL) && defined(__LP64__))
+union sigval32 {
+ int sival_int;
+ uint32_t sival_ptr;
+ /* 6.0 compatibility */
+ int sigval_int;
+ uint32_t sigval_ptr;
+};
+#endif
#endif
#if __POSIX_VISIBLE >= 199309
@@ -256,6 +266,38 @@ typedef struct __siginfo {
#define si_mqd _reason._mesgq._mqd
#define si_band _reason._poll._band
+#if defined(_WANT_LWPINFO32) || (defined(_KERNEL) && defined(__LP64__))
+struct siginfo32 {
+ int si_signo; /* signal number */
+ int si_errno; /* errno association */
+ int si_code; /* signal code */
+ __pid_t si_pid; /* sending process */
+ __uid_t si_uid; /* sender's ruid */
+ int si_status; /* exit value */
+ uint32_t si_addr; /* faulting instruction */
+ union sigval32 si_value; /* signal value */
+ union {
+ struct {
+ int _trapno;/* machine specific trap code */
+ } _fault;
+ struct {
+ int _timerid;
+ int _overrun;
+ } _timer;
+ struct {
+ int _mqd;
+ } _mesgq;
+ struct {
+ int32_t _band; /* band event for SIGPOLL */
+ } _poll; /* was this ever used ? */
+ struct {
+ int32_t __spare1__;
+ int __spare2__[7];
+ } __spare__;
+ } _reason;
+};
+#endif
+
/** si_code **/
/* codes for SIGILL */
#define ILL_ILLOPC 1 /* Illegal opcode. */