Kernel: fix sys_trace
Change-Id: I44bdd3b1d79bf751923581b75c3d44f011d2a5e0
This commit is contained in:
parent
5f5dcc545f
commit
502b6bda83
1 changed files with 6 additions and 4 deletions
|
@ -94,19 +94,20 @@ int do_trace(struct proc * caller, message * m_ptr)
|
|||
|
||||
case T_GETINS: /* return value from instruction space */
|
||||
COPYFROMPROC(tr_addr, (vir_bytes) &tr_data, sizeof(long));
|
||||
m_ptr->m_lsys_krn_sys_trace.data = tr_data;
|
||||
m_ptr->m_krn_lsys_sys_trace.data = tr_data;
|
||||
break;
|
||||
|
||||
case T_GETDATA: /* return value from data space */
|
||||
COPYFROMPROC(tr_addr, (vir_bytes) &tr_data, sizeof(long));
|
||||
m_ptr->m_lsys_krn_sys_trace.data= tr_data;
|
||||
m_ptr->m_krn_lsys_sys_trace.data= tr_data;
|
||||
break;
|
||||
|
||||
case T_GETUSER: /* return value from process table */
|
||||
if ((tr_addr & (sizeof(long) - 1)) != 0) return(EFAULT);
|
||||
|
||||
if (tr_addr <= sizeof(struct proc) - sizeof(long)) {
|
||||
m_ptr->m_lsys_krn_sys_trace.data = *(long *) ((char *) rp + (int) tr_addr);
|
||||
m_ptr->m_krn_lsys_sys_trace.data =
|
||||
*(long *) ((char *) rp + (int) tr_addr);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -118,7 +119,8 @@ int do_trace(struct proc * caller, message * m_ptr)
|
|||
|
||||
if (tr_addr > sizeof(struct priv) - sizeof(long)) return(EFAULT);
|
||||
|
||||
m_ptr->m_lsys_krn_sys_trace.data = *(long *) ((char *) rp->p_priv + (int) tr_addr);
|
||||
m_ptr->m_krn_lsys_sys_trace.data =
|
||||
*(long *) ((char *) rp->p_priv + (int) tr_addr);
|
||||
break;
|
||||
|
||||
case T_SETINS: /* set value in instruction space */
|
||||
|
|
Loading…
Reference in a new issue