Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106097322
D26004.id75593.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D26004.id75593.diff
View Options
Index: sys/powerpc/powerpc/trap.c
===================================================================
--- sys/powerpc/powerpc/trap.c
+++ sys/powerpc/powerpc/trap.c
@@ -153,6 +153,11 @@
{ EXC_LAST, NULL }
};
+static int uprintf_signal;
+SYSCTL_INT(_machdep, OID_AUTO, uprintf_signal, CTLFLAG_RWTUN,
+ &uprintf_signal, 0,
+ "Print debugging information on trap signal to ctty");
+
#define ESR_BITMASK \
"\20" \
"\040b0\037b1\036b2\035b3\034PIL\033PRR\032PTR\031FP" \
@@ -483,13 +488,22 @@
}
if (sig != 0) {
+ /* Translate fault for emulators (e.g. Linux) */
if (p->p_sysent->sv_transtrap != NULL)
sig = (p->p_sysent->sv_transtrap)(sig, type);
+
ksiginfo_init_trap(&ksi);
ksi.ksi_signo = sig;
ksi.ksi_code = (int) ucode; /* XXX, not POSIX */
ksi.ksi_addr = (void *)addr;
ksi.ksi_trapno = type;
+
+ if (uprintf_signal) {
+ uprintf("pid %d comm %s: signal %d code %d type %d "
+ "addr 0x%lx\n",
+ p->p_pid, p->p_comm, sig, ucode, type, addr);
+ }
+
trapsignal(td, &ksi);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 26, 8:49 AM (11 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15603021
Default Alt Text
D26004.id75593.diff (1 KB)
Attached To
Mode
D26004: [PowerPC] print debugging information on trap signal
Attached
Detach File
Event Timeline
Log In to Comment