kernel: trap-dependent state restore, trace fixes
. restore state depends on how saving of state was done; also remember trap style in sig context . actually set and restore TRACEBIT with new trap styles; have to remove it once process enters kernel though, done in debug trap exception handler . introduce MF_STEP that makes arch-specific code turn on trace bit instead of setting TRACEBIT directly, a bit more arch-friendly and avoids keeping precious state in per-process PSW arch-dependently
This commit is contained in:
@@ -71,11 +71,8 @@ int do_fork(struct proc * caller, message * m_ptr)
|
||||
rpc->p_user_time = 0; /* set all the accounting times to 0 */
|
||||
rpc->p_sys_time = 0;
|
||||
|
||||
#if defined(__i386__)
|
||||
rpc->p_reg.psw &= ~TRACEBIT; /* clear trace bit */
|
||||
#endif
|
||||
rpc->p_misc_flags &=
|
||||
~(MF_VIRT_TIMER | MF_PROF_TIMER | MF_SC_TRACE | MF_SPROF_SEEN);
|
||||
~(MF_VIRT_TIMER | MF_PROF_TIMER | MF_SC_TRACE | MF_SPROF_SEEN | MF_STEP);
|
||||
rpc->p_virt_left = 0; /* disable, clear the process-virtual timers */
|
||||
rpc->p_prof_left = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user