dtrace: Make pid provider work on trivial tests

'newpc' needs set in the "common" case.  With this, the trivial test

 $ dtrace -n 'pid$target:libc:strlen:entry { trace(timestamp); }' -p
 <pid>

now works.

MFC after:	3 weeks
This commit is contained in:
Justin Hibbits 2022-10-30 15:33:06 -04:00
parent 35c87c070a
commit ec9388ddba

View File

@ -486,6 +486,10 @@ fasttrap_pid_probe(struct trapframe *frame)
rp->lr = rp->pc + 4;
break;
case FASTTRAP_T_COMMON:
curthread->t_dtrace_pc = pc;
curthread->t_dtrace_npc = pc + 4;
curthread->t_dtrace_on = 1;
new_pc = pc;
break;
};
done: