+ break;
+ /* map u-area offset */
+ case PT_READ_U:
+ case PT_WRITE_U:
+ /*
+ * Big, cheezy hack: hpuxtobsduoff is really intended
+ * to be called in the child context (procxmt) but we
+ * do it here in the parent context to avoid hacks in
+ * the MI sys_process.c file. This works only because
+ * we can access the child's md_regs pointer and it
+ * has the correct value (the child has already trapped
+ * into the kernel).
+ */
+ if ((cp = pfind(uap->pid)) == 0)
+ return (ESRCH);
+ uap->addr = (int *) hpuxtobsduoff(uap->addr, &isps, cp);
+
+ /*
+ * Since HP-UX PS is only 16-bits in ar0, requests
+ * to write PS actually contain the PS in the high word
+ * and the high half of the PC (the following register)
+ * in the low word. Move the PS value to where BSD
+ * expects it.
+ */
+ if (isps && uap->req == PT_WRITE_U)
+ uap->data >>= 16;
+ break;