From: Philip Homburg Date: Mon, 25 Jul 2005 12:15:05 +0000 (+0000) Subject: Fixed do_trace to properly return (status) information. X-Git-Tag: v3.1.0~546 X-Git-Url: http://zhaoyanbai.com/repos/man.named.html?a=commitdiff_plain;h=153fdabb26e9c3f08352191386d668e14418d58f;p=minix.git Fixed do_trace to properly return (status) information. --- diff --git a/kernel/system/do_trace.c b/kernel/system/do_trace.c index bcf07bef7..ebf215fe2 100644 --- a/kernel/system/do_trace.c +++ b/kernel/system/do_trace.c @@ -60,6 +60,7 @@ register message *m_ptr; if (rp->p_memmap[T].mem_len != 0) { if ((src = umap_local(rp, T, tr_addr, TR_VLSIZE)) == 0) return(EIO); phys_copy(src, vir2phys(&tr_data), (phys_bytes) sizeof(long)); + m_ptr->CTL_DATA= tr_data; break; } /* Text space is actually data space - fall through. */ @@ -67,20 +68,21 @@ register message *m_ptr; case T_GETDATA: /* return value from data space */ if ((src = umap_local(rp, D, tr_addr, TR_VLSIZE)) == 0) return(EIO); phys_copy(src, vir2phys(&tr_data), (phys_bytes) sizeof(long)); + m_ptr->CTL_DATA= tr_data; break; case T_GETUSER: /* return value from process table */ if ((tr_addr & (sizeof(long) - 1)) != 0 || tr_addr > sizeof(struct proc) - sizeof(long)) return(EIO); - tr_data = *(long *) ((char *) rp + (int) tr_addr); + m_ptr->CTL_DATA = *(long *) ((char *) rp + (int) tr_addr); break; case T_SETINS: /* set value in instruction space */ if (rp->p_memmap[T].mem_len != 0) { if ((dst = umap_local(rp, T, tr_addr, TR_VLSIZE)) == 0) return(EIO); phys_copy(vir2phys(&tr_data), dst, (phys_bytes) sizeof(long)); - tr_data = 0; + m_ptr->CTL_DATA = 0; break; } /* Text space is actually data space - fall through. */ @@ -88,7 +90,7 @@ register message *m_ptr; case T_SETDATA: /* set value in data space */ if ((dst = umap_local(rp, D, tr_addr, TR_VLSIZE)) == 0) return(EIO); phys_copy(vir2phys(&tr_data), dst, (phys_bytes) sizeof(long)); - tr_data = 0; + m_ptr->CTL_DATA = 0; break; case T_SETUSER: /* set value in process table */ @@ -116,20 +118,20 @@ register message *m_ptr; SETPSW(rp, tr_data); else *(reg_t *) ((char *) &rp->p_reg + i) = (reg_t) tr_data; - tr_data = 0; + m_ptr->CTL_DATA = 0; break; case T_RESUME: /* resume execution */ rp->p_rts_flags &= ~P_STOP; if (rp->p_rts_flags == 0) lock_ready(rp); - tr_data = 0; + m_ptr->CTL_DATA = 0; break; case T_STEP: /* set trace bit */ rp->p_reg.psw |= TRACEBIT; rp->p_rts_flags &= ~P_STOP; if (rp->p_rts_flags == 0) lock_ready(rp); - tr_data = 0; + m_ptr->CTL_DATA = 0; break; default: